RESOLVED FIXED 190341
Have DOMWindowProperty get is frame from its associated DOMWindow
https://bugs.webkit.org/show_bug.cgi?id=190341
Summary Have DOMWindowProperty get is frame from its associated DOMWindow
Chris Dumez
Reported 2018-10-07 15:10:53 PDT
Have DOMWindowProperty get is frame from its associated DOMWindow, instead of having its own m_frame that can potentially get out-of-sync.
Attachments
Patch (107.13 KB, patch)
2018-10-07 15:12 PDT, Chris Dumez
no flags
Patch (109.18 KB, patch)
2018-10-07 15:53 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2018-10-07 15:12:32 PDT
Chris Dumez
Comment 2 2018-10-07 15:53:33 PDT
Alex Christensen
Comment 3 2018-10-08 09:40:13 PDT
Comment on attachment 351747 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351747&action=review > Source/WebCore/page/DOMWindow.cpp:686 > -Screen* DOMWindow::screen() const > +Screen* DOMWindow::screen() Does this change really introduce mutating the DOMWindow when we access its screen? Same for other const removals. I see no good reason for them.
Chris Dumez
Comment 4 2018-10-08 09:41:27 PDT
(In reply to Alex Christensen from comment #3) > Comment on attachment 351747 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=351747&action=review > > > Source/WebCore/page/DOMWindow.cpp:686 > > -Screen* DOMWindow::screen() const > > +Screen* DOMWindow::screen() > > Does this change really introduce mutating the DOMWindow when we access its > screen? Same for other const removals. I see no good reason for them. I needed to drop the const for correctness because the DOMWindow passes itself to the DOMWindowProperties when constructing them as a DOMWindow&.
Chris Dumez
Comment 5 2018-10-08 09:55:31 PDT
(In reply to Chris Dumez from comment #4) > (In reply to Alex Christensen from comment #3) > > Comment on attachment 351747 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=351747&action=review > > > > > Source/WebCore/page/DOMWindow.cpp:686 > > > -Screen* DOMWindow::screen() const > > > +Screen* DOMWindow::screen() > > > > Does this change really introduce mutating the DOMWindow when we access its > > screen? Same for other const removals. I see no good reason for them. > > I needed to drop the const for correctness because the DOMWindow passes > itself to the DOMWindowProperties when constructing them as a DOMWindow&. The only reason they were const before is because the DOMWindow was passing its frame to the DOMWindowProperties when constructing them and the frame() getter is marked const.
Chris Dumez
Comment 6 2018-10-08 10:12:45 PDT
Comment on attachment 351747 [details] Patch Clearing flags on attachment: 351747 Committed r236917: <https://trac.webkit.org/changeset/236917>
Chris Dumez
Comment 7 2018-10-08 10:12:47 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2018-10-08 10:14:10 PDT
Note You need to log in before you can comment on or make changes to this bug.