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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.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/InspectorAnimationAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
index f76b0b781332f74b1c7bf903168a84b5e879fe7a..fa9d46a84f2f70ff0fe9deded693bfe597c087ac 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
@@ -390,15 +390,12 @@ void InspectorAnimationAgent::resolveAnimation(ErrorString* errorString, const S
ScriptState* scriptState = ScriptState::forMainWorld(frame);
if (!scriptState)
return;
- InjectedScript* injectedScript = m_injectedScriptManager->injectedScriptFor(scriptState);
+ ScriptState::Scope scope(scriptState);
+ InjectedScript* injectedScript = m_injectedScriptManager->injectedScriptFor(scriptState->context());
if (!injectedScript)
return;
-
- ScriptState::Scope scope(scriptState);
- v8::Isolate* isolate = scriptState->isolate();
- ScriptValue scriptValue = ScriptValue(scriptState, toV8(animation, scriptState->context()->Global(), isolate));
injectedScript->releaseObjectGroup("animation");
- result = injectedScript->wrapObject(scriptValue, "animation");
+ result = injectedScript->wrapObject(toV8(animation, scriptState->context()->Global(), scriptState->isolate()), "animation");
}
static CSSPropertyID animationProperties[] = {

Powered by Google App Engine
This is Rietveld 408576698