Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 162 function.appendArgument(isAsyncCallStack); | 162 function.appendArgument(isAsyncCallStack); |
| 163 function.appendArgument(callFrameId); | 163 function.appendArgument(callFrameId); |
| 164 function.appendArgument(expression); | 164 function.appendArgument(expression); |
| 165 function.appendArgument(objectGroup); | 165 function.appendArgument(objectGroup); |
| 166 function.appendArgument(includeCommandLineAPI); | 166 function.appendArgument(includeCommandLineAPI); |
| 167 function.appendArgument(returnByValue); | 167 function.appendArgument(returnByValue); |
| 168 function.appendArgument(generatePreview); | 168 function.appendArgument(generatePreview); |
| 169 makeEvalCall(errorString, function, result, wasThrown, exceptionDetails); | 169 makeEvalCall(errorString, function, result, wasThrown, exceptionDetails); |
| 170 } | 170 } |
| 171 | 171 |
| 172 void InjectedScript::restartFrame(ErrorString* errorString, v8::Local<v8::Object > callFrames, const String& callFrameId, RefPtr<JSONObject>* result) | 172 void InjectedScript::restartFrame(ErrorString* errorString, v8::Local<v8::Object > callFrames, const String& callFrameId) |
| 173 { | 173 { |
| 174 ScriptFunctionCall function(injectedScriptObject(), "restartFrame"); | 174 ScriptFunctionCall function(injectedScriptObject(), "restartFrame"); |
| 175 function.appendArgument(callFrames); | 175 function.appendArgument(callFrames); |
| 176 function.appendArgument(callFrameId); | 176 function.appendArgument(callFrameId); |
| 177 RefPtr<JSONValue> resultValue; | 177 RefPtr<JSONValue> resultValue; |
| 178 makeCall(function, &resultValue); | 178 makeCall(function, &resultValue); |
| 179 if (resultValue) { | 179 if (resultValue) { |
| 180 if (resultValue->type() == JSONValue::TypeString) { | 180 if (resultValue->type() == JSONValue::TypeString) |
| 181 resultValue->asString(errorString); | 181 resultValue->asString(errorString); |
| 182 return; | 182 else |
| 183 } | 183 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.
| |
| 184 if (resultValue->type() == JSONValue::TypeObject) { | 184 return; |
| 185 *result = resultValue->asObject(); | |
| 186 return; | |
| 187 } | |
| 188 } | 185 } |
| 189 *errorString = "Internal error"; | 186 *errorString = "Internal error"; |
| 190 } | 187 } |
| 191 | 188 |
| 192 void InjectedScript::getStepInPositions(ErrorString* errorString, v8::Local<v8:: Object> callFrames, const String& callFrameId, RefPtr<Array<TypeBuilder::Debugge r::Location>>& positions) | 189 void InjectedScript::getStepInPositions(ErrorString* errorString, v8::Local<v8:: Object> callFrames, const String& callFrameId, RefPtr<Array<TypeBuilder::Debugge r::Location>>& positions) |
| 193 { | 190 { |
| 194 ScriptFunctionCall function(injectedScriptObject(), "getStepInPositions"); | 191 ScriptFunctionCall function(injectedScriptObject(), "getStepInPositions"); |
| 195 function.appendArgument(callFrames); | 192 function.appendArgument(callFrames); |
| 196 function.appendArgument(callFrameId); | 193 function.appendArgument(callFrameId); |
| 197 RefPtr<JSONValue> resultValue; | 194 RefPtr<JSONValue> resultValue; |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 534 *exceptionDetails = TypeBuilder::Debugger::ExceptionDetails::create().se tText(text); | 531 *exceptionDetails = TypeBuilder::Debugger::ExceptionDetails::create().se tText(text); |
| 535 } else { | 532 } else { |
| 536 *result = toJSONValue(resultValue); | 533 *result = toJSONValue(resultValue); |
| 537 if (!*result) | 534 if (!*result) |
| 538 *result = JSONString::create(String::format("Object has too long ref erence chain(must not be longer than %d)", JSONValue::maxDepth)); | 535 *result = JSONString::create(String::format("Object has too long ref erence chain(must not be longer than %d)", JSONValue::maxDepth)); |
| 539 } | 536 } |
| 540 } | 537 } |
| 541 | 538 |
| 542 } // namespace blink | 539 } // namespace blink |
| 543 | 540 |
| OLD | NEW |