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

Unified Diff: Source/devtools/front_end/inspector.js

Issue 23692002: DevTools: Dump function location when printing it in console and support inspect() for functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed test Created 7 years, 4 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/StylesSidebarPane.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/inspector.js
diff --git a/Source/devtools/front_end/inspector.js b/Source/devtools/front_end/inspector.js
index 93c556774f4eeafc9c3fc94385c001ed6f199f83..277f4a59192b0b3436b18063bb6f6750182a725e 100644
--- a/Source/devtools/front_end/inspector.js
+++ b/Source/devtools/front_end/inspector.js
@@ -1017,6 +1017,26 @@ WebInspector.inspect = function(payload, hints)
return;
}
+ if (object.type === "function") {
+ function didGetDetails(error, response)
+ {
+ object.release();
+
+ if (error) {
+ console.error(error);
+ return;
+ }
+
+ var uiLocation = WebInspector.debuggerModel.rawLocationToUILocation(response.location);
+ if (!uiLocation)
+ return;
+
+ WebInspector.showPanel("scripts").showUILocation(uiLocation);
+ }
+ DebuggerAgent.getFunctionDetails(object.objectId, didGetDetails.bind(this));
+ return;
+ }
+
if (hints.databaseId)
WebInspector.showPanel("resources").selectDatabase(WebInspector.databaseModel.databaseForId(hints.databaseId));
else if (hints.domStorageId)
« no previous file with comments | « Source/devtools/front_end/StylesSidebarPane.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698