Skip to content
Branch: master
Find file History
MarshallOfSound fix: maintain a ref count for objects sent over remote (#17464)
* spec: clean up after a failed window count assertion

Previously when this assertion failed all tests that ran after the
failed assertion also failed.  This ensure that the assertion fails for
the test that actually caused the issue but cleans up the left-over
windows so that future tests do not fail.

* fix: maintain a ref count for objects sent over remote

Previously there was a race condition where a GC could occur in the
renderer process between the main process sending a meta.id and the
renderer pulling the proxy out its weakmap to stop it being GC'ed.

This fixes that race condition by maintaining a "sent" ref count in the
object registry and a "received" ref count in the object cache on the
renderer side.  The deref request now sends the number of refs the
renderer thinks it owns, if the number does not match the value in the
object registry it is assumed that there is an IPC message containing a
new reference in flight and this race condition was hit.

The browser side ref count is then reduced and we wait for the new deref
message.  This guaruntees that an object will only be removed from the
registry if every reference we sent has been guarunteed to be unreffed.
Latest commit 78411db Apr 17, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.eslintrc
.gitignore spec: add tests for the autoUpdater on macOS that actually test if it… Mar 30, 2019
ambient.d.ts
api-app-spec.ts refactor: make accessibilitySupportEnabled a property on app (#17362) Apr 5, 2019
api-autoupdater-darwin-spec.ts spec: add tests for the autoUpdater on macOS that actually test if it… Mar 30, 2019
api-web-contents-spec.ts test: de-flake getAllWebContents test by moving it to spec-main (#17610) Apr 2, 2019
events-helpers.ts spec: initial spike of main-process based tests Mar 14, 2019
index.js build: fix spec-main linting for 'only' (#17666) Apr 3, 2019
package.json spec: initial spike of main-process based tests Mar 14, 2019
window-helpers.ts
You can’t perform that action at this time.