electron/shell/renderer
Samuel Attard 0090616f7b
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
2019-10-18 12:57:09 -07:00
..
api feat: add a new contextBridge module (#20307) 2019-10-18 12:57:09 -07:00
extensions feat: preliminary support for //extensions (#17440) 2019-07-24 16:01:08 -07:00
printing refactor: rename the atom namespace to electron 2019-06-19 17:33:28 -07:00
resources/mac refactor: rename the atom directory to shell 2019-06-19 17:33:28 -07:00
atom_autofill_agent.cc refactor: apply some 'clang-tidy -fix' changes (#20172) 2019-09-13 10:26:59 -04:00
atom_autofill_agent.h refactor: mojofy autofill renderer->browser (#18760) 2019-08-19 13:13:24 -07:00
atom_render_frame_observer.cc chore: remove native_mate (Part 3) (#20131) 2019-09-06 14:52:54 +09:00
atom_render_frame_observer.h refactor: rename the atom namespace to electron 2019-06-19 17:33:28 -07:00
atom_renderer_client.cc chore: bump node to v12.10.0 (master) (#20129) 2019-10-14 15:46:10 -07:00
atom_renderer_client.h refactor: rename the atom namespace to electron 2019-06-19 17:33:28 -07:00
atom_sandboxed_renderer_client.cc refactor: run clang-tidy (#20231) 2019-09-16 18:12:00 -04:00
atom_sandboxed_renderer_client.h refactor: rename the atom namespace to electron 2019-06-19 17:33:28 -07:00
content_settings_observer.cc refactor: run clang-tidy (#20231) 2019-09-16 18:12:00 -04:00
content_settings_observer.h refactor: rename the atom namespace to electron 2019-06-19 17:33:28 -07:00
electron_api_service_impl.cc refactor: use v8 serialization for ipc (#20214) 2019-10-09 13:59:08 -04:00
electron_api_service_impl.h refactor: use v8 serialization for ipc (#20214) 2019-10-09 13:59:08 -04:00
guest_view_container.cc refactor: rename the atom namespace to electron 2019-06-19 17:33:28 -07:00
guest_view_container.h refactor: rename the atom namespace to electron 2019-06-19 17:33:28 -07:00
renderer_client_base.cc chore: bump chromium to 63be48daea281d4f8c834c2e707a7 (master) (#19923) 2019-09-18 15:58:00 -04:00
renderer_client_base.h chore: bump chromium to 63be48daea281d4f8c834c2e707a7 (master) (#19923) 2019-09-18 15:58:00 -04:00
web_worker_observer.cc chore: bump node to v12.10.0 (master) (#20129) 2019-10-14 15:46:10 -07:00
web_worker_observer.h refactor: rename the atom namespace to electron 2019-06-19 17:33:28 -07:00