Index: third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp |
diff --git a/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp |
index 2a3dc4c12b406c8f4e8faaddf75c7c20ff1c039d..bf799a0f215d32109ac463d66d44f2a6687265fa 100644 |
--- a/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp |
+++ b/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp |
@@ -94,7 +94,8 @@ void InspectorRuntimeAgent::evaluate(ErrorString* errorString, const String& exp |
if (optExecutionContextId) { |
executionContextId = *optExecutionContextId; |
} else { |
- InjectedScript* injectedScript = m_injectedScriptManager->injectedScriptFor(defaultScriptState()); |
+ v8::HandleScope handles(defaultScriptState()->isolate()); |
+ InjectedScript* injectedScript = m_injectedScriptManager->injectedScriptFor(defaultScriptState()->context()); |
ASSERT(injectedScript); |
executionContextId = injectedScript->contextId(); |
} |
@@ -165,12 +166,14 @@ void InspectorRuntimeAgent::disable(ErrorString* errorString) |
void InspectorRuntimeAgent::reportExecutionContextCreated(ScriptState* scriptState, const String& type, const String& origin, const String& humanReadableName, const String& frameId) |
{ |
- m_v8RuntimeAgent->reportExecutionContextCreated(scriptState, type, origin, humanReadableName, frameId); |
+ v8::HandleScope handles(scriptState->isolate()); |
+ m_v8RuntimeAgent->reportExecutionContextCreated(scriptState->context(), type, origin, humanReadableName, frameId); |
} |
void InspectorRuntimeAgent::reportExecutionContextDestroyed(ScriptState* scriptState) |
{ |
- m_v8RuntimeAgent->reportExecutionContextDestroyed(scriptState); |
+ v8::HandleScope handles(scriptState->isolate()); |
+ m_v8RuntimeAgent->reportExecutionContextDestroyed(scriptState->context()); |
} |
} // namespace blink |