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

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

Issue 220903002: DevTools: wrap DebuggerAgent.Location with DebuggerModel.Location. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: All tests!!! Created 6 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
« no previous file with comments | « Source/devtools/front_end/LiveEditSupport.js ('k') | Source/devtools/front_end/ObjectPopoverHelper.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/Main.js
diff --git a/Source/devtools/front_end/Main.js b/Source/devtools/front_end/Main.js
index 7eddeb340370aa2db135214e2d8add5f631885bc..f3620add6160a7d8815ea608041a87f7c466d7b4 100644
--- a/Source/devtools/front_end/Main.js
+++ b/Source/devtools/front_end/Main.js
@@ -367,7 +367,7 @@ WebInspector.Main.prototype = {
WebInspector.databaseModel = new WebInspector.DatabaseModel();
WebInspector.domStorageModel = new WebInspector.DOMStorageModel();
- WebInspector.cpuProfilerModel = new WebInspector.CPUProfilerModel();
+ WebInspector.cpuProfilerModel = new WebInspector.CPUProfilerModel(mainTarget);
InspectorAgent.enable(inspectorAgentEnableCallback.bind(this));
@@ -613,25 +613,21 @@ WebInspector.Main.prototype = {
* @param {?Protocol.Error} error
* @param {!DebuggerAgent.FunctionDetails} response
*/
- DebuggerAgent.getFunctionDetails(object.objectId, didGetDetails);
+ object.functionDetails(didGetDetails);
return;
}
- function didGetDetails(error, response)
+ /**
+ * @param {?DebuggerAgent.FunctionDetails} response
+ */
+ function didGetDetails(response)
{
object.release();
- if (error) {
- console.error(error);
- return;
- }
-
- var uiLocation = WebInspector.debuggerModel.rawLocationToUILocation(response.location);
- if (!uiLocation)
+ if (!response)
return;
- // FIXME: Dependency violation.
- /** @type {!WebInspector.SourcesPanel} */ (WebInspector.inspectorView.panel("sources")).showUILocation(uiLocation, true);
+ WebInspector.Revealer.reveal(WebInspector.DebuggerModel.Location.fromPayload(object.target(), response.location).toUILocation());
}
if (hints.copyToClipboard)
« no previous file with comments | « Source/devtools/front_end/LiveEditSupport.js ('k') | Source/devtools/front_end/ObjectPopoverHelper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698