RESOLVED FIXED Bug 203625
[GTK] Web Inspector: inspector/timeline/timeline-event-*.html are failing
https://bugs.webkit.org/show_bug.cgi?id=203625
Summary [GTK] Web Inspector: inspector/timeline/timeline-event-*.html are failing
Yury Semikhatsky
Reported 2019-10-30 13:56:31 PDT
--- /home/yurys/WebKit/WebKitBuild/Release/layout-test-results/inspector/timeline/timeline-event-CancelAnimationFrame-expected.txt +++ /home/yurys/WebKit/WebKitBuild/Release/layout-test-results/inspector/timeline/timeline-event-CancelAnimationFrame-actual.txt @@ -6,7 +6,11 @@ Starting Capture... Evaluating... Stopping Capture... -PASS: Should be 1 AnimationFrameCanceled record. -DETAILS: number -PASS: ScriptTimelineRecord details should be the requestAnimationFrame identifier. +ASSERT: savePageData should have been called in the page before capturing was stopped. +!! EXCEPTION: null is not an object (evaluating 'pageRecordingData.requestAnimationFrameIdentifier') +Stack Trace: #0: (anonymous) (unknown) +#1: asyncFunctionResume [native code] +#2: (anonymous) [native code] +#3: promiseReactionJobWithoutPromise [native code] +#4: promiseReactionJob [native code]
Attachments
Patch (3.78 KB, patch)
2019-10-30 14:23 PDT, Yury Semikhatsky
no flags
Patch (4.39 KB, patch)
2019-10-30 17:58 PDT, Yury Semikhatsky
no flags
Patch for landing (4.52 KB, patch)
2019-10-31 09:41 PDT, Yury Semikhatsky
no flags
Yury Semikhatsky
Comment 1 2019-10-30 14:03:38 PDT
Actually all tests using the same utility resource suffer from the same race: LayoutTests/inspector/timeline/timeline-event-TimerFire.html LayoutTests/inspector/timeline/timeline-event-TimerRemove.html LayoutTests/inspector/timeline/timeline-event-FireAnimationFrame.html LayoutTests/inspector/timeline/timeline-event-EventDispatch.html LayoutTests/inspector/timeline/timeline-event-RequestAnimationFrame.html LayoutTests/inspector/timeline/timeline-event-CancelAnimationFrame.html LayoutTests/inspector/timeline/timeline-event-TimerInstall.html
Yury Semikhatsky
Comment 2 2019-10-30 14:23:18 PDT
Yury Semikhatsky
Comment 3 2019-10-30 17:58:02 PDT
Devin Rousso
Comment 4 2019-10-30 21:07:26 PDT
Comment on attachment 382400 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=382400&action=review rs=me > LayoutTests/inspector/timeline/resources/timeline-event-utilities.js:9 > + let pageRecordingData = InspectorTest.awaitEvent("SavePageData").then((event) => { NIT: we should call this `savePageDataPromise` since it doesn't actually hold the data anymore. > LayoutTests/inspector/timeline/resources/timeline-event-utilities.js:35 > - .catch(promise.reject); > + .catch((error) => { > + promise.reject(error); > + }); Why was this changed? > LayoutTests/inspector/timeline/resources/timeline-event-utilities.js:43 > + pageRecordingData.then((r) => { > + promise.resolve(r); Once we change the name to `savePageDataPromise`, I'd expect `r` to be renamed to `data`.
Yury Semikhatsky
Comment 5 2019-10-31 09:40:40 PDT
Comment on attachment 382400 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=382400&action=review >> LayoutTests/inspector/timeline/resources/timeline-event-utilities.js:9 >> + let pageRecordingData = InspectorTest.awaitEvent("SavePageData").then((event) => { > > NIT: we should call this `savePageDataPromise` since it doesn't actually hold the data anymore. Done. >> LayoutTests/inspector/timeline/resources/timeline-event-utilities.js:35 >> + }); > > Why was this changed? As I noted in the changelog there was a bug. It wouldn't work before because 'promise.reject' doesn't preserve a pointer to 'promise' and 'reject' would be called with undefined 'this'. So we either have to 'bind' this or use a closure. >> LayoutTests/inspector/timeline/resources/timeline-event-utilities.js:43 >> + promise.resolve(r); > > Once we change the name to `savePageDataPromise`, I'd expect `r` to be renamed to `data`. Done.
Yury Semikhatsky
Comment 6 2019-10-31 09:41:46 PDT
Created attachment 382469 [details] Patch for landing
WebKit Commit Bot
Comment 7 2019-10-31 10:35:13 PDT
Comment on attachment 382469 [details] Patch for landing Clearing flags on attachment: 382469 Committed r251856: <https://trac.webkit.org/changeset/251856>
WebKit Commit Bot
Comment 8 2019-10-31 10:35:15 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9 2019-10-31 10:36:17 PDT
Note You need to log in before you can comment on or make changes to this bug.