Title: [201150] branches/safari-602.1.32-branch/Source/WebInspectorUI
- Revision
- 201150
- Author
- [email protected]
- Date
- 2016-05-19 01:41:09 -0700 (Thu, 19 May 2016)
Log Message
Merge r201092. rdar://problem/26349229
Modified Paths
Diff
Modified: branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog (201149 => 201150)
--- branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog 2016-05-19 08:41:06 UTC (rev 201149)
+++ branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog 2016-05-19 08:41:09 UTC (rev 201150)
@@ -1,5 +1,31 @@
2016-05-19 Babak Shafiei <[email protected]>
+ Merge r201092. rdar://problem/26349229
+
+ 2016-05-18 Brian Burg <[email protected]>
+
+ Web Inspector: race between frontend and backend both starting timeline recordings causes console assert
+ https://bugs.webkit.org/show_bug.cgi?id=157850
+ <rdar://problem/26349229>
+
+ Reviewed by Joseph Pecoraro.
+
+ If TimelineManager has created a fresh recording and the Timeline.autoCaptureStarted
+ event comes before Timeline.recordingStarted, then the manager will try to start the
+ same recording twice. In this scenario, the manager should just wait until the
+ Timeline.recordingStarted event comes, since it causes TimelineMangare to set up
+ the isCapturing flag and other state.
+
+ * UserInterface/Controllers/TimelineManager.js:
+ (WebInspector.TimelineManager):
+ (WebInspector.TimelineManager.prototype.startCapturing):
+ (WebInspector.TimelineManager.prototype.capturingStarted):
+ (WebInspector.TimelineManager.prototype.autoCaptureStarted):
+ Add a new flag, this._waitingForCapturingStartedEvent. If true, don't start the
+ recording in response to this event.
+
+2016-05-19 Babak Shafiei <[email protected]>
+
Merge r200661.
2016-05-10 Joseph Pecoraro <[email protected]>
Modified: branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (201149 => 201150)
--- branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2016-05-19 08:41:06 UTC (rev 201149)
+++ branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2016-05-19 08:41:09 UTC (rev 201150)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013, 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,6 +42,7 @@
this._persistentNetworkTimeline = new WebInspector.NetworkTimeline;
this._isCapturing = false;
+ this._waitingForCapturingStartedEvent = false;
this._isCapturingPageReload = false;
this._autoCaptureOnPageLoad = false;
this._mainResourceForAutoCapturing = null;
@@ -170,6 +171,8 @@
if (!this._activeRecording || shouldCreateRecording)
this._loadNewRecording();
+ this._waitingForCapturingStartedEvent = true;
+
this.dispatchEventToListeners(WebInspector.TimelineManager.Event.CapturingWillStart);
this._activeRecording.start();
@@ -221,6 +224,7 @@
if (this._isCapturing)
return;
+ this._waitingForCapturingStartedEvent = false;
this._isCapturing = true;
this._lastDeadTimeTickle = 0;
@@ -265,7 +269,11 @@
if (this._isCapturing)
this.stopCapturing();
- this.startCapturing(true);
+ // We may already have an fresh TimelineRecording created if autoCaptureStarted is received
+ // between sending the Timeline.start command and receiving Timeline.capturingStarted event.
+ // In that case, there is no need to call startCapturing again. Reuse the fresh recording.
+ if (!this._waitingForCapturingStartedEvent)
+ this.startCapturing(true);
this._shouldSetAutoCapturingMainResource = true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes