Title: [201408] trunk/Source/WebInspectorUI
- Revision
- 201408
- Author
- [email protected]
- Date
- 2016-05-25 16:11:56 -0700 (Wed, 25 May 2016)
Log Message
Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'collectionData.affectedSnapshots')
https://bugs.webkit.org/show_bug.cgi?id=158051
Patch by Joseph Pecoraro <[email protected]> on 2016-05-25
Reviewed by Brian Burg.
* UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
* UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
(HeapSnapshotWorker.prototype.createSnapshot):
If by the time the timeout fires we had cleared our snapshot list, then
updateDeadNodesAndGatherCollectionData could bail. Handle gracefully.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (201407 => 201408)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-05-25 23:01:51 UTC (rev 201407)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-05-25 23:11:56 UTC (rev 201408)
@@ -1,3 +1,17 @@
+2016-05-25 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'collectionData.affectedSnapshots')
+ https://bugs.webkit.org/show_bug.cgi?id=158051
+
+ Reviewed by Brian Burg.
+
+ * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
+ (HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
+ * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
+ (HeapSnapshotWorker.prototype.createSnapshot):
+ If by the time the timeout fires we had cleared our snapshot list, then
+ updateDeadNodesAndGatherCollectionData could bail. Handle gracefully.
+
2016-05-23 Nikita Vasilyev <[email protected]>
Web Inspector: Split console navigation bar doesn't wrap as expected
Modified: trunk/Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js (201407 => 201408)
--- trunk/Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js 2016-05-25 23:01:51 UTC (rev 201407)
+++ trunk/Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js 2016-05-25 23:11:56 UTC (rev 201408)
@@ -343,9 +343,8 @@
{
let previousSnapshotIndex = snapshots.indexOf(this) - 1;
let previousSnapshot = snapshots[previousSnapshotIndex];
- console.assert(previousSnapshot instanceof HeapSnapshot);
if (!previousSnapshot)
- return;
+ return null;
let lastNodeIdentifier = previousSnapshot._lastNodeIdentifier;
Modified: trunk/Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js (201407 => 201408)
--- trunk/Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js 2016-05-25 23:01:51 UTC (rev 201407)
+++ trunk/Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js 2016-05-25 23:11:56 UTC (rev 201408)
@@ -58,7 +58,7 @@
if (this._snapshots.length > 1) {
setTimeout(() => {
let collectionData = snapshot.updateDeadNodesAndGatherCollectionData(this._snapshots);
- if (!collectionData.affectedSnapshots.length)
+ if (!collectionData || !collectionData.affectedSnapshots.length)
return;
this.sendEvent("HeapSnapshot.CollectionEvent", collectionData);
}, 0);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes