-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Allow passing FileHandle objects via postMessage #33772
Closed
Closed
Commits on Jun 11, 2020
-
Configuration menu - View commit details
-
Copy full SHA for cbc35c3 - Browse repository at this point
Copy the full SHA cbc35c3View commit details -
worker: allow transferring/cloning generic BaseObjects
Extend support for transferring objects à la `MessagePort` to other types of `BaseObject` subclasses, as well as implement cloning support for cases in which destructive transferring is not needed or optional.
Configuration menu - View commit details
-
Copy full SHA for 915b90e - Browse repository at this point
Copy the full SHA 915b90eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f25ff9 - Browse repository at this point
Copy the full SHA 5f25ff9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b1aad92 - Browse repository at this point
Copy the full SHA b1aad92View commit details -
worker: allow passing JS wrapper objects via postMessage
Enable JS wrapper objects to be used as transferable or cloneable objects in `postMessage()` calls, by having them extend a C++-backed class. This requires a few internal changes: - This commit adds the possibility for transferred objects to read/write JS values at the end of the serialization/deserialization phases. - This commit adds the possibility for transferred objects to list sub-transferables, e.g. typically the public JS wrapper class would list its C++ handle in there. - This commit adds usage of `BaseObject` in a few more places, because now during deserialization weakly held objects can also be involved, in addition to `MessagePort`s.
Configuration menu - View commit details
-
Copy full SHA for 877d631 - Browse repository at this point
Copy the full SHA 877d631View commit details -
worker,fs: make FileHandle transferable
Allow passing `FileHandle` instances in the transfer list of a `.postMessage()` call.
Configuration menu - View commit details
-
Copy full SHA for 758fe1a - Browse repository at this point
Copy the full SHA 758fe1aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 82a2220 - Browse repository at this point
Copy the full SHA 82a2220View commit details -
Configuration menu - View commit details
-
Copy full SHA for 22e70e2 - Browse repository at this point
Copy the full SHA 22e70e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for c74eeb2 - Browse repository at this point
Copy the full SHA c74eeb2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a94759a - Browse repository at this point
Copy the full SHA a94759aView commit details -
worker: emit
'messagerror'
events for failed deserializationThis is much nicer than just treating exceptions as uncaught, and enables reporting of exceptions from the internal C++ deserialization machinery.
Configuration menu - View commit details
-
Copy full SHA for 9f487ab - Browse repository at this point
Copy the full SHA 9f487abView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.