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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js

Issue 1786243002: [DevTools] Move restartFrame and setCallFrameVariableValue to V8DebuggerAgent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dgozman-patch
Patch Set: Created 4 years, 9 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/platform/v8_inspector/InjectedScriptSource.js
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
index ff7566ac3483cbef8806294ca9448ab169b94404..52df6263e3eb134683dff6f4a134ea39f937ed3c 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
@@ -875,52 +875,6 @@ InjectedScript.prototype = {
},
/**
- * @param {!JavaScriptCallFrame} topCallFrame
- * @param {string} callFrameId
- * @return {*}
- */
- restartFrame: function(topCallFrame, callFrameId)
- {
- var callFrame = this._callFrameForId(topCallFrame, callFrameId);
- if (!callFrame)
- return "Could not find call frame with given id";
- return callFrame.restart();
- },
-
- /**
- * Either callFrameId or functionObjectId must be specified.
- * @param {!JavaScriptCallFrame} topCallFrame
- * @param {string|boolean} callFrameId or false
- * @param {string|boolean} functionObjectId or false
- * @param {number} scopeNumber
- * @param {string} variableName
- * @param {string} newValueJsonString RuntimeAgent.CallArgument structure serialized as string
- * @return {string|undefined} undefined if success or an error message
- */
- setVariableValue: function(topCallFrame, callFrameId, functionObjectId, scopeNumber, variableName, newValueJsonString)
- {
- try {
- var newValueJson = /** @type {!RuntimeAgent.CallArgument} */ (InjectedScriptHost.eval("(" + newValueJsonString + ")"));
- var resolvedValue = this._resolveCallArgument(newValueJson);
- if (typeof callFrameId === "string") {
- var callFrame = this._callFrameForId(topCallFrame, callFrameId);
- if (!callFrame)
- return "Could not find call frame with given id";
- callFrame.setVariableValue(scopeNumber, variableName, resolvedValue)
- } else {
- var parsedFunctionId = this._parseObjectId(/** @type {string} */ (functionObjectId));
- var func = this._objectForId(parsedFunctionId);
- if (typeof func !== "function")
- return "Could not resolve function by id";
- InjectedScriptHost.setFunctionVariableValue(func, scopeNumber, variableName, resolvedValue);
- }
- } catch (e) {
- return toString(e);
- }
- return undefined;
- },
-
- /**
* @return {!CommandLineAPI}
*/
commandLineAPI: function()

Powered by Google App Engine
This is Rietveld 408576698