WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
153037
WebKit2 should have an API for eagerly querying whether the web process is responsive
https://bugs.webkit.org/show_bug.cgi?id=153037
Summary
WebKit2 should have an API for eagerly querying whether the web process is re...
Geoffrey Garen
Reported
2016-01-12 13:18:49 PST
WebKit2 should have an API for eagerly querying whether the web process is responsive
Attachments
Patch
(9.16 KB, patch)
2016-01-12 13:28 PST
,
Geoffrey Garen
no flags
Details
Formatted Diff
Diff
Patch
(9.21 KB, patch)
2016-01-12 14:38 PST
,
Geoffrey Garen
thorton
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Geoffrey Garen
Comment 1
2016-01-12 13:28:25 PST
Created
attachment 268805
[details]
Patch
WebKit Commit Bot
Comment 2
2016-01-12 13:30:19 PST
Attachment 268805
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/WebPageProxy.cpp:2643: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/UIProcess/WebPageProxy.h:746: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Anders Carlsson
Comment 3
2016-01-12 13:43:09 PST
Comment on
attachment 268805
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268805&action=review
> Source/WebKit2/UIProcess/WebPageProxy.cpp:2647 > + callbackFunction(webProcessIsResponsive);
You don't want to call this directly from the callback; it needs to be asynchronous. Please use RunLoop::main().dispatch.
> Source/WebKit2/UIProcess/WebProcessProxy.cpp:558 > + Vector<std::function<void(bool webProcessIsResponsive)>> isResponsiveCallbacks = WTFMove(m_isResponsiveCallbacks);
auto isResponsiveCallbacks?
> Source/WebKit2/UIProcess/WebProcessProxy.cpp:1004 > + bool webProcessIsResponsive = false; > + callback(webProcessIsResponsive);
Same callback about being asynchronous here.
> Source/WebKit2/UIProcess/WebProcessProxy.h:258 > + bool m_isResponsive;
m_isResponsive doesn't reflect the member variable fully. Here's my understanding: m_isResponsive = false -> We know that the web process is unresponsive. m_isResponsive = true -> We think that the web process is responsive. Maybe rename it to m_isKnownToBeUnresponsive and then invert the checks?
Geoffrey Garen
Comment 4
2016-01-12 14:38:42 PST
Created
attachment 268813
[details]
Patch
WebKit Commit Bot
Comment 5
2016-01-12 14:39:29 PST
Attachment 268813
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/WebPageProxy.cpp:2643: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/UIProcess/WebPageProxy.h:746: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Geoffrey Garen
Comment 6
2016-01-12 14:39:52 PST
>
https://bugs.webkit.org/attachment.cgi?id=268805&action=review
> > > Source/WebKit2/UIProcess/WebPageProxy.cpp:2647 > > + callbackFunction(webProcessIsResponsive); > > You don't want to call this directly from the callback; it needs to be > asynchronous. Please use RunLoop::main().dispatch.
Fixed.
> > > Source/WebKit2/UIProcess/WebProcessProxy.cpp:558 > > + Vector<std::function<void(bool webProcessIsResponsive)>> isResponsiveCallbacks = WTFMove(m_isResponsiveCallbacks); > > auto isResponsiveCallbacks?
Fixed.
> > > Source/WebKit2/UIProcess/WebProcessProxy.cpp:1004 > > + bool webProcessIsResponsive = false; > > + callback(webProcessIsResponsive); > > Same callback about being asynchronous here.
Fixed.
> > Source/WebKit2/UIProcess/WebProcessProxy.h:258 > > + bool m_isResponsive; > > m_isResponsive doesn't reflect the member variable fully. Here's my > understanding: > > m_isResponsive = false -> We know that the web process is unresponsive. > m_isResponsive = true -> We think that the web process is responsive. > > Maybe rename it to m_isKnownToBeUnresponsive and then invert the checks?
I made this an enum. I renamed the API to remove "get" from the name since Tim and Alex seemed not to like "get".
Geoffrey Garen
Comment 7
2016-01-12 14:49:59 PST
(Anders didn't like "get" either.)
Geoffrey Garen
Comment 8
2016-01-13 14:45:51 PST
Committed
r194986
: <
http://trac.webkit.org/changeset/194986
>
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