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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js

Issue 2397063002: [DevTools] Fixed breakpoints in hotreloaded scripts (Closed)
Patch Set: Created 4 years, 2 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 | « third_party/WebKit/LayoutTests/inspector/sources/dont-diverge-script-evaluated-twice-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
index 5a8e683a125c049e693a88650522eefc79974d61..1f917072376661342114355ee411f048fa6b662f 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
@@ -90,7 +90,7 @@ WebInspector.ResourceScriptMapping.prototype = {
{
var scripts = this._scriptsForUISourceCode(uiSourceCode);
console.assert(scripts.length);
- var script = scripts[0];
+ var script = scripts[scripts.length - 1];
if (script.isInlineScriptWithSourceURL())
return this._debuggerModel.createRawLocation(script, lineNumber + script.lineOffset, lineNumber ? columnNumber : columnNumber + script.columnOffset);
return this._debuggerModel.createRawLocation(script, lineNumber, columnNumber);
@@ -290,7 +290,7 @@ WebInspector.ResourceScriptFile = function(resourceScriptMapping, uiSourceCode,
this._uiSourceCode.forceLoadOnCheckContent();
if (this._uiSourceCode.contentType().isScript())
- this._script = scripts[0];
+ this._script = scripts[scripts.length - 1];
this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._workingCopyChanged, this);
this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this);
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/sources/dont-diverge-script-evaluated-twice-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698