Skip to content

Commit

Permalink
test: remove "nativeWindowOpen: false" from renderer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz authored and electron-bot committed Dec 6, 2021
1 parent 5d0d253 commit 7c67763
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
1 change: 1 addition & 0 deletions shell/renderer/electron_renderer_client.cc
Expand Up @@ -157,6 +157,7 @@ void ElectronRendererClient::WillReleaseScriptContext(
// We also do this if we have disable electron site instance overrides to
// avoid memory leaks
auto prefs = render_frame->GetBlinkPreferences();
gin_helper::MicrotasksScope microtasks_scope(env->isolate());
node::FreeEnvironment(env);
if (env == node_bindings_->uv_env())
node::FreeIsolateData(node_bindings_->isolate_data());
Expand Down
2 changes: 2 additions & 0 deletions shell/renderer/web_worker_observer.cc
Expand Up @@ -37,6 +37,8 @@ WebWorkerObserver::WebWorkerObserver()

WebWorkerObserver::~WebWorkerObserver() {
lazy_tls.Pointer()->Set(nullptr);
gin_helper::MicrotasksScope microtasks_scope(
node_bindings_->uv_env()->isolate());
node::FreeEnvironment(node_bindings_->uv_env());
node::FreeIsolateData(node_bindings_->isolate_data());
}
Expand Down
10 changes: 0 additions & 10 deletions spec/chromium-spec.js
Expand Up @@ -154,16 +154,6 @@ describe('chromium feature', () => {
});
});

describe('window.postMessage', () => {
it('throws an exception when the targetOrigin cannot be converted to a string', () => {
const b = window.open('');
expect(() => {
b.postMessage('test', { toString: null });
}).to.throw('Cannot convert object to primitive value');
b.close();
});
});

describe('window.opener.postMessage', () => {
it('sets source and origin correctly', async () => {
const message = waitForEvent(window, 'message');
Expand Down
3 changes: 1 addition & 2 deletions spec/static/main.js
Expand Up @@ -109,8 +109,7 @@ app.whenReady().then(async function () {
backgroundThrottling: false,
nodeIntegration: true,
webviewTag: true,
contextIsolation: false,
nativeWindowOpen: false
contextIsolation: false
}
});
window.loadFile('static/index.html', {
Expand Down

0 comments on commit 7c67763

Please sign in to comment.