electron/spec
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
..
configs ci: run more Chromium unit tests (#15363) 2018-10-25 14:28:50 -04:00
fixtures test: remove more unused files (#20529) 2019-10-10 15:20:04 -07:00
static test: remove remote usage from chromium spec (#20568) 2019-10-16 11:12:31 -04:00
ts-smoke feat: add --enable-api-filtering-logging commandline switch (#20335) 2019-10-04 10:49:09 -07:00
.eslintrc chore: replace standard with eslint-config-standard and add custom rules (#14636) 2018-09-16 03:51:23 +10:00
api-clipboard-spec.js
api-native-image-spec.js refactor: make templateImage a property on nativeImage (#18124) 2019-05-07 06:52:07 -07:00
api-process-spec.js test: remove 'remote' usage from process tests (#20418) 2019-10-04 13:58:44 -07:00
api-remote-spec.js test: remove some remote usage from chromium specs (#20121) 2019-10-11 13:55:50 -07:00
api-shell-spec.js test: move module tests to main process (#20419) 2019-10-09 16:33:15 -07:00
api-web-frame-spec.js test: remove remote usage from webFrame test (#20512) 2019-10-11 10:20:08 -07:00
asar-spec.js feat: add a new contextBridge module (#20307) 2019-10-18 12:57:09 -07:00
BUILD.gn ci: run unittests on clean Chromium (#15125) 2018-10-22 16:12:19 -04:00
chromium-spec.js test: remove remote usage from chromium spec (#20568) 2019-10-16 11:12:31 -04:00
events-helpers.js fix: we can not use ts-node apaprently 2019-03-14 13:39:53 -07:00
expect-helpers.js chore: finish replacing assert with expect in tests (#18215) 2019-05-20 12:04:18 -05:00
node-spec.js test: simplify node setInterval test (#20594) 2019-10-15 17:10:28 -07:00
package.json test: move module tests to main process (#20419) 2019-10-09 16:33:15 -07:00
spec-helpers.js build: add enable_remote_module build flag (#19821) 2019-09-18 09:52:06 -07:00
webview-spec.js test: remove remote usage from webFrame test (#20512) 2019-10-11 10:20:08 -07:00
window-helpers.js test: remove remote usage from chromium spec (#20568) 2019-10-16 11:12:31 -04:00
yarn.lock test: move module tests to main process (#20419) 2019-10-09 16:33:15 -07:00