Skip to content

Commit 848570d

Browse files
committed
remove src_expose_maybeinitializecontext_to_allow_existing_contexts.patch
nodejs/node#28544
1 parent f98a0a9 commit 848570d

File tree

4 files changed

+9
-55
lines changed

4 files changed

+9
-55
lines changed

patches/node/.patches

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch
3232
inherit_electron_crashpad_pipe_name_in_child_process.patch
3333
fixme_revert_crypto_add_support_for_rsa-pss_keys.patch
3434
chore_re-add_compileandcall_this_should_be_added_as_a_helper_in.patch
35-
src_expose_maybeinitializecontext_to_allow_existing_contexts.patch
3635
fix_extern_the_nativemoduleenv_and_options_parser_for_debug_builds.patch
3736
chore_read_nobrowserglobals_from_global_not_process.patch
3837
chore_split_createenvironment_into_createenvironment_and.patch

patches/node/src_expose_maybeinitializecontext_to_allow_existing_contexts.patch

Lines changed: 0 additions & 47 deletions
This file was deleted.

shell/renderer/atom_renderer_client.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,12 @@ void AtomRendererClient::DidCreateScriptContext(
119119
node::tracing::TraceEventHelper::SetAgent(node::CreateAgent());
120120

121121
// Setup node environment for each window.
122-
v8::Local<v8::Context> context =
123-
node::MaybeInitializeContext(renderer_context);
124-
DCHECK(!context.IsEmpty());
122+
bool success = node::InitializeContext(renderer_context);
123+
DCHECK(success);
124+
125125
node::Environment* env =
126-
node_bindings_->CreateEnvironment(context, nullptr, true);
126+
node_bindings_->CreateEnvironment(renderer_context, nullptr, true);
127+
127128
// If we have disabled the site instance overrides we should prevent loading
128129
// any non-context aware native module
129130
if (command_line->HasSwitch(switches::kDisableElectronSiteInstanceOverrides))

shell/renderer/web_worker_observer.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ void WebWorkerObserver::ContextCreated(v8::Local<v8::Context> worker_context) {
4848
node_bindings_->PrepareMessageLoop();
4949

5050
// Setup node environment for each window.
51-
v8::Local<v8::Context> context = node::MaybeInitializeContext(worker_context);
52-
DCHECK(!context.IsEmpty());
51+
bool success = node::InitializeContext(worker_context);
52+
DCHECK(success);
53+
5354
node::Environment* env =
54-
node_bindings_->CreateEnvironment(context, nullptr, true);
55+
node_bindings_->CreateEnvironment(worker_context, nullptr, true);
5556

5657
// Add Electron extended APIs.
5758
electron_bindings_->BindTo(env->isolate(), env->process_object());

0 commit comments

Comments
 (0)