WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-146609-20150704082602.patch (text/plain), 6.44 KB, created by
Timothy Hatcher
on 2015-07-04 08:27:01 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Timothy Hatcher
Created:
2015-07-04 08:27:01 PDT
Size:
6.44 KB
patch
obsolete
>Subversion Revision: 186278 >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 79c9f3f9641f8901b5dca9fdbb4c1a70e5b7f195..210868b6e73d0c69633f89487c0a2e117648b755 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,26 @@ >+2015-07-04 Timothy Hatcher <timothy@apple.com> >+ >+ Web Inspector: Exceptions in Network timeline when resource updates and filters are applied >+ https://bugs.webkit.org/show_bug.cgi?id=146609 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UserInterface/Views/DataGrid.js: >+ (WebInspector.DataGrid.prototype.insertChild): >+ (WebInspector.DataGrid.prototype.removeChild): >+ (WebInspector.DataGridNode.prototype.savePosition): >+ Convert exceptions to asserts and early returns. >+ >+ * UserInterface/Views/TimelineDataGrid.js: >+ (WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes): Add some asserts and checks. >+ >+ * UserInterface/Views/TreeOutline.js: >+ (WebInspector.TreeOutline.prototype.appendChild): >+ (WebInspector.TreeOutline.prototype.insertChild): >+ (WebInspector.TreeOutline.prototype.removeChildAtIndex): >+ (WebInspector.TreeOutline.prototype.removeChild): >+ Convert exceptions to asserts and early returns. >+ > 2015-07-02 Timothy Hatcher <timothy@apple.com> > > Web Inspector: Add a dedicated Network tab that is always live >diff --git a/Source/WebInspectorUI/UserInterface/Views/DataGrid.js b/Source/WebInspectorUI/UserInterface/Views/DataGrid.js >index 5e8c14582f97341382394e4c6ebb512f5e8ed66e..a7fa134fd31780ea321cb6408c452fbda8af9c9c 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/DataGrid.js >+++ b/Source/WebInspectorUI/UserInterface/Views/DataGrid.js >@@ -719,10 +719,13 @@ WebInspector.DataGrid.prototype = { > > insertChild: function(child, index) > { >+ console.assert(child); > if (!child) >- throw("insertChild: Node can't be undefined or null."); >+ return; >+ >+ console.assert(child.parent !== this); > if (child.parent === this) >- throw("insertChild: Node is already a child of this node."); >+ return; > > if (child.parent) > child.parent.removeChild(child); >@@ -755,10 +758,13 @@ WebInspector.DataGrid.prototype = { > > removeChild: function(child) > { >+ console.assert(child); > if (!child) >- throw("removeChild: Node can't be undefined or null."); >+ return; >+ >+ console.assert(child.parent === this); > if (child.parent !== this) >- throw("removeChild: Node is not a child of this node."); >+ return; > > child.deselect(); > child._detach(); >@@ -1869,8 +1875,10 @@ WebInspector.DataGridNode.prototype = { > if (this._savedPosition) > return; > >+ console.assert(this.parent); > if (!this.parent) >- throw("savePosition: Node must have a parent."); >+ return; >+ > this._savedPosition = { > parent: this.parent, > index: this.parent.children.indexOf(this) >diff --git a/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js b/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js >index 9fdefcf04fa982ed298ffdc353d95e06b49d0e75..db3b87526d21e54b96527f7efe84d80f75d015de 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js >@@ -244,8 +244,13 @@ WebInspector.TimelineDataGrid.prototype = { > var treeElement = this._treeOutlineDataGridSynchronizer.treeElementForDataGridNode(dataGridNode); > console.assert(treeElement); > >- treeOutline.removeChild(treeElement); >- this.removeChild(dataGridNode); >+ console.assert(!treeElement.parent || treeElement.parent === treeOutline); >+ if (treeElement.parent === treeOutline) >+ treeOutline.removeChild(treeElement); >+ >+ console.assert(!dataGridNode.parent || dataGridNode.parent === this); >+ if (dataGridNode.parent === this) >+ this.removeChild(dataGridNode); > > var insertionIndex = insertionIndexForObjectInListSortedByFunction(dataGridNode, this.children, sortComparator); > treeOutline.insertChild(treeElement, insertionIndex); >diff --git a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >index 3e1d21991715dbf51ff7baaa8ffd523c311bcc65..ac808259ad6254c253474dbda22cc1c116fd5bbe 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >@@ -55,8 +55,9 @@ WebInspector.TreeOutline = class TreeOutline extends WebInspector.Object > > appendChild(child) > { >+ console.assert(child); > if (!child) >- throw "child can't be undefined or null"; >+ return; > > var lastChild = this.children[this.children.length - 1]; > if (lastChild) { >@@ -97,8 +98,9 @@ WebInspector.TreeOutline = class TreeOutline extends WebInspector.Object > > insertChild(child, index) > { >+ console.assert(child); > if (!child) >- throw "child can't be undefined or null"; >+ return; > > var previousChild = (index > 0 ? this.children[index - 1] : null); > if (previousChild) { >@@ -146,8 +148,9 @@ WebInspector.TreeOutline = class TreeOutline extends WebInspector.Object > > removeChildAtIndex(childIndex, suppressOnDeselect, suppressSelectSibling) > { >+ console.assert(childIndex >= 0 && childIndex < this.children.length); > if (childIndex < 0 || childIndex >= this.children.length) >- throw "childIndex out of range"; >+ return; > > var child = this.children[childIndex]; > this.children.splice(childIndex, 1); >@@ -184,12 +187,14 @@ WebInspector.TreeOutline = class TreeOutline extends WebInspector.Object > > removeChild(child, suppressOnDeselect, suppressSelectSibling) > { >+ console.assert(child); > if (!child) >- throw "child can't be undefined or null"; >+ return; > > var childIndex = this.children.indexOf(child); >+ console.assert(childIndex !== -1); > if (childIndex === -1) >- throw "child not found in this node's children"; >+ return; > > this.removeChildAtIndex(childIndex, suppressOnDeselect, suppressSelectSibling); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 146609
: 256147