mirror of
https://github.com/electron/electron.git
synced 2026-01-09 07:28:12 -05:00
refactor: use associated v8::Context for event setup (#37355)
refactor: use associated v8::Context for event setup
This commit is contained in:
@@ -415,7 +415,7 @@ void NodeBindings::SetNodeCliFlags() {
|
||||
}
|
||||
}
|
||||
|
||||
void NodeBindings::Initialize() {
|
||||
void NodeBindings::Initialize(v8::Local<v8::Context> context) {
|
||||
TRACE_EVENT0("electron", "NodeBindings::Initialize");
|
||||
// Open node's error reporting system for browser process.
|
||||
|
||||
@@ -463,8 +463,7 @@ void NodeBindings::Initialize() {
|
||||
SetErrorMode(GetErrorMode() & ~SEM_NOGPFAULTERRORBOX);
|
||||
#endif
|
||||
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
gin_helper::internal::Event::GetConstructor(isolate->GetCurrentContext());
|
||||
gin_helper::internal::Event::GetConstructor(context);
|
||||
|
||||
g_is_initialized = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user