Title: [110683] trunk/Source/WebCore
- Revision
- 110683
- Author
- [email protected]
- Date
- 2012-03-14 03:04:33 -0700 (Wed, 14 Mar 2012)
Log Message
Web Inspector: [InspectorIndexedDB] Remote object should be released when data view is removed/updated.
https://bugs.webkit.org/show_bug.cgi?id=81022
Reviewed by Pavel Feldman.
* inspector/front-end/IndexedDBViews.js:
(WebInspector.IDBDataView):
(WebInspector.IDBDataView.prototype._updateData.callback):
(WebInspector.IDBDataView.prototype._updateData):
(WebInspector.IDBDataView.prototype.get statusBarItems):
(WebInspector.IDBDataView.prototype.clear):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.IndexedDBTreeElement.prototype._indexedDBRemoved):
(WebInspector.IDBDatabaseTreeElement.prototype.update):
(WebInspector.IDBDatabaseTreeElement.prototype.onselect):
(WebInspector.IDBDatabaseTreeElement.prototype._objectStoreRemoved):
(WebInspector.IDBDatabaseTreeElement.prototype.clear):
(WebInspector.IDBObjectStoreTreeElement.prototype.update):
(WebInspector.IDBObjectStoreTreeElement.prototype.onselect):
(WebInspector.IDBObjectStoreTreeElement.prototype._indexRemoved):
(WebInspector.IDBObjectStoreTreeElement.prototype.clear):
(WebInspector.IDBIndexTreeElement.prototype.onselect):
(WebInspector.IDBIndexTreeElement.prototype.clear):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (110682 => 110683)
--- trunk/Source/WebCore/ChangeLog 2012-03-14 10:02:17 UTC (rev 110682)
+++ trunk/Source/WebCore/ChangeLog 2012-03-14 10:04:33 UTC (rev 110683)
@@ -1,3 +1,29 @@
+2012-03-13 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: [InspectorIndexedDB] Remote object should be released when data view is removed/updated.
+ https://bugs.webkit.org/show_bug.cgi?id=81022
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/IndexedDBViews.js:
+ (WebInspector.IDBDataView):
+ (WebInspector.IDBDataView.prototype._updateData.callback):
+ (WebInspector.IDBDataView.prototype._updateData):
+ (WebInspector.IDBDataView.prototype.get statusBarItems):
+ (WebInspector.IDBDataView.prototype.clear):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.IndexedDBTreeElement.prototype._indexedDBRemoved):
+ (WebInspector.IDBDatabaseTreeElement.prototype.update):
+ (WebInspector.IDBDatabaseTreeElement.prototype.onselect):
+ (WebInspector.IDBDatabaseTreeElement.prototype._objectStoreRemoved):
+ (WebInspector.IDBDatabaseTreeElement.prototype.clear):
+ (WebInspector.IDBObjectStoreTreeElement.prototype.update):
+ (WebInspector.IDBObjectStoreTreeElement.prototype.onselect):
+ (WebInspector.IDBObjectStoreTreeElement.prototype._indexRemoved):
+ (WebInspector.IDBObjectStoreTreeElement.prototype.clear):
+ (WebInspector.IDBIndexTreeElement.prototype.onselect):
+ (WebInspector.IDBIndexTreeElement.prototype.clear):
+
2012-03-12 Vsevolod Vlasov <[email protected]>
Web Inspector: Introduce SnippetsScriptMapping.
Modified: trunk/Source/WebCore/inspector/front-end/IndexedDBViews.js (110682 => 110683)
--- trunk/Source/WebCore/inspector/front-end/IndexedDBViews.js 2012-03-14 10:02:17 UTC (rev 110682)
+++ trunk/Source/WebCore/inspector/front-end/IndexedDBViews.js 2012-03-14 10:04:33 UTC (rev 110683)
@@ -125,6 +125,7 @@
this._skipCount = 0;
this.update(objectStore, index);
+ this._entries = [];
}
WebInspector.IDBDataView.prototype = {
@@ -286,7 +287,8 @@
*/
function callback(entries, hasMore)
{
- this._dataGrid.removeChildren();
+ this.clear();
+ this._entries = entries;
for (var i = 0; i < entries.length; ++i) {
var data = ""
data["number"] = i + skipCount;
@@ -319,6 +321,16 @@
get statusBarItems()
{
return [this._refreshButton.element];
+ },
+
+ clear: function()
+ {
+ this._dataGrid.removeChildren();
+ for (var i = 0; i < this._entries.length; ++i) {
+ var value = this._entries[i].value;
+ value.release();
+ }
+ this._entries = [];
}
}
Modified: trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js (110682 => 110683)
--- trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js 2012-03-14 10:02:17 UTC (rev 110682)
+++ trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js 2012-03-14 10:04:33 UTC (rev 110683)
@@ -1570,6 +1570,7 @@
if (!idbDatabaseTreeElement)
return;
+ idbDatabaseTreeElement.clear();
this.removeChild(idbDatabaseTreeElement);
this._idbDatabaseTreeElements.remove(idbDatabaseTreeElement);
},
@@ -1666,10 +1667,8 @@
this._idbObjectStoreTreeElements[objectStore.name].update(objectStore);
}
for (var objectStoreName in this._idbObjectStoreTreeElements) {
- if (!objectStoreNames[objectStoreName]) {
- this.removeChild(this._idbObjectStoreTreeElements[objectStoreName]);
- delete this._idbObjectStoreTreeElements[objectStoreName];
- }
+ if (!objectStoreNames[objectStoreName])
+ this._objectStoreRemoved(objectStoreName);
}
if (this.children.length) {
@@ -1695,6 +1694,23 @@
this._view = new WebInspector.IDBDatabaseView(this._database);
this._storagePanel.showIndexedDB(this._view);
+ },
+
+ /**
+ * @param {string} objectStoreName
+ */
+ _objectStoreRemoved: function(objectStoreName)
+ {
+ var objectStoreTreeElement = this._idbObjectStoreTreeElements[objectStoreName];
+ objectStoreTreeElement.clear();
+ this.removeChild(objectStoreTreeElement);
+ delete this._idbObjectStoreTreeElements[objectStoreName];
+ },
+
+ clear: function()
+ {
+ for (var objectStoreName in this._idbObjectStoreTreeElements)
+ this._objectStoreRemoved(objectStoreName);
}
}
@@ -1741,6 +1757,10 @@
this._idbIndexTreeElements[index.name].update(index);
}
for (var indexName in this._idbIndexTreeElements) {
+ if (!indexNames[indexName])
+ this._indexRemoved(indexName);
+ }
+ for (var indexName in this._idbIndexTreeElements) {
if (!indexNames[indexName]) {
this.removeChild(this._idbIndexTreeElements[indexName]);
delete this._idbIndexTreeElements[indexName];
@@ -1770,6 +1790,25 @@
this._view = new WebInspector.IDBDataView(this._model, this._databaseId, this._objectStore, null);
this._storagePanel.showIndexedDB(this._view);
+ },
+
+ /**
+ * @param {string} indexName
+ */
+ _indexRemoved: function(indexName)
+ {
+ var indexTreeElement = this._idbIndexTreeElements[indexName];
+ indexTreeElement.clear();
+ this.removeChild(indexTreeElement);
+ delete this._idbIndexTreeElements[indexName];
+ },
+
+ clear: function()
+ {
+ for (var indexName in this._idbIndexTreeElements)
+ this._indexRemoved(indexName);
+ if (this._view)
+ this._view.clear();
}
}
@@ -1830,6 +1869,12 @@
this._view = new WebInspector.IDBDataView(this._model, this._databaseId, this._objectStore, this._index);
this._storagePanel.showIndexedDB(this._view);
+ },
+
+ clear: function()
+ {
+ if (this._view)
+ this._view.clear();
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes