| Summary: | Release assert in Document::updateLayout() in WebPage::determinePrimarySnapshottedPlugIn() | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||
| Component: | WebKit2 | Assignee: | Ryosuke Niwa <rniwa> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | dino, graouts, jonlee, koivisto, simon.fraser, zalan | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Ryosuke Niwa
2018-06-06 22:56:11 PDT
Created attachment 342123 [details]
Fixes the bug
Comment on attachment 342123 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=342123&action=review > LayoutTests/plugins/snapshotting/determine-primary-snapshotted-plugin-crash.html:22 > + }, 500); Does this make flakiness a risk? Comment on attachment 342123 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=342123&action=review > Source/WebKit/ChangeLog:11 > + The release assert was hit because the descendent elemenet iterator, which instantiates ScriptDisallowedScope, > + was alive as determinePrimarySnapshottedPlugIn updated the layout via RenderView::hitTest. Avoid this by copying > + the list of plugin image elements into a vector first. I would rephrase this to "potentially updated" or something along those lines. determinePrimarySnapshottedPlugIn carefully issues a layout starting from the top level document and it expects the hittest's updateLayout() to be a no-op. I understand that with the current script-callbacks-after-layout model, this is not guaranteed at all. We need to invest some time in this area and ensure immutability for cases like this. What determinePrimarySnapshottedPlugIn() has today should be the preferred way of coding against mutation as opposed to nullchecks and refing all the things. (In reply to Jon Lee from comment #3) > Comment on attachment 342123 [details] > Fixes the bug > > View in context: > https://bugs.webkit.org/attachment.cgi?id=342123&action=review > > > LayoutTests/plugins/snapshotting/determine-primary-snapshotted-plugin-crash.html:22 > > + }, 500); > > Does this make flakiness a risk? All other snapshot tests are doing this, and there doesn't seem to be a way to do this deterministically due to the way snapshot algorithm waits for the movie to get to a snapshottable state. (In reply to zalan from comment #4) > Comment on attachment 342123 [details] > Fixes the bug > > View in context: > https://bugs.webkit.org/attachment.cgi?id=342123&action=review > > > Source/WebKit/ChangeLog:11 > > + The release assert was hit because the descendent elemenet iterator, which instantiates ScriptDisallowedScope, > > + was alive as determinePrimarySnapshottedPlugIn updated the layout via RenderView::hitTest. Avoid this by copying > > + the list of plugin image elements into a vector first. > > I would rephrase this to "potentially updated" or something along those > lines. > determinePrimarySnapshottedPlugIn carefully issues a layout starting from > the top level document and it expects the hittest's updateLayout() to be a > no-op. I understand that with the current script-callbacks-after-layout > model, this is not guaranteed at all. We need to invest some time in this > area and ensure immutability for cases like this. What > determinePrimarySnapshottedPlugIn() has today should be the preferred way of > coding against mutation as opposed to nullchecks and refing all the things. That's a big misleading since it's true today that invoking updateLayout in this function isn't safe (or at least would hit the release assertion). I'd rephrase as "invoked Document::updateLayout" instead for clarity. Committed r232591: <https://trac.webkit.org/changeset/232591> |