WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
141907
[WK2][Mac] WebPageProxy::supressVisibilityUpdates() should suppress visibility updates.
https://bugs.webkit.org/show_bug.cgi?id=141907
Summary
[WK2][Mac] WebPageProxy::supressVisibilityUpdates() should suppress visibilit...
Jer Noble
Reported
2015-02-23 08:23:41 PST
[WK2][Mac] WebPageProxy::supressVisibilityUpdates() should suppress visibility updates.
Attachments
Patch
(3.62 KB, patch)
2015-02-23 08:31 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(3.70 KB, patch)
2015-02-23 12:52 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(3.74 KB, patch)
2015-02-25 13:54 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2015-02-23 08:31:00 PST
Created
attachment 247118
[details]
Patch
Jer Noble
Comment 2
2015-02-23 12:52:52 PST
Created
attachment 247136
[details]
Patch
Tim Horton
Comment 3
2015-02-23 13:04:40 PST
Comment on
attachment 247136
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=247136&action=review
> Source/WebKit2/UIProcess/WebPageProxy.cpp:1231 > + m_viewStateChangeDispatcher->schedule();
If one of the suppressed changes was a view-in-window change or any of the requests requested immediate dispatch, you should probably do that here instead of waiting for the next runloop.
> Source/WebKit2/UIProcess/WebPageProxy.cpp:1262 > + if (m_suppressVisibilityUpdates)
It is super dangerous for any viewStateDidChange call that wantsSynchronousReply or immediate dispatch to bail like this, because often the caller will be blocking waiting for a reply that won't come. You should add an assert or logging or something here. Or something? It's just scary and has caused lots of trouble in the past.
Jer Noble
Comment 4
2015-02-25 13:40:54 PST
(In reply to
comment #3
)
> Comment on
attachment 247136
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=247136&action=review
> > > Source/WebKit2/UIProcess/WebPageProxy.cpp:1231 > > + m_viewStateChangeDispatcher->schedule(); > > If one of the suppressed changes was a view-in-window change or any of the > requests requested immediate dispatch, you should probably do that here > instead of waiting for the next runloop.
Well, the immediate dispatch thing should never happen if we add an ASSERT, as you suggest below. But why should we do the view-in-window change immediately? It's already been delayed; what's wrong with delaying a bit longer?
> > Source/WebKit2/UIProcess/WebPageProxy.cpp:1262 > > + if (m_suppressVisibilityUpdates) > > It is super dangerous for any viewStateDidChange call that > wantsSynchronousReply or immediate dispatch to bail like this, because often > the caller will be blocking waiting for a reply that won't come. > > You should add an assert or logging or something here. Or something? It's > just scary and has caused lots of trouble in the past.
Ok, lets add an ASSERT. From looking at all the call points, this should never get hit, but better safe than sorry.
Jer Noble
Comment 5
2015-02-25 13:49:55 PST
(In reply to
comment #4
)
> (In reply to
comment #3
) > > Comment on
attachment 247136
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=247136&action=review
> > > > > Source/WebKit2/UIProcess/WebPageProxy.cpp:1231 > > > + m_viewStateChangeDispatcher->schedule(); > > > > If one of the suppressed changes was a view-in-window change or any of the > > requests requested immediate dispatch, you should probably do that here > > instead of waiting for the next runloop. > > Well, the immediate dispatch thing should never happen if we add an ASSERT, > as you suggest below. But why should we do the view-in-window change > immediately? It's already been delayed; what's wrong with delaying a bit > longer? > > > > Source/WebKit2/UIProcess/WebPageProxy.cpp:1262 > > > + if (m_suppressVisibilityUpdates) > > > > It is super dangerous for any viewStateDidChange call that > > wantsSynchronousReply or immediate dispatch to bail like this, because often > > the caller will be blocking waiting for a reply that won't come. > > > > You should add an assert or logging or something here. Or something? It's > > just scary and has caused lots of trouble in the past. > > Ok, lets add an ASSERT. From looking at all the call points, this should > never get hit, but better safe than sorry.
Actually, looking at all the call sites, I think it would be safe here to just ignore the m_suppressVisibilityUpdates flag if immediate dispatch is requested.
Jer Noble
Comment 6
2015-02-25 13:54:11 PST
Created
attachment 247343
[details]
Patch
WebKit Commit Bot
Comment 7
2015-03-02 09:39:31 PST
Comment on
attachment 247343
[details]
Patch Clearing flags on attachment: 247343 Committed
r180886
: <
http://trac.webkit.org/changeset/180886
>
WebKit Commit Bot
Comment 8
2015-03-02 09:39:35 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug