The current implementation blindly assumes that no capturing or replaying has happened yet when the ReplayManager is being constructed. This breaks replay when the inspector is closed and then later reopened.
<rdar://problem/17785105>
Created attachment 235384 [details] Patch
Attachment 235384 [details] did not pass style-queue: ERROR: Source/WebCore/inspector/InspectorReplayAgent.h:107: The parameter name "sessionState" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WebCore/inspector/InspectorReplayAgent.h:107: The parameter name "segmentState" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 235384 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=235384&action=review > Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js:55 > + this._initializationPromise = ReplayAgent.currentReplayState.promise() No need for .promise() now. > Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js:68 > + }) > + .then(function() { Same line? > Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js:69 > + return ReplayAgent.getAvailableSessions.promise(); No .promise(). > Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js:210 > + if (!this._initialized) > + return this.waitUntilInitialized().then(this.captureStarted.bind(this)); Very cool! Too bad this can't be more automagic of all of these.
Committed r172087: <http://trac.webkit.org/changeset/172087>
Comment on attachment 235384 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=235384&action=review >> Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js:55 >> + this._initializationPromise = ReplayAgent.currentReplayState.promise() > > No need for .promise() now. That's not landed yet. >> Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js:210 >> + return this.waitUntilInitialized().then(this.captureStarted.bind(this)); > > Very cool! Too bad this can't be more automagic of all of these. It would require some sort of property proxying thing, which will be just as slow and a bunch of work.. :(