-
Notifications
You must be signed in to change notification settings - Fork 15k
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
feat: add a new contextBridge module #20639
Merged
Merged
Commits on Oct 18, 2019
-
feat: add a new contextBridge module (#20307)
* feat: add a new contextBridge module * chore: fix docs linting * feat: add support for function arguments being proxied * chore: ensure that contextBridge can only be used when contextIsolation is enabled * docs: getReverseBinding can be null * docs: fix broken links in md file * feat: add support for promises in function parameters * fix: linting failure for explicit constructor * Update atom_api_context_bridge.cc * chore: update docs and API design as per feedback * refactor: remove reverse bindings and handle GC'able functions across the bridge * chore: only expose debugGC in testing builds * fix: do not proxy promises as objects * spec: add complete spec coverage for contextBridge * spec: add tests for null/undefined and the anti-overwrite logic * chore: fix linting * spec: add complex nested back-and-forth function calling * fix: expose contextBridge in sandboxed renderers * refactor: improve security of default_app using the new contextBridge module * s/bindAPIInMainWorld/exposeInMainWorld * chore: sorry for this commit, its a big one, I fixed like everything and refactored a lot * chore: remove PassedValueCache as it is unused now Values transferred from context A to context B are now cachde in the RenderFramePersistenceStore * chore: move to anonymous namespace * refactor: remove PassValueToOtherContextWithCache * chore: remove commented unused code blocks * chore: remove .only * chore: remote commented code * refactor: extract RenderFramePersistenceStore * spec: ensure it works with numbered keys * fix: handle number keys correctly * fix: sort out the linter * spec: update default_app asar spec for removed file * refactor: change signatures to return v8 objects directly rather than the mate dictionary handle * refactor: use the v8 serializer to support cloneable buffers and other object types * chore: fix linting * fix: handle hash collisions with a linked list in the map * fix: enforce a recursion limit on the context bridge * chore: fix linting * chore: remove TODO * chore: adapt for PR feedback * chore: remove .only * chore: clean up docs and clean up the proxy map when objects are released * chore: ensure we cache object values that are cloned through the V8 serializer
Configuration menu - View commit details
-
Copy full SHA for 548051b - Browse repository at this point
Copy the full SHA 548051bView commit details -
docs: mark contextBridge as experimental (#20638)
* docs: mark contextBridge as experimental This commit didn't make it to the original PR, quick addition here * Update context-bridge.md
Configuration menu - View commit details
-
Copy full SHA for b98d9da - Browse repository at this point
Copy the full SHA b98d9daView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce2113d - Browse repository at this point
Copy the full SHA ce2113dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 98af3fe - Browse repository at this point
Copy the full SHA 98af3feView commit details -
Configuration menu - View commit details
-
Copy full SHA for fa7b4b1 - Browse repository at this point
Copy the full SHA fa7b4b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for aef68c4 - Browse repository at this point
Copy the full SHA aef68c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8cfd7d1 - Browse repository at this point
Copy the full SHA 8cfd7d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1689cd8 - Browse repository at this point
Copy the full SHA 1689cd8View 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.