| Index: Source/bindings/core/v8/ScriptCallStackFactory.cpp
|
| diff --git a/Source/bindings/core/v8/ScriptCallStackFactory.cpp b/Source/bindings/core/v8/ScriptCallStackFactory.cpp
|
| index 00aca0e79d76d11ff5d4ca33205ba22d56df8f27..0beead8512bf2f76654dd34cd2d680adc1b9eb44 100644
|
| --- a/Source/bindings/core/v8/ScriptCallStackFactory.cpp
|
| +++ b/Source/bindings/core/v8/ScriptCallStackFactory.cpp
|
| @@ -111,11 +111,14 @@ PassRefPtrWillBeRawPtr<ScriptCallStack> createScriptCallStack(size_t maxStackSiz
|
| return createScriptCallStack(stackTrace, maxStackSize, emptyStackIsAllowed, isolate);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<ScriptCallStack> createScriptCallStackForConsole(ScriptState* scriptState, size_t maxStackSize)
|
| +PassRefPtrWillBeRawPtr<ScriptCallStack> createScriptCallStackForConsole(size_t maxStackSize)
|
| {
|
| size_t stackSize = 1;
|
| if (InspectorInstrumentation::hasFrontends()) {
|
| - if (InspectorInstrumentation::consoleAgentEnabled(scriptState->executionContext()))
|
| + v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
| + if (!isolate->InContext())
|
| + return nullptr;
|
| + if (InspectorInstrumentation::consoleAgentEnabled(currentExecutionContext(isolate)))
|
| stackSize = maxStackSize;
|
| }
|
| return createScriptCallStack(stackSize);
|
|
|