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

Unified Diff: Source/core/inspector/InjectedScript.cpp

Issue 1249013002: DevTools: simplify setScriptSource and restartFrame return values (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
« no previous file with comments | « Source/core/inspector/InjectedScript.h ('k') | Source/core/inspector/InjectedScriptSource.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InjectedScript.cpp
diff --git a/Source/core/inspector/InjectedScript.cpp b/Source/core/inspector/InjectedScript.cpp
index 2420934a68ee8c2e7e252c58be345a5cfade17b5..becb93a2f4abaf0448827f403bf720e94d01bef0 100644
--- a/Source/core/inspector/InjectedScript.cpp
+++ b/Source/core/inspector/InjectedScript.cpp
@@ -169,7 +169,7 @@ void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, v8::Local<v8:
makeEvalCall(errorString, function, result, wasThrown, exceptionDetails);
}
-void InjectedScript::restartFrame(ErrorString* errorString, v8::Local<v8::Object> callFrames, const String& callFrameId, RefPtr<JSONObject>* result)
+void InjectedScript::restartFrame(ErrorString* errorString, v8::Local<v8::Object> callFrames, const String& callFrameId)
{
ScriptFunctionCall function(injectedScriptObject(), "restartFrame");
function.appendArgument(callFrames);
@@ -177,14 +177,11 @@ void InjectedScript::restartFrame(ErrorString* errorString, v8::Local<v8::Object
RefPtr<JSONValue> resultValue;
makeCall(function, &resultValue);
if (resultValue) {
- if (resultValue->type() == JSONValue::TypeString) {
+ if (resultValue->type() == JSONValue::TypeString)
resultValue->asString(errorString);
- return;
- }
- if (resultValue->type() == JSONValue::TypeObject) {
- *result = resultValue->asObject();
- return;
- }
+ else
+ ASSERT(resultValue->type() == JSONValue::TypeBoolean);
dgozman 2015/07/22 15:13:34 Let's ASSERT it's |true|.
yurys 2015/07/22 15:19:33 Done.
+ return;
}
*errorString = "Internal error";
}
« no previous file with comments | « Source/core/inspector/InjectedScript.h ('k') | Source/core/inspector/InjectedScriptSource.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698