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

Unified Diff: third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.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/snippets/ScriptSnippetModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js b/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js
index a6ed70a0d709bbafcffdda0cb5bec6aedb04f498..bcfb8663e98e0eed4b9853826c9859e782059955 100644
--- a/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js
@@ -479,9 +479,9 @@ Snippets.SnippetScriptMapping = class {
return;
var rawLocation =
/** @type {!SDK.DebuggerModel.Location} */ (this._debuggerModel.createRawLocation(script, 0, 0));
- var scriptUISourceCode = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(rawLocation).uiSourceCode;
- if (scriptUISourceCode)
- this._scriptSnippetModel._restoreBreakpoints(scriptUISourceCode, breakpointLocations);
+ var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(rawLocation);
+ if (uiLocation)
+ this._scriptSnippetModel._restoreBreakpoints(uiLocation.uiSourceCode, breakpointLocations);
}
};

Powered by Google App Engine
This is Rietveld 408576698