Bug 170113

Summary: ASSERT(!needsLayout()) in FrameView::paintContents() when setting a CSS class during handling of a "loadedmetadata" event
Product: WebKit Reporter: Antoine Quint <graouts>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=169145

Antoine Quint
Reported 2017-03-27 02:03:34 PDT
A previous version of the patch for https://bugs.webkit.org/show_bug.cgi?id=169145 would infrequently hit `ASSERT(!needsLayout())` in FrameView::paintContents(). This was due to those three lines in _mediaDocumentHasMetadata() in Source/WebCore/Modules/modern-media-controls/media/media-document-controller.js: const media = this.mediaController.media; media.classList.add(this.mediaController.isAudio ? "audio" : "video"); media.classList.add(window.navigator.platform === "MacIntel" ? "mac" : window.navigator.platform); This code is called as a result of handling a "loadedmetadata" event, which is fired asynchronously. You can re-create the assertion by removing the enclosing requestAnimationFrame() call and running this command: run-webkit-tests --debug -1 --iterations=500 --exit-after-n-failures=1 fast/events/media-focus-in-standalone-media-document.html You should see DRT crash relatively quickly as this ASSERT is hit.
Attachments
Radar WebKit Bug Importer
Comment 1 2017-03-27 02:05:37 PDT
Simon Fraser (smfr)
Comment 2 2017-03-27 07:58:53 PDT
What's the full stack trace?
Simon Fraser (smfr)
Comment 4 2017-03-27 11:08:54 PDT
Ah, it's coming out of figDeferredNotificationDispatchFunction. This is tracked by rdar://problem/16622896.
Note You need to log in before you can comment on or make changes to this bug.