Title: [116846] trunk
Revision
116846
Author
[email protected]
Date
2012-05-12 03:02:53 -0700 (Sat, 12 May 2012)

Log Message

Web Inspector: remove UISourceCode.id since it is no longer used.
https://bugs.webkit.org/show_bug.cgi?id=86286

Reviewed by Vsevolod Vlasov.

Source/WebCore:

We are now using breakpointStorageId property for breakpoint persistence.

* inspector/front-end/BreakpointManager.js:
(WebInspector.BreakpointManager):
(WebInspector.BreakpointManager.prototype._debuggerReset):
(WebInspector.BreakpointManager.prototype._uiLocationAdded.get if):
(WebInspector.BreakpointManager.prototype._uiLocationAdded):
(WebInspector.BreakpointManager.prototype._uiLocationRemoved.get if):
(WebInspector.BreakpointManager.prototype._uiLocationRemoved):
* inspector/front-end/CompilerScriptMapping.js:
* inspector/front-end/_javascript_Source.js:
(WebInspector._javascript_Source):
* inspector/front-end/RawSourceCode.js:
(WebInspector.RawSourceCode):
(WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
(WebInspector.RawSourceCode.prototype._createUISourceCode):
(WebInspector.RawSourceCode.prototype._finishedLoading):
* inspector/front-end/SnippetsModel.js:
(WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
(WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode):

LayoutTests:

* inspector/debugger/breakpoint-manager.html:
* inspector/debugger/raw-source-code.html:
* inspector/debugger/scripts-file-selector.html:
* inspector/debugger/scripts-panel.html:
* inspector/debugger/scripts-sorting.html:
* inspector/debugger/ui-source-code-display-name.html:
* inspector/debugger/ui-source-code.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (116845 => 116846)


--- trunk/LayoutTests/ChangeLog	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/LayoutTests/ChangeLog	2012-05-12 10:02:53 UTC (rev 116846)
@@ -1,3 +1,18 @@
+2012-05-12  Pavel Feldman  <[email protected]>
+
+        Web Inspector: remove UISourceCode.id since it is no longer used.
+        https://bugs.webkit.org/show_bug.cgi?id=86286
+
+        Reviewed by Vsevolod Vlasov.
+
+        * inspector/debugger/breakpoint-manager.html:
+        * inspector/debugger/raw-source-code.html:
+        * inspector/debugger/scripts-file-selector.html:
+        * inspector/debugger/scripts-panel.html:
+        * inspector/debugger/scripts-sorting.html:
+        * inspector/debugger/ui-source-code-display-name.html:
+        * inspector/debugger/ui-source-code.html:
+
 2012-05-12  Kent Tamura  <[email protected]>
 
         [Chromium] Test expectation update.

Modified: trunk/LayoutTests/inspector/debugger/breakpoint-manager-expected.txt (116845 => 116846)


--- trunk/LayoutTests/inspector/debugger/breakpoint-manager-expected.txt	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-manager-expected.txt	2012-05-12 10:02:53 UTC (rev 116846)
@@ -4,7 +4,7 @@
 Running: testSetBreakpoint
   Created breakpoints manager
   Dumping Storage
-  Adding UISourceCode: a.js (url=""
+  Adding UISourceCode: a.js)
   Setting breakpoint at a.js:30 enabled:true condition:
     debuggerModel.setBreakpoint(a.js:30:)
     breakpointAdded(a.js, 30, , true)
@@ -19,7 +19,7 @@
 Running: testSetDisabledBreakpoint
   Created breakpoints manager
   Dumping Storage
-  Adding UISourceCode: a.js (url=""
+  Adding UISourceCode: a.js)
   Setting breakpoint at a.js:30 enabled:false condition:
     breakpointAdded(a.js, 30, , false)
   Dumping Storage
@@ -39,7 +39,7 @@
 Running: testSetConditionalBreakpoint
   Created breakpoints manager
   Dumping Storage
-  Adding UISourceCode: a.js (url=""
+  Adding UISourceCode: a.js)
   Setting breakpoint at a.js:30 enabled:true condition:condition
     debuggerModel.setBreakpoint(a.js:30:condition)
     breakpointAdded(a.js, 30, condition, true)
@@ -66,7 +66,7 @@
     a.js:10 enabled:true condition:foo == bar
     a.js:20 enabled:false condition:
     b.js:3 enabled:true condition:
-  Adding UISourceCode: a.js (url=""
+  Adding UISourceCode: a.js)
     debuggerModel.setBreakpoint(a.js:10:foo == bar)
     breakpointAdded(a.js, 10, foo == bar, true)
     Location created: a.js:10
@@ -87,12 +87,12 @@
     a.js:10 enabled:true condition:foo == bar
     a.js:20 enabled:false condition:
     b.js:3 enabled:true condition:
-  Adding UISourceCode: a.js (url=""
+  Adding UISourceCode: a.js)
     debuggerModel.setBreakpoint(a.js:10:foo == bar)
     breakpointAdded(a.js, 10, foo == bar, true)
     Location created: a.js:10
     breakpointAdded(a.js, 20, , false)
-  Adding UISourceCode: a.js (url=""
+  Adding UISourceCode: a.js)
   Dumping Storage
     a.js:10 enabled:true condition:foo == bar
     a.js:20 enabled:false condition:
@@ -109,7 +109,7 @@
     a.js:10 enabled:true condition:foo == bar
     a.js:20 enabled:false condition:
     b.js:3 enabled:true condition:
-  Adding UISourceCode: a.js (url=""
+  Adding UISourceCode: a.js)
     debuggerModel.setBreakpoint(a.js:10:foo == bar)
     breakpointAdded(a.js, 10, foo == bar, true)
     Location created: a.js:10
@@ -135,7 +135,7 @@
 Running: testSetBreakpointThatShifts
   Created breakpoints manager
   Dumping Storage
-  Adding UISourceCode: a.js (url=""
+  Adding UISourceCode: a.js)
   Setting breakpoint at a.js:1015 enabled:true condition:
     debuggerModel.setBreakpoint(a.js:1015:)
     breakpointAdded(a.js, 1025, , true)
@@ -150,7 +150,7 @@
 Running: testSetBreakpointThatShiftsTwice
   Created breakpoints manager
   Dumping Storage
-  Adding UISourceCode: a.js (url=""
+  Adding UISourceCode: a.js)
   Setting breakpoint at a.js:1015 enabled:true condition:
     debuggerModel.setBreakpoint(a.js:1015:)
     breakpointAdded(a.js, 1025, , true)
@@ -166,7 +166,7 @@
 Running: testSetBreakpointOutsideScript
   Created breakpoints manager
   Dumping Storage
-  Adding UISourceCode: a.js (url=""
+  Adding UISourceCode: a.js)
     debuggerModel.setBreakpoint(a.js:2500:)
     breakpointAdded(a.js, 2500, , true)
   Dumping Storage
@@ -181,7 +181,7 @@
     a.js:10 enabled:true condition:foo == bar
     a.js:20 enabled:false condition:
     b.js:3 enabled:true condition:
-  Adding UISourceCode: a.js (url=""
+  Adding UISourceCode: a.js)
     debuggerModel.setBreakpoint(a.js:10:foo == bar)
     breakpointAdded(a.js, 10, foo == bar, true)
     Location created: a.js:10
@@ -192,7 +192,7 @@
     breakpointRemoved(a.js, 10)
     Location disposed: a.js:10
     breakpointRemoved(a.js, 20)
-  Adding UISourceCode: b.js (url=""
+  Adding UISourceCode: b.js)
     debuggerModel.setBreakpoint(b.js:3:)
     breakpointAdded(b.js, 3, , true)
     Location created: b.js:3
@@ -202,7 +202,7 @@
     breakpointRemoved(b.js, 3)
     Location disposed: b.js:3
   Resolving provisional breakpoint.
-  Adding UISourceCode: a.js (url=""
+  Adding UISourceCode: a.js)
     debuggerModel.removeBreakpoint(a.js:10)
     debuggerModel.setBreakpoint(a.js:10:foo == bar)
     breakpointAdded(a.js, 10, foo == bar, true)
@@ -224,7 +224,7 @@
   Dumping Storage
     a.js:10 enabled:true condition:foo == bar
     a.js:20 enabled:true condition:
-  Adding UISourceCode: a.js (url=""
+  Adding UISourceCode: a.js)
     debuggerModel.setBreakpoint(a.js:10:foo == bar)
     breakpointAdded(a.js, 10, foo == bar, true)
     Location created: a.js:10
@@ -258,7 +258,7 @@
   Created breakpoints manager
   Dumping Storage
     a.js:10 enabled:true condition:foo == bar
-  Adding UISourceCode: a.js (url=""
+  Adding UISourceCode: a.js)
     debuggerModel.setBreakpoint(a.js:10:foo == bar)
     breakpointAdded(a.js, 10, foo == bar, true)
     Location created: a.js:10

Modified: trunk/LayoutTests/inspector/debugger/breakpoint-manager.html (116845 => 116846)


--- trunk/LayoutTests/inspector/debugger/breakpoint-manager.html	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/LayoutTests/inspector/debugger/breakpoint-manager.html	2012-05-12 10:02:53 UTC (rev 116846)
@@ -6,29 +6,29 @@
 
 function test()
 {
+    var uiSourceCodes = {};
+
     var defaultMapping = {
         rawLocationToUILocation: function(rawLocation)
         {
-            var uiSourceCode = new WebInspector.UISourceCode(rawLocation.scriptId, rawLocation.scriptId, null, this);
-            return new WebInspector.UILocation(uiSourceCode, rawLocation.lineNumber, 0);
+            return new WebInspector.UILocation(uiSourceCodes[rawLocation.scriptId], rawLocation.lineNumber, 0);
         },
 
         uiLocationToRawLocation: function(uiSourceCode, lineNumber)
         {
-            return { scriptId: uiSourceCode.id, lineNumber: lineNumber, columnNumber: 0 };
+            return { scriptId: uiSourceCode.url, lineNumber: lineNumber, columnNumber: 0 };
         }
     };
 
     var shiftingMapping = {
         rawLocationToUILocation: function(rawLocation)
         {
-            var uiSourceCode = new WebInspector.UISourceCode(rawLocation.scriptId, rawLocation.scriptId, null, this);
-            return new WebInspector.UILocation(uiSourceCode, rawLocation.lineNumber + 10, 0);
+            return new WebInspector.UILocation(uiSourceCodes[rawLocation.scriptId], rawLocation.lineNumber + 10, 0);
         },
 
         uiLocationToRawLocation: function(uiSourceCode, lineNumber)
         {
-            return { scriptId: uiSourceCode.id, lineNumber: lineNumber - 10, columnNumber: 0 };
+            return { scriptId: uiSourceCode.url, lineNumber: lineNumber - 10, columnNumber: 0 };
         }
     };
 
@@ -114,13 +114,13 @@
     {
         var breakpoint = event.data.breakpoint;
         var uiLocation = event.data.uiLocation;
-        InspectorTest.addResult("    breakpointAdded(" + [uiLocation.uiSourceCode.id, uiLocation.lineNumber, breakpoint.condition(), breakpoint.enabled()].join(", ") + ")");
+        InspectorTest.addResult("    breakpointAdded(" + [uiLocation.uiSourceCode.url, uiLocation.lineNumber, breakpoint.condition(), breakpoint.enabled()].join(", ") + ")");
     }
 
     function breakpointRemoved(event)
     {
         var uiLocation = event.data.uiLocation;
-        InspectorTest.addResult("    breakpointRemoved(" + [uiLocation.uiSourceCode.id, uiLocation.lineNumber].join(", ") + ")");
+        InspectorTest.addResult("    breakpointRemoved(" + [uiLocation.uiSourceCode.url, uiLocation.lineNumber].join(", ") + ")");
     }
 
     InspectorTest.addSniffer(WebInspector.Script.prototype, "createLiveLocation", function(rawLocation)
@@ -132,11 +132,12 @@
         InspectorTest.addResult("    Location disposed: " + this._rawLocation.scriptId + ":" + this._rawLocation.lineNumber);
     }, true);
 
-    function addUISourceCode(breakpointManager, id, url)
+    function addUISourceCode(breakpointManager, url)
     {
-        breakpointManager._debuggerModel._addScript(id, url);
-        InspectorTest.addResult("  Adding UISourceCode: " + id + " (url="" + (url || id) + ")");
-        var uiSourceCode = new WebInspector._javascript_Source(id, url || id, null, defaultMapping);
+        breakpointManager._debuggerModel._addScript(url, url);
+        InspectorTest.addResult("  Adding UISourceCode: " + url + ")");
+        var uiSourceCode = new WebInspector._javascript_Source(url, null, defaultMapping);
+        uiSourceCodes[url] = uiSourceCode;
         breakpointManager.restoreBreakpoints(uiSourceCode);
         return uiSourceCode;
     }
@@ -171,13 +172,13 @@
 
     function setBreakpoint(breakpointManager, uiSourceCode, lineNumber, condition, enabled)
     {
-        InspectorTest.addResult("  Setting breakpoint at " + uiSourceCode.id + ":" + lineNumber + " enabled:" + enabled + " condition:" + condition);
+        InspectorTest.addResult("  Setting breakpoint at " + uiSourceCode.url + ":" + lineNumber + " enabled:" + enabled + " condition:" + condition);
         return breakpointManager.setBreakpoint(uiSourceCode, lineNumber, condition, enabled);
     }
 
     function removeBreakpoint(breakpointManager, uiSourceCode, lineNumber)
     {
-        InspectorTest.addResult("  Removing breakpoint at " + uiSourceCode.id + ":" + lineNumber);
+        InspectorTest.addResult("  Removing breakpoint at " + uiSourceCode.url + ":" + lineNumber);
         breakpointManager.findBreakpoint(uiSourceCode, lineNumber).remove();
     }
 
@@ -194,6 +195,7 @@
         dumpBreakpointStorage(breakpointManager);
         InspectorTest.addResult("  Resetting breakpoint manager");
         breakpointManager.reset();
+        uiSourceCodes = {};
         next();
     }
 

Modified: trunk/LayoutTests/inspector/debugger/raw-source-code.html (116845 => 116846)


--- trunk/LayoutTests/inspector/debugger/raw-source-code.html	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/LayoutTests/inspector/debugger/raw-source-code.html	2012-05-12 10:02:53 UTC (rev 116846)
@@ -97,7 +97,7 @@
             var rawSourceCode = createRawSourceCode(script, null);
 
             var uiSourceCode = rawSourceCode.uiSourceCode();
-            InspectorTest.addResult("UISourceCode: " + rawSourceCode.uiSourceCode().id);
+            InspectorTest.addResult("UISourceCode: " + rawSourceCode.uiSourceCode().url);
             InspectorTest.addResult("UISourceCode is content script: " + uiSourceCode.isContentScript);
             InspectorTest.checkUILocation(uiSourceCode, 0, 5, rawSourceCode.rawLocationToUILocation(createRawLocation(0, 5)));
             InspectorTest.checkRawLocation(script, 10, 0, rawSourceCode.uiLocationToRawLocation(uiSourceCode, 10, 0));

Modified: trunk/LayoutTests/inspector/debugger/scripts-file-selector.html (116845 => 116846)


--- trunk/LayoutTests/inspector/debugger/scripts-file-selector.html	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/LayoutTests/inspector/debugger/scripts-file-selector.html	2012-05-12 10:02:53 UTC (rev 116846)
@@ -13,7 +13,7 @@
 
     function addUISourceCode(url, isContentScript)
     {
-        var uiSourceCode = new WebInspector.UISourceCode(0, url, null, null);
+        var uiSourceCode = new WebInspector.UISourceCode(url, null, null);
         uiSourceCode.isContentScript = isContentScript;
         navigatorFileSelector.addUISourceCode(uiSourceCode);
     }

Modified: trunk/LayoutTests/inspector/debugger/scripts-panel.html (116845 => 116846)


--- trunk/LayoutTests/inspector/debugger/scripts-panel.html	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/LayoutTests/inspector/debugger/scripts-panel.html	2012-05-12 10:02:53 UTC (rev 116846)
@@ -49,7 +49,7 @@
     }
     function createUISouceCode(url)
     {
-        var uiSourceCode = new WebInspector._javascript_Source(0, url, null, null);
+        var uiSourceCode = new WebInspector._javascript_Source(url, null, null);
         uiSourceCode.requestContent = function(callback)
         {
             InspectorTest.addResult("Source requested for " + url);

Modified: trunk/LayoutTests/inspector/debugger/scripts-sorting.html (116845 => 116846)


--- trunk/LayoutTests/inspector/debugger/scripts-sorting.html	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/LayoutTests/inspector/debugger/scripts-sorting.html	2012-05-12 10:02:53 UTC (rev 116846)
@@ -11,10 +11,9 @@
 
     var navigatorFileSelector = new WebInspector.ScriptsNavigator();
 
-    var nextId = 1;
     function addUISourceCode(url, isContentScript)
     {
-        var uiSourceCode = new WebInspector.UISourceCode(nextId++, url, null, null);
+        var uiSourceCode = new WebInspector.UISourceCode(url, null, null);
         uiSourceCode.isContentScript = isContentScript;
         navigatorFileSelector.addUISourceCode(uiSourceCode);
     }

Modified: trunk/LayoutTests/inspector/debugger/ui-source-code-display-name.html (116845 => 116846)


--- trunk/LayoutTests/inspector/debugger/ui-source-code-display-name.html	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/LayoutTests/inspector/debugger/ui-source-code-display-name.html	2012-05-12 10:02:53 UTC (rev 116846)
@@ -6,7 +6,7 @@
 {
     function dumpUISourceCodeDisplayName(url)
     {
-        var uiSourceCode = new WebInspector.UISourceCode("id", url, null, null);
+        var uiSourceCode = new WebInspector.UISourceCode(url, null, null);
         InspectorTest.addResult("UISourceCode display name for url \"" + url + "\" is \"" + WebInspector.TabbedEditorContainer.prototype._titleForFile(uiSourceCode) + "\".");
     }
 

Modified: trunk/LayoutTests/inspector/debugger/ui-source-code.html (116845 => 116846)


--- trunk/LayoutTests/inspector/debugger/ui-source-code.html	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/LayoutTests/inspector/debugger/ui-source-code.html	2012-05-12 10:02:53 UTC (rev 116846)
@@ -17,7 +17,7 @@
     InspectorTest.runTestSuite([
         function testUISourceCode(next)
         {
-            var uiSourceCode = new WebInspector.UISourceCode("id", "url", contentProvider);
+            var uiSourceCode = new WebInspector.UISourceCode("url", contentProvider);
             function didRequestContent(callNumber, content, contentEncoded, mimeType)
             {
                 InspectorTest.addResult("Callback " + callNumber + " is invoked.");

Modified: trunk/Source/WebCore/ChangeLog (116845 => 116846)


--- trunk/Source/WebCore/ChangeLog	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/Source/WebCore/ChangeLog	2012-05-12 10:02:53 UTC (rev 116846)
@@ -1,5 +1,35 @@
 2012-05-12  Pavel Feldman  <[email protected]>
 
+        Web Inspector: remove UISourceCode.id since it is no longer used.
+        https://bugs.webkit.org/show_bug.cgi?id=86286
+
+        Reviewed by Vsevolod Vlasov.
+
+        We are now using breakpointStorageId property for breakpoint persistence.
+
+        * inspector/front-end/BreakpointManager.js:
+        (WebInspector.BreakpointManager):
+        (WebInspector.BreakpointManager.prototype._debuggerReset):
+        (WebInspector.BreakpointManager.prototype._uiLocationAdded.get if):
+        (WebInspector.BreakpointManager.prototype._uiLocationAdded):
+        (WebInspector.BreakpointManager.prototype._uiLocationRemoved.get if):
+        (WebInspector.BreakpointManager.prototype._uiLocationRemoved):
+        * inspector/front-end/CompilerScriptMapping.js:
+        * inspector/front-end/_javascript_Source.js:
+        (WebInspector._javascript_Source):
+        * inspector/front-end/RawSourceCode.js:
+        (WebInspector.RawSourceCode):
+        (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
+        (WebInspector.RawSourceCode.prototype._createUISourceCode):
+        (WebInspector.RawSourceCode.prototype._finishedLoading):
+        * inspector/front-end/SnippetsModel.js:
+        (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
+        (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
+        * inspector/front-end/UISourceCode.js:
+        (WebInspector.UISourceCode):
+
+2012-05-12  Pavel Feldman  <[email protected]>
+
         Web Inspector: merge MainScriptMapping into DebuggerPresentationModel; move other classes into their own files.
         https://bugs.webkit.org/show_bug.cgi?id=86285
 

Modified: trunk/Source/WebCore/inspector/front-end/BreakpointManager.js (116845 => 116846)


--- trunk/Source/WebCore/inspector/front-end/BreakpointManager.js	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/Source/WebCore/inspector/front-end/BreakpointManager.js	2012-05-12 10:02:53 UTC (rev 116846)
@@ -41,7 +41,7 @@
 
     this._breakpoints = [];
     this._breakpointForDebuggerId = {};
-    this._breakpointsForUILocation = {};
+    this._breakpointsForUISourceCode = new Map();
     this._sourceFilesWithRestoredBreakpoints = {};
 
     this._debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.BreakpointResolved, this._breakpointResolved, this);
@@ -114,8 +114,9 @@
      */
     findBreakpoint: function(uiSourceCode, lineNumber)
     {
-        var breakpoints = this._breakpointsForUILocation[uiSourceCode.id + ":" + lineNumber];
-        return breakpoints ? breakpoints[0] : null;
+        var breakpoints = this._breakpointsForUISourceCode.get(uiSourceCode);
+        var lineBreakpoints = breakpoints ? breakpoints[lineNumber] : null;
+        return lineBreakpoints ? lineBreakpoints[0] : null;
     },
 
     /**
@@ -166,7 +167,7 @@
             breakpoints[i]._isProvisional = true;
         }
         this._breakpoints = [];
-        this._breakpointsForUILocation = {};
+        this._breakpointsForUISourceCode.clear();
         this._sourceFilesWithRestoredBreakpoints = {};
     },
 
@@ -198,13 +199,19 @@
      */
     _uiLocationAdded: function(breakpoint, uiLocation)
     {
-        var key = uiLocation.uiSourceCode.id + ":" + uiLocation.lineNumber;
-        var breakpoints = this._breakpointsForUILocation[key];
+        var breakpoints = this._breakpointsForUISourceCode.get(uiLocation.uiSourceCode);
         if (!breakpoints) {
-            breakpoints = [];
-            this._breakpointsForUILocation[key] = breakpoints;
+            breakpoints = {};
+            this._breakpointsForUISourceCode.put(uiLocation.uiSourceCode, breakpoints);
         }
-        breakpoints.push(breakpoint);
+
+        var lineBreakpoints = breakpoints[uiLocation.lineNumber];
+        if (!lineBreakpoints) {
+            lineBreakpoints = [];
+            breakpoints[uiLocation.lineNumber] = lineBreakpoints;
+        }
+
+        lineBreakpoints.push(breakpoint);
         this.dispatchEventToListeners(WebInspector.BreakpointManager.Events.BreakpointAdded, {breakpoint: breakpoint, uiLocation: uiLocation});
     },
 
@@ -214,13 +221,17 @@
      */
     _uiLocationRemoved: function(breakpoint, uiLocation)
     {
-        var key = uiLocation.uiSourceCode.id + ":" + uiLocation.lineNumber;
-        var breakpoints = this._breakpointsForUILocation[key];
+      var breakpoints = this._breakpointsForUISourceCode.get(uiLocation.uiSourceCode);
         if (!breakpoints)
             return;
-        breakpoints.remove(breakpoint);
-        if (!breakpoints.length)
-            delete this._breakpointsForUILocation[key];
+
+        var lineBreakpoints = breakpoints[uiLocation.lineNumber];
+        if (!lineBreakpoints)
+            return;
+
+        lineBreakpoints.remove(breakpoint);
+        if (!lineBreakpoints.length)
+            delete breakpoints[uiLocation.lineNumber];
         this.dispatchEventToListeners(WebInspector.BreakpointManager.Events.BreakpointRemoved, {breakpoint: breakpoint, uiLocation: uiLocation});
     }
 }

Modified: trunk/Source/WebCore/inspector/front-end/CompilerScriptMapping.js (116845 => 116846)


--- trunk/Source/WebCore/inspector/front-end/CompilerScriptMapping.js	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/Source/WebCore/inspector/front-end/CompilerScriptMapping.js	2012-05-12 10:02:53 UTC (rev 116846)
@@ -116,7 +116,7 @@
                 contentProvider = new WebInspector.StaticContentProvider("text/_javascript_", sourceContent);
             else
                 contentProvider = new WebInspector.CompilerSourceMappingContentProvider(sourceURL);
-            var uiSourceCode = new WebInspector._javascript_Source(sourceURL, sourceURL, contentProvider, this);
+            var uiSourceCode = new WebInspector._javascript_Source(sourceURL, contentProvider, this);
             uiSourceCode.isContentScript = script.isContentScript;
             uiSourceCode.isEditable = false;
             this._uiSourceCodeByURL[sourceURL] = uiSourceCode;

Modified: trunk/Source/WebCore/inspector/front-end/_javascript_Source.js (116845 => 116846)


--- trunk/Source/WebCore/inspector/front-end/_javascript_Source.js	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/Source/WebCore/inspector/front-end/_javascript_Source.js	2012-05-12 10:02:53 UTC (rev 116846)
@@ -31,14 +31,13 @@
 /**
  * @constructor
  * @extends {WebInspector.UISourceCode}
- * @param {string} id
  * @param {string} url
  * @param {WebInspector.ContentProvider} contentProvider
  * @param {WebInspector.SourceMapping} sourceMapping
  */
-WebInspector._javascript_Source = function(id, url, contentProvider, sourceMapping)
+WebInspector._javascript_Source = function(url, contentProvider, sourceMapping)
 {
-    WebInspector.UISourceCode.call(this, id, url, contentProvider, sourceMapping);
+    WebInspector.UISourceCode.call(this, url, contentProvider, sourceMapping);
 
     this._formatterMapping = new WebInspector.IdentityFormatterSourceMapping();
     // FIXME: postpone breakpoints restore to after the mapping has been established.

Modified: trunk/Source/WebCore/inspector/front-end/RawSourceCode.js (116845 => 116846)


--- trunk/Source/WebCore/inspector/front-end/RawSourceCode.js	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/Source/WebCore/inspector/front-end/RawSourceCode.js	2012-05-12 10:02:53 UTC (rev 116846)
@@ -54,7 +54,7 @@
     if (this._pendingRequest)
         this._pendingRequest.addEventListener(WebInspector.NetworkRequest.Events.FinishedLoading, this._finishedLoading, this);
     else
-        this._uiSourceCode = this._createUISourceCode(this.url);
+        this._uiSourceCode = this._createUISourceCode();
 }
 
 WebInspector.RawSourceCode.Events = {
@@ -78,7 +78,7 @@
     {
         var uiSourceCode = this._uiSourceCode || this._temporaryUISourceCode;
         if (!uiSourceCode) {
-            this._temporaryUISourceCode = this._createUISourceCode("tmp-" + this.url);
+            this._temporaryUISourceCode = this._createUISourceCode();
             uiSourceCode = this._temporaryUISourceCode;
             this.dispatchEventToListeners(WebInspector.RawSourceCode.Events.UISourceCodeChanged, { uiSourceCode: uiSourceCode });
         }
@@ -86,10 +86,9 @@
     },
 
     /**
-     * @param {string} id
      * @return {WebInspector.UISourceCode}
      */
-    _createUISourceCode: function(id)
+    _createUISourceCode: function()
     {
         var isStandaloneScript = this._scripts.length === 1 && !this._scripts[0].isInlineScript();
 
@@ -101,7 +100,7 @@
         else
             contentProvider = new WebInspector.ConcatenatedScriptsContentProvider(this._scripts);
 
-        var uiSourceCode = new WebInspector._javascript_Source(id, this.url, contentProvider, this._sourceMapping);
+        var uiSourceCode = new WebInspector._javascript_Source(this.url, contentProvider, this._sourceMapping);
         uiSourceCode.isContentScript = this.isContentScript;
         uiSourceCode.isEditable = isStandaloneScript;
         return uiSourceCode;
@@ -133,7 +132,7 @@
         this._resource = WebInspector.resourceForURL(this._pendingRequest.url);
         delete this._pendingRequest;
         var oldUISourceCode = this._uiSourceCode || this._temporaryUISourceCode;
-        this._uiSourceCode = this._createUISourceCode(this.url);
+        this._uiSourceCode = this._createUISourceCode();
         this.dispatchEventToListeners(WebInspector.RawSourceCode.Events.UISourceCodeChanged, { uiSourceCode: this._uiSourceCode, oldUISourceCode: oldUISourceCode });
     }
 }

Modified: trunk/Source/WebCore/inspector/front-end/SnippetsModel.js (116845 => 116846)


--- trunk/Source/WebCore/inspector/front-end/SnippetsModel.js	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/Source/WebCore/inspector/front-end/SnippetsModel.js	2012-05-12 10:02:53 UTC (rev 116846)
@@ -391,9 +391,8 @@
      */
     _snippetAdded: function(snippet)
     {
-        var uiSourceCodeId = ""; // FIXME: to be implemented.
         var uiSourceCodeURL = ""; // FIXME: to be implemented.
-        var uiSourceCode = new WebInspector._javascript_Source(uiSourceCodeId, uiSourceCodeURL, new WebInspector.SnippetContentProvider(snippet), this);
+        var uiSourceCode = new WebInspector._javascript_Source(uiSourceCodeURL, new WebInspector.SnippetContentProvider(snippet), this);
         uiSourceCode.isSnippet = true;
         uiSourceCode.isEditable = true;
         this._uiSourceCodeForSnippet.put(snippet, uiSourceCode);
@@ -416,7 +415,7 @@
      */
     _createUISourceCodeForScript: function(script)
     {
-        var uiSourceCode = new WebInspector._javascript_Source(script.sourceURL, script.sourceURL, script, this);
+        var uiSourceCode = new WebInspector._javascript_Source(script.sourceURL, script, this);
         uiSourceCode.isSnippetEvaluation = true;
         var oldUISourceCode = this._uiSourceCodeForScriptId[script.scriptId];
         this._uiSourceCodeForScriptId[script.scriptId] = uiSourceCode;

Modified: trunk/Source/WebCore/inspector/front-end/UISourceCode.js (116845 => 116846)


--- trunk/Source/WebCore/inspector/front-end/UISourceCode.js	2012-05-12 08:51:34 UTC (rev 116845)
+++ trunk/Source/WebCore/inspector/front-end/UISourceCode.js	2012-05-12 10:02:53 UTC (rev 116846)
@@ -32,14 +32,12 @@
 /**
  * @constructor
  * @extends {WebInspector.Object}
- * @param {string} id
  * @param {string} url
  * @param {WebInspector.ContentProvider} contentProvider
  * @param {WebInspector.SourceMapping} sourceMapping
  */
-WebInspector.UISourceCode = function(id, url, contentProvider, sourceMapping)
+WebInspector.UISourceCode = function(url, contentProvider, sourceMapping)
 {
-    this._id = id;
     this._url = url;
     this._parsedURL = new WebInspector.ParsedURL(url);
     this._contentProvider = contentProvider;
@@ -68,14 +66,6 @@
     /**
      * @return {string}
      */
-    get id()
-    {
-        return this._id;
-    },
-
-    /**
-     * @return {string}
-     */
     get url()
     {
         return this._url;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to