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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 var sourceURL = script ? script.contentURL() : null; 801 var sourceURL = script ? script.contentURL() : null;
802 callback({location: rawLocation, sourceURL: sourceURL, functionName: response.functionName, scopeChain: response.scopeChain || null}); 802 callback({location: rawLocation, sourceURL: sourceURL, functionName: response.functionName, scopeChain: response.scopeChain || null});
803 } 803 }
804 }, 804 },
805 805
806 /** 806 /**
807 * @param {number} scopeNumber 807 * @param {number} scopeNumber
808 * @param {string} variableName 808 * @param {string} variableName
809 * @param {!RuntimeAgent.CallArgument} newValue 809 * @param {!RuntimeAgent.CallArgument} newValue
810 * @param {string} callFrameId 810 * @param {string} callFrameId
811 * @param {string} functionObjectId
812 * @param {function(string=)=} callback 811 * @param {function(string=)=} callback
813 */ 812 */
814 setVariableValue: function(scopeNumber, variableName, newValue, callFrameId, functionObjectId, callback) 813 setVariableValue: function(scopeNumber, variableName, newValue, callFrameId, callback)
815 { 814 {
816 this._agent.setVariableValue(scopeNumber, variableName, newValue, callFr ameId, functionObjectId, innerCallback); 815 this._agent.setVariableValue(scopeNumber, variableName, newValue, callFr ameId, innerCallback);
817 816
818 /** 817 /**
819 * @param {?Protocol.Error} error 818 * @param {?Protocol.Error} error
820 */ 819 */
821 function innerCallback(error) 820 function innerCallback(error)
822 { 821 {
823 if (error) { 822 if (error) {
824 console.error(error); 823 console.error(error);
825 if (callback) 824 if (callback)
826 callback(error); 825 callback(error);
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 * @return {!WebInspector.RemoteObject} 1368 * @return {!WebInspector.RemoteObject}
1370 */ 1369 */
1371 object: function() 1370 object: function()
1372 { 1371 {
1373 if (this._object) 1372 if (this._object)
1374 return this._object; 1373 return this._object;
1375 var runtimeModel = this._callFrame.target().runtimeModel; 1374 var runtimeModel = this._callFrame.target().runtimeModel;
1376 1375
1377 var declarativeScope = this._type !== DebuggerAgent.ScopeType.With && th is._type !== DebuggerAgent.ScopeType.Global; 1376 var declarativeScope = this._type !== DebuggerAgent.ScopeType.With && th is._type !== DebuggerAgent.ScopeType.Global;
1378 if (declarativeScope) 1377 if (declarativeScope)
1379 this._object = runtimeModel.createScopeRemoteObject(this._payload.ob ject, new WebInspector.ScopeRef(this._ordinal, this._callFrame.id, undefined)); 1378 this._object = runtimeModel.createScopeRemoteObject(this._payload.ob ject, new WebInspector.ScopeRef(this._ordinal, this._callFrame.id));
1380 else 1379 else
1381 this._object = runtimeModel.createRemoteObject(this._payload.object) ; 1380 this._object = runtimeModel.createRemoteObject(this._payload.object) ;
1382 1381
1383 return this._object; 1382 return this._object;
1384 }, 1383 },
1385 1384
1386 /** 1385 /**
1387 * @return {string} 1386 * @return {string}
1388 */ 1387 */
1389 description: function() 1388 description: function()
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 /** 1444 /**
1446 * @param {?WebInspector.Target} target 1445 * @param {?WebInspector.Target} target
1447 * @return {?WebInspector.DebuggerModel} 1446 * @return {?WebInspector.DebuggerModel}
1448 */ 1447 */
1449 WebInspector.DebuggerModel.fromTarget = function(target) 1448 WebInspector.DebuggerModel.fromTarget = function(target)
1450 { 1449 {
1451 if (!target || !target.hasJSContext()) 1450 if (!target || !target.hasJSContext())
1452 return null; 1451 return null;
1453 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel)); 1452 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel));
1454 } 1453 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698