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

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

Issue 2198443004: [DevTools] Fix location.script().sourceURL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a Created 4 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
Index: third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
index a6c0fc9a7bc976947e8ff5e4ffc0755aa51946fc..95c131c887900aaa4e81c5e08d3d058ff748c343 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
@@ -24,6 +24,8 @@ WebInspector.FormatterScriptMapping.prototype = {
{
var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Location} */ (rawLocation);
var script = debuggerModelLocation.script();
+ if (!script)
+ return null;
var uiSourceCode = this._editorAction._uiSourceCodes.get(script);
if (!uiSourceCode)
return null;

Powered by Google App Engine
This is Rietveld 408576698