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

Unified Diff: Source/devtools/front_end/sources/SourcesPanel.js

Issue 402873002: DevTools: Build function details' raw location in DebuggerModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comment addressed Created 6 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/devtools/front_end/sdk/RemoteObject.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sources/SourcesPanel.js
diff --git a/Source/devtools/front_end/sources/SourcesPanel.js b/Source/devtools/front_end/sources/SourcesPanel.js
index 4ddc296d14b6b3927a81eba96f23c278a99cb44d..aa719827371d32adaecfc34a893fca64453e3da8 100644
--- a/Source/devtools/front_end/sources/SourcesPanel.js
+++ b/Source/devtools/front_end/sources/SourcesPanel.js
@@ -1075,27 +1075,24 @@ WebInspector.SourcesPanel.prototype = {
*/
_showFunctionDefinition: function(remoteObject)
{
- var target = remoteObject.target();
+ var debuggerModel = remoteObject.target().debuggerModel;
/**
- * @param {?Protocol.Error} error
- * @param {!DebuggerAgent.FunctionDetails} response
+ * @param {?WebInspector.DebuggerModel.FunctionDetails} response
* @this {WebInspector.SourcesPanel}
*/
- function didGetFunctionDetails(error, response)
+ function didGetFunctionDetails(response)
{
- if (error) {
- console.error(error);
+ if (!response || !response.location)
return;
- }
- var uiLocation = target.debuggerModel.rawLocationToUILocation(response.location);
+ var uiLocation = debuggerModel.rawLocationToUILocation(response.location);
if (!uiLocation)
return;
this.showUILocation(uiLocation, true);
}
- target.debuggerAgent().getFunctionDetails(remoteObject.objectId, didGetFunctionDetails.bind(this));
+ debuggerModel.functionDetails(remoteObject, didGetFunctionDetails.bind(this));
},
showGoToSourceDialog: function()
« no previous file with comments | « Source/devtools/front_end/sdk/RemoteObject.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698