Title: [120223] trunk/Source/WebCore
- Revision
- 120223
- Author
- [email protected]
- Date
- 2012-06-13 10:32:56 -0700 (Wed, 13 Jun 2012)
Log Message
Web Inspector: Breakpoint's _uiLocationRemoved() method is never called.
https://bugs.webkit.org/show_bug.cgi?id=89003
Reviewed by Pavel Feldman.
* inspector/front-end/BreakpointManager.js:
(WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode):
(WebInspector.BreakpointManager.Breakpoint):
(WebInspector.BreakpointManager.Breakpoint.prototype._locationUpdated):
(WebInspector.BreakpointManager.Breakpoint.prototype._resetLocations):
(WebInspector.BreakpointManager.Breakpoint.prototype._fakeBreakpointAtPrimaryLocation):
* inspector/front-end/FileSystemModel.js: Drive by compilation fix.
(WebInspector.FileSystemModel):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (120222 => 120223)
--- trunk/Source/WebCore/ChangeLog 2012-06-13 17:30:52 UTC (rev 120222)
+++ trunk/Source/WebCore/ChangeLog 2012-06-13 17:32:56 UTC (rev 120223)
@@ -1,3 +1,19 @@
+2012-06-13 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: Breakpoint's _uiLocationRemoved() method is never called.
+ https://bugs.webkit.org/show_bug.cgi?id=89003
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/BreakpointManager.js:
+ (WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode):
+ (WebInspector.BreakpointManager.Breakpoint):
+ (WebInspector.BreakpointManager.Breakpoint.prototype._locationUpdated):
+ (WebInspector.BreakpointManager.Breakpoint.prototype._resetLocations):
+ (WebInspector.BreakpointManager.Breakpoint.prototype._fakeBreakpointAtPrimaryLocation):
+ * inspector/front-end/FileSystemModel.js: Drive by compilation fix.
+ (WebInspector.FileSystemModel):
+
2012-06-13 David Grogan <[email protected]>
IndexedDB: Add tests, an assert, and some comments around open/close/setVersion call sequencing
Modified: trunk/Source/WebCore/inspector/front-end/BreakpointManager.js (120222 => 120223)
--- trunk/Source/WebCore/inspector/front-end/BreakpointManager.js 2012-06-13 17:30:52 UTC (rev 120222)
+++ trunk/Source/WebCore/inspector/front-end/BreakpointManager.js 2012-06-13 17:32:56 UTC (rev 120223)
@@ -128,9 +128,8 @@
var result = [];
for (var i = 0; i < this._breakpoints.length; ++i) {
var breakpoint = this._breakpoints[i];
- var uiLocations = breakpoint._uiLocations.values();
- for (var j = 0; j < uiLocations.length; ++j) {
- var uiLocation = uiLocations[j];
+ for (var stringifiedLocation in breakpoint._uiLocations) {
+ var uiLocation = breakpoint._uiLocations[stringifiedLocation];
if (uiLocation.uiSourceCode === uiSourceCode)
result.push({breakpoint: breakpoint, uiLocation: uiLocation});
}
@@ -263,8 +262,10 @@
this._breakpointManager = breakpointManager;
this._primaryUILocation = new WebInspector.UILocation(uiSourceCode, lineNumber, 0);
this._sourceCodeStorageId = uiSourceCode.breakpointStorageId();
+ /** @type {Array.<WebInspector.Script.Location>} */
this._liveLocations = [];
- this._uiLocations = new Map();
+ /** @type {Object.<string, WebInspector.UILocation>} */
+ this._uiLocations = {};
// Force breakpoint update.
/** @type {string} */ this._condition;
@@ -295,10 +296,15 @@
*/
_locationUpdated: function(location, uiLocation)
{
- var oldUILocation = /** @type {WebInspector.UILocation} */ this._uiLocations.get(location);
+ var stringifiedLocation = location.scriptId + ":" + location.lineNumber + ":" + location.columnNumber;
+ var oldUILocation = /** @type {WebInspector.UILocation} */ this._uiLocations[stringifiedLocation];
if (oldUILocation)
this._breakpointManager._uiLocationRemoved(this, oldUILocation);
- this._uiLocations.put(location, uiLocation);
+ if (this._uiLocations[""]) {
+ delete this._uiLocations[""];
+ this._breakpointManager._uiLocationRemoved(this, this._primaryUILocation);
+ }
+ this._uiLocations[stringifiedLocation] = uiLocation;
this._breakpointManager._uiLocationAdded(this, uiLocation);
},
@@ -418,15 +424,14 @@
_resetLocations: function()
{
- var uiLocations = this._uiLocations.values();
- for (var i = 0; i < uiLocations.length; ++i)
- this._breakpointManager._uiLocationRemoved(this, uiLocations[i]);
+ for (var stringifiedLocation in this._uiLocations)
+ this._breakpointManager._uiLocationRemoved(this, this._uiLocations[stringifiedLocation]);
for (var i = 0; i < this._liveLocations.length; ++i)
this._liveLocations[i].dispose();
this._liveLocations = [];
- this._uiLocations = new Map();
+ this._uiLocations = {};
},
/**
@@ -440,7 +445,7 @@
_fakeBreakpointAtPrimaryLocation: function()
{
this._resetLocations();
- this._uiLocations.put({}, this._primaryUILocation);
+ this._uiLocations[""] = this._primaryUILocation;
this._breakpointManager._uiLocationAdded(this, this._primaryUILocation);
}
}
Modified: trunk/Source/WebCore/inspector/front-end/FileSystemModel.js (120222 => 120223)
--- trunk/Source/WebCore/inspector/front-end/FileSystemModel.js 2012-06-13 17:30:52 UTC (rev 120222)
+++ trunk/Source/WebCore/inspector/front-end/FileSystemModel.js 2012-06-13 17:32:56 UTC (rev 120223)
@@ -31,7 +31,6 @@
/**
* @constructor
* @extends {WebInspector.Object}
- * @implements {FileSystemAgent.Dispatcher}
*/
WebInspector.FileSystemModel = function()
{
@@ -45,7 +44,6 @@
WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameNavigated, this._frameNavigated, this);
WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameDetached, this._frameDetached, this);
- InspectorBackend.registerFileSystemDispatcher(this);
FileSystemAgent.enable();
if (WebInspector.resourceTreeModel.mainFrame)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes