Add nodeIntegrationInWorker option
This commit is contained in:
parent
e496e18f6e
commit
a49af26e39
4 changed files with 20 additions and 2 deletions
|
@ -441,12 +441,18 @@ void AtomRendererClient::AddSupportedKeySystems(
|
|||
|
||||
void AtomRendererClient::DidInitializeWorkerContextOnWorkerThread(
|
||||
v8::Local<v8::Context> context) {
|
||||
WebWorkerObserver::GetCurrent()->ContextCreated(context);
|
||||
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kNodeIntegrationInWorker)) {
|
||||
WebWorkerObserver::GetCurrent()->ContextCreated(context);
|
||||
}
|
||||
}
|
||||
|
||||
void AtomRendererClient::WillDestroyWorkerContextOnWorkerThread(
|
||||
v8::Local<v8::Context> context) {
|
||||
WebWorkerObserver::GetCurrent()->ContextWillDestroy(context);
|
||||
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kNodeIntegrationInWorker)) {
|
||||
WebWorkerObserver::GetCurrent()->ContextWillDestroy(context);
|
||||
}
|
||||
}
|
||||
|
||||
v8::Local<v8::Context> AtomRendererClient::GetContext(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue