Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transferables #361

Merged
merged 55 commits into from
Mar 27, 2019
Merged

Transferables #361

merged 55 commits into from
Mar 27, 2019

Conversation

kristoferbaxter
Copy link
Contributor

@kristoferbaxter kristoferbaxter commented Mar 13, 2019

Ready for review now.

This PR moves the transfer format over to ArrayBuffers comprised of Uint16Array members.

Still needs another merge with master, will take a while since there have been so many changes.

@kristoferbaxter kristoferbaxter marked this pull request as ready for review March 15, 2019 05:33
config/rollup.plugins.js Outdated Show resolved Hide resolved
src/main-thread/commands/attribute.ts Outdated Show resolved Hide resolved
src/main-thread/commands/attribute.ts Outdated Show resolved Hide resolved
src/main-thread/commands/attribute.ts Outdated Show resolved Hide resolved
src/transfer/TransferrableMutation.ts Show resolved Hide resolved
@kristoferbaxter
Copy link
Contributor Author

kristoferbaxter commented Mar 23, 2019

Screen Shot 2019-03-23 at 3 13 35 PM

Woot! Ready for review now.

@dvoytenko @jridgewell and @choumx

src/main-thread/commands/attribute.ts Outdated Show resolved Hide resolved
src/worker-thread/dom/Element.ts Outdated Show resolved Hide resolved
src/main-thread/commands/character-data.ts Show resolved Hide resolved
src/main-thread/commands/event-subscription.ts Outdated Show resolved Hide resolved
authorURL: string;
domURL: string;

// ---- Optional Overrides
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure this is tracked: we'll need to update AMP's side once this is being upgraded.

src/main-thread/debugging.ts Show resolved Hide resolved
*/
export function upgradeElement(baseElement: Element, workerDOMUrl: string, callbacks?: WorkerCallbacks, debug?: boolean): Promise<WorkerDom | null> {
export function upgradeElement(baseElement: Element, domURL: string, longTask?: LongTaskFunction): Promise<Worker | null> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Why not just use the configuration struct here? There's always something comes up to add to this api.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely should just use the struct since we're changing the signature anyway. Good idea.

if (sanitizer && !sanitizer.sanitize(node)) {
return null;
// If `node` is removed by the sanitizer, don't store it and return null.
if (sanitizer && !sanitizer.sanitize(node)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should defer given the focus of this PR, but if we sanitization is meaningful here, we either should not create a node until it has been sanitized (looks like only by name in this case), or we should create the node via template and re-import into the doc post-sanitization.

src/main-thread/worker.ts Outdated Show resolved Hide resolved
@kristoferbaxter kristoferbaxter merged commit 7db5e34 into master Mar 27, 2019
@kristoferbaxter kristoferbaxter deleted the buffer branch March 27, 2019 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants