Title: [186952] branches/safari-601.1-branch/Source/WebInspectorUI
Revision
186952
Author
matthew_han...@apple.com
Date
2015-07-16 23:15:44 -0700 (Thu, 16 Jul 2015)

Log Message

Merge r186926. rdar://problem/21868062

Modified Paths

Diff

Modified: branches/safari-601.1-branch/Source/WebInspectorUI/ChangeLog (186951 => 186952)


--- branches/safari-601.1-branch/Source/WebInspectorUI/ChangeLog	2015-07-17 06:15:42 UTC (rev 186951)
+++ branches/safari-601.1-branch/Source/WebInspectorUI/ChangeLog	2015-07-17 06:15:44 UTC (rev 186952)
@@ -1,5 +1,34 @@
 2015-07-16  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r186926. rdar://problem/21868062
+
+    2015-07-16  Joseph Pecoraro  <pecor...@apple.com>
+
+            Web Inspector: REGRESSION (r186218) ScriptTimelineRecord attempts to access null property
+            https://bugs.webkit.org/show_bug.cgi?id=147025
+
+            Reviewed by Timothy Hatcher.
+
+            The issue here was two ScriptTimelineRecord's were created for the same
+            profile payload. When the first ScriptTimelineRecord processed the
+            payload to create a Profile we modified the payload, then when the
+            second ScriptTimelineRecord tries to process the payload the data is
+            in an unexpected state and it crashes.
+
+            The solution here is to stash the result on the payload, so when the
+            payload is shared we can just immediately jump to the resulting Profile.
+            The longer term solution will be to share higher level objects and not
+            attempt to process the payload multiple times. That is tracked by:
+            <https://webkit.org/b/147029> Web Inspector: Better share objects generated from timeline events (Records)
+
+            * UserInterface/Models/ScriptTimelineRecord.js:
+            (WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload):
+            When processing the profile payload, store the Profile on the payload
+            so if another ScriptTimelineRecord has that payload they can avoid
+            re-processing it.
+
+2015-07-16  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r186925. rdar://problem/21868413
 
     2015-07-16  Joseph Pecoraro  <pecor...@apple.com>

Modified: branches/safari-601.1-branch/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js (186951 => 186952)


--- branches/safari-601.1-branch/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js	2015-07-17 06:15:42 UTC (rev 186951)
+++ branches/safari-601.1-branch/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js	2015-07-17 06:15:44 UTC (rev 186952)
@@ -73,6 +73,13 @@
         if (this._profile || !this._profilePayload)
             return;
 
+        // FIXME: <https://webkit.org/b/147029> Web Inspector: Better share objects generated from timeline events (Records)
+        if (this._profilePayload.__profile) {
+            this._profile = this._profilePayload.__profile;
+            this._profilePayload = undefined;
+            return;
+        }
+
         var payload = this._profilePayload;
         this._profilePayload = undefined;
 
@@ -144,7 +151,7 @@
             }
         }
 
-        this._profile = new WebInspector.Profile(rootNodes);
+        this._profile = payload.__profile = new WebInspector.Profile(rootNodes);
     }
 };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to