Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(591)

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp

Issue 1636223002: DevTools: remove ScriptState/Value from the InjectedScript APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698