Bug 173509 - Demote the "we have navigated away" check to an assertion.
Summary: Demote the "we have navigated away" check to an assertion.
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: zalan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-16 21:20 PDT by zalan
Modified: 2017-06-17 20:57 PDT (History)
12 users (show)

See Also:


Attachments
Patch (2.15 KB, patch)
2017-06-16 21:27 PDT, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-elcapitan (1015.96 KB, application/zip)
2017-06-16 22:26 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2017-06-16 21:20:49 PDT
Now that it is ensured that the render tree can't get to the page cache.
Comment 1 zalan 2017-06-16 21:27:12 PDT
Created attachment 313183 [details]
Patch
Comment 2 Simon Fraser (smfr) 2017-06-16 21:32:21 PDT
Comment on attachment 313183 [details]
Patch

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

> Source/WebCore/ChangeLog:3
> +        Demote the "we have navigated away" check to an assertion.

I don't see anything getting demoted in this patch?
Comment 3 zalan 2017-06-16 21:34:44 PDT
(In reply to Simon Fraser (smfr) from comment #2)
> Comment on attachment 313183 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=313183&action=review
> 
> > Source/WebCore/ChangeLog:3
> > +        Demote the "we have navigated away" check to an assertion.
> 
> I don't see anything getting demoted in this patch?
FrameView* frameView = frame()->document() == this ? frame()->view() : nullptr
vs.
assert() + view()
Comment 4 Simon Fraser (smfr) 2017-06-16 21:36:11 PDT
Comment on attachment 313183 [details]
Patch

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

>>> Source/WebCore/ChangeLog:3
>>> +        Demote the "we have navigated away" check to an assertion.
>> 
>> I don't see anything getting demoted in this patch?
> 
> FrameView* frameView = frame()->document() == this ? frame()->view() : nullptr
> vs.
> assert() + view()

Ah, that's a bit subtle.
Comment 5 zalan 2017-06-16 22:21:22 PDT
(In reply to Simon Fraser (smfr) from comment #4)
> Comment on attachment 313183 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=313183&action=review
> 
> >>> Source/WebCore/ChangeLog:3
> >>> +        Demote the "we have navigated away" check to an assertion.
> >> 
> >> I don't see anything getting demoted in this patch?
> > 
> > FrameView* frameView = frame()->document() == this ? frame()->view() : nullptr
> > vs.
> > assert() + view()
> 
> Ah, that's a bit subtle.
yea, but that's the expected behavior now.
Comment 6 Build Bot 2017-06-16 22:26:41 PDT
Comment on attachment 313183 [details]
Patch

Attachment 313183 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/3945982

New failing tests:
inspector/canvas/create-canvas-contexts.html
Comment 7 Build Bot 2017-06-16 22:26:43 PDT
Created attachment 313187 [details]
Archive of layout-test-results from ews102 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 8 zalan 2017-06-16 22:28:34 PDT
(In reply to Build Bot from comment #6)
> Comment on attachment 313183 [details]
> Patch
> 
> Attachment 313183 [details] did not pass mac-ews (mac):
> Output: http://webkit-queues.webkit.org/results/3945982
> 
> New failing tests:
> inspector/canvas/create-canvas-contexts.html

really???
Comment 9 WebKit Commit Bot 2017-06-17 13:37:10 PDT
Comment on attachment 313183 [details]
Patch

Clearing flags on attachment: 313183

Committed r218456: <http://trac.webkit.org/changeset/218456>
Comment 10 WebKit Commit Bot 2017-06-17 13:37:12 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Darin Adler 2017-06-17 18:42:33 PDT
Comment on attachment 313183 [details]
Patch

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

> Source/WebCore/dom/Document.cpp:2215
> +    ASSERT(frame() && frame()->document() == this);

Please don’t use && in assertions. If you write this as two separate assertions, and half of it failed, we will be able to tell which half.
Comment 12 zalan 2017-06-17 18:45:20 PDT
(In reply to Darin Adler from comment #11)
> Comment on attachment 313183 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=313183&action=review
> 
> > Source/WebCore/dom/Document.cpp:2215
> > +    ASSERT(frame() && frame()->document() == this);
> 
> Please don’t use && in assertions. If you write this as two separate
> assertions, and half of it failed, we will be able to tell which half.
Oh, right! I usually keep in mind not to merge them. Not sure what happened here. :( Thanks!
Comment 13 zalan 2017-06-17 20:57:31 PDT
Committed r218462: <http://trac.webkit.org/changeset/218462>