Bug 207975 - Crash in Page::updateRendering when document has no domWindow
Summary: Crash in Page::updateRendering when document has no domWindow
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-19 17:03 PST by Sunny He
Modified: 2020-02-20 18:58 PST (History)
8 users (show)

See Also:


Attachments
Patch (2.09 KB, patch)
2020-02-19 17:09 PST, Sunny He
no flags Details | Formatted Diff | Diff
Patch (1.73 KB, patch)
2020-02-20 17:55 PST, Sunny He
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sunny He 2020-02-19 17:03:30 PST
rdar://56999099
Comment 1 Sunny He 2020-02-19 17:09:09 PST
Created attachment 391223 [details]
Patch
Comment 2 Ryosuke Niwa 2020-02-20 11:49:16 PST
Comment on attachment 391223 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=391223&action=review

> Source/WebCore/page/Page.cpp:1334
> +        if (document.domWindow()) {

Can we use an early return instead?
Comment 3 Said Abou-Hallawa 2020-02-20 16:18:14 PST
Comment on attachment 391223 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=391223&action=review

>> Source/WebCore/page/Page.cpp:1334
>> +        if (document.domWindow()) {
> 
> Can we use an early return instead?

Should this be in forEachDocument()? Is there a reason to run any rendering update step for a document which does not have a window?
Comment 4 Ryosuke Niwa 2020-02-20 17:41:47 PST
(In reply to Said Abou-Hallawa from comment #3)
> Comment on attachment 391223 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=391223&action=review
> 
> >> Source/WebCore/page/Page.cpp:1334
> >> +        if (document.domWindow()) {
> > 
> > Can we use an early return instead?
> 
> Should this be in forEachDocument()? Is there a reason to run any rendering
> update step for a document which does not have a window?

I don’t think we want to do that there because it’s used in other places than Page::updateRendering.
Comment 5 Sunny He 2020-02-20 17:55:09 PST
Created attachment 391365 [details]
Patch
Comment 6 WebKit Commit Bot 2020-02-20 18:57:28 PST
The commit-queue encountered the following flaky tests while processing attachment 391365 [details]:

editing/spelling/spellcheck-input-search-crash.html bug 207995 (authors: arv@chromium.org, g.czajkowski@samsung.com, mark.lam@apple.com, and morrita@google.com)
fetch/fetch-worker-crash.html bug 187257 (author: youennf@gmail.com)
The commit-queue is continuing to process your patch.
Comment 7 WebKit Commit Bot 2020-02-20 18:57:59 PST
Comment on attachment 391365 [details]
Patch

Clearing flags on attachment: 391365

Committed r257123: <https://trac.webkit.org/changeset/257123>
Comment 8 WebKit Commit Bot 2020-02-20 18:58:01 PST
All reviewed patches have been landed.  Closing bug.