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

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

Issue 2931143003: DevTools: make debugger's rawLocationToUILocation return nullable type (Closed)
Patch Set: add test Created 3 years, 6 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/devtools/front_end/sources/SourcesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
index a7fc4e4212e97ce072d47c819b8933dddb1184b7..78168992f020d48b0446b380201b39ac6f4cfd31 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
@@ -1159,8 +1159,10 @@ Sources.SourcesPanel.DebuggerLocationRevealer = class {
reveal(rawLocation, omitFocus) {
if (!(rawLocation instanceof SDK.DebuggerModel.Location))
return Promise.reject(new Error('Internal error: not a debugger location'));
- Sources.SourcesPanel.instance().showUILocation(
- Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(rawLocation), omitFocus);
+ var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(rawLocation);
+ if (!uiLocation)
+ return Promise.resolve();
+ Sources.SourcesPanel.instance().showUILocation(uiLocation, omitFocus);
return Promise.resolve();
}
};

Powered by Google App Engine
This is Rietveld 408576698