electron/spec
Samuel Attard 78411db4b5
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.
2019-04-16 16:08:11 -04:00
..
configs ci: run more Chromium unit tests (#15363) 2018-10-25 14:28:50 -04:00
fixtures fix: ensure the sandboxed preloads globals do not leak (#17712) 2019-04-16 10:57:02 -07:00
static build: ensure runner is defined inside the spec callback (#17664) 2019-04-02 18:25:45 -07:00
ts-smoke feat: promisify executeJavaScript (#17312) 2019-03-14 12:08:54 -07:00
.eslintrc chore: replace standard with eslint-config-standard and add custom rules (#14636) 2018-09-16 03:51:23 +10:00
api-auto-updater-spec.js chore: update to standard 12 2018-09-14 14:57:01 +10:00
api-browser-view-spec.js fix: shutdown after message loop is ready (#16671) 2019-02-01 10:21:49 -05:00
api-browser-window-affinity-spec.js test: promisify a bunch of tests (#16051) 2018-12-18 23:44:03 -07:00
api-browser-window-spec.js fix: ensure the sandboxed preloads globals do not leak (#17712) 2019-04-16 10:57:02 -07:00
api-callbacks-registry-spec.js chore: update to standard 12 2018-09-14 14:57:01 +10:00
api-clipboard-spec.js chore: update to standard 12 2018-09-14 14:57:01 +10:00
api-content-tracing-spec.js fix crash when passing empty string to recording (#17698) 2019-04-05 11:19:06 -07:00
api-crash-reporter-spec.js chore: make "nodeIntegration" and "webviewTag" default to false (#16235) 2019-01-07 22:19:27 +03:00
api-debugger-spec.js test: fix race condition in debugger spec (#17091) 2019-02-22 16:45:48 -08:00
api-deprecations-spec.js refactor: make accessibilitySupportEnabled a property on app (#17362) 2019-04-04 19:49:04 -07:00
api-desktop-capturer-spec.js chore: rename atomBinding to electronBinding (#17419) 2019-03-18 12:37:06 -07:00
api-dialog-spec.js chore: update to standard 12 2018-09-14 14:57:01 +10:00
api-global-shortcut-spec.js feat: allow registering multiple shortcuts (#15542) 2018-11-07 09:40:38 -08:00
api-in-app-purchase-spec.js feat: promisify In-App Purchase (#17355) 2019-03-13 13:56:01 -07:00
api-ipc-main-spec.js chore: remove special handling for dialog methods in remote module (#17412) 2019-03-19 11:59:33 -07:00
api-ipc-renderer-spec.js fix: emit IPC event in correct context if isolation and sandbox enabled (#16352) 2019-01-12 14:19:20 +01:00
api-menu-item-spec.js fix: windowmenu did not show the window list on macOS (#16387) 2019-01-14 17:27:52 +01:00
api-menu-spec.js fix: throw error when inserting menu items out-of-range (#17401) 2019-03-18 07:58:42 -07:00
api-native-image-spec.js fix: add missing buffer size check in nativeImage (#17465) 2019-03-26 10:13:39 +09:00
api-net-log-spec.js feat: promisify netLog.stopLogging (#16862) 2019-02-19 10:48:27 +00:00
api-net-spec.js fix: match net module headers & http.IncomingMessage headers (#17517) 2019-04-02 07:41:19 -07:00
api-notification-dbus-spec.js chore: make "nodeIntegration" and "webviewTag" default to false (#16235) 2019-01-07 22:19:27 +03:00
api-notification-spec.js chore: update to standard 12 2018-09-14 14:57:01 +10:00
api-power-monitor-spec.js feat: Add new powerMonitor synchronous API (#17144) 2019-02-27 15:54:01 -05:00
api-power-save-blocker-spec.js chore: update to standard 12 2018-09-14 14:57:01 +10:00
api-process-spec.js feat: add process.getSystemVersion() (#16599) 2019-02-18 12:59:48 +00:00
api-protocol-spec.js feat: move webFrame scheme privilege methods to main process (#16416) 2019-01-29 16:11:01 +09:00
api-remote-spec.js feat: split openExternal into sync and async (#16176) 2019-01-14 20:35:21 -08:00
api-screen-spec.js feat: expose colorSpace to display object (#17405) 2019-03-19 15:12:03 -07:00
api-session-spec.js feat: promisify session.getBlobData() (#17303) 2019-03-14 08:11:01 -07:00
api-shell-spec.js feat: split openExternal into sync and async (#16176) 2019-01-14 20:35:21 -08:00
api-subframe-spec.js feat: enable NodeIntegrationInSubFrames for webview (#17226) 2019-03-15 10:39:20 -07:00
api-system-preferences-spec.js feat: add systemPreferences.getAnimationSettings() (#17382) 2019-03-19 12:15:40 -07:00
api-touch-bar-spec.js chore: update to standard 12 2018-09-14 14:57:01 +10:00
api-tray-spec.js fix: close context menu before popup (#17474) 2019-03-21 21:56:22 -07:00
api-view-spec.js chore: update to standard 12 2018-09-14 14:57:01 +10:00
api-web-contents-spec.js test: de-flake getAllWebContents test by moving it to spec-main (#17610) 2019-04-01 18:28:11 -07:00
api-web-contents-view-spec.js fix: shutdown after message loop is ready (#16671) 2019-02-01 10:21:49 -05:00
api-web-frame-spec.js fix: remove memory leak when using webFrame and spell checker (#16770) 2019-02-08 13:38:31 -08:00
api-web-request-spec.js spec: fix headers tests to match APIs 2018-09-14 17:05:26 +10:00
asar-spec.js chore: rename atomBinding to electronBinding (#17419) 2019-03-18 12:37:06 -07:00
assert-helpers.js spec: fix final node and chromium specs after assert change 2018-09-14 18:32:17 +10:00
BUILD.gn ci: run unittests on clean Chromium (#15125) 2018-10-22 16:12:19 -04:00
chrome-api-spec.js fix: regressions introduced by adding world isolation to Chrome extension content scripts (#17422) 2019-03-19 14:45:48 +01:00
chromium-spec.js chore: rename atomBinding to electronBinding (#17419) 2019-03-18 12:37:06 -07:00
content-script-spec.js feat: add support for content scripts 'all_frames' option (#17258) 2019-03-08 15:53:25 -08:00
events-helpers.js fix: we can not use ts-node apaprently 2019-03-14 13:39:53 -07:00
internal-spec.js fix: make feature strings more robust to whitespace (#15602) 2018-11-06 15:52:06 -08:00
modules-spec.js chore: rename atomBinding to electronBinding (#17419) 2019-03-18 12:37:06 -07:00
node-spec.js chore: rename atomBinding to electronBinding (#17419) 2019-03-18 12:37:06 -07:00
package-lock.json spec: add tests for the autoUpdater on macOS that actually test if it works (#17442) 2019-03-29 17:32:52 -07:00
package.json spec: chai is funky 2019-03-14 12:50:06 -07:00
security-warnings-spec.js chore: make "nodeIntegration" and "webviewTag" default to false (#16235) 2019-01-07 22:19:27 +03:00
version-bump-spec.js ci: make macOS CI faster (#16766) 2019-02-06 13:16:11 -08:00
webview-spec.js feat: add <webview>.getWebContentsId() (#17407) 2019-03-26 10:57:27 +09:00
window-helpers.js fix: maintain a ref count for objects sent over remote (#17464) 2019-04-16 16:08:11 -04:00