WebKit Bugzilla
Attachment 356397 Details for
Bug 192318
: Update process assertions after swapping processes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192318-20181203130733.patch (text/plain), 5.49 KB, created by
Alex Christensen
on 2018-12-03 13:07:33 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2018-12-03 13:07:33 PST
Size:
5.49 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 238814) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,24 @@ >+2018-12-03 Alex Christensen <achristensen@webkit.org> >+ >+ Update process assertions after swapping processes >+ https://bugs.webkit.org/show_bug.cgi?id=192318 >+ <rdar://problem/46377552> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ If the previous WebProcess had a ProcessAssertion to prevent it from being suspended >+ after navigation and process swapping we need the new WebProcess to update its process assertions. >+ >+ * UIProcess/API/Cocoa/PageLoadStateObserver.h: >+ * UIProcess/Cocoa/NavigationState.h: >+ * UIProcess/Cocoa/NavigationState.mm: >+ (WebKit::NavigationState::didSwapWebProcesses): >+ * UIProcess/PageLoadState.cpp: >+ (WebKit::PageLoadState::didSwapWebProcesses): >+ * UIProcess/PageLoadState.h: >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::finishAttachingToWebProcess): >+ > 2018-12-03 Daniel Bates <dabates@apple.com> > > [iOS] Do not handle key events that are key commands >Index: Source/WebKit/UIProcess/PageLoadState.cpp >=================================================================== >--- Source/WebKit/UIProcess/PageLoadState.cpp (revision 238771) >+++ Source/WebKit/UIProcess/PageLoadState.cpp (working copy) >@@ -407,6 +407,11 @@ bool PageLoadState::isLoading(const Data > return false; > } > >+void PageLoadState::didSwapWebProcesses() >+{ >+ callObserverCallback(&Observer::didSwapWebProcesses); >+} >+ > void PageLoadState::willChangeProcessIsResponsive() > { > callObserverCallback(&Observer::willChangeWebProcessIsResponsive); >Index: Source/WebKit/UIProcess/PageLoadState.h >=================================================================== >--- Source/WebKit/UIProcess/PageLoadState.h (revision 238771) >+++ Source/WebKit/UIProcess/PageLoadState.h (working copy) >@@ -78,6 +78,8 @@ public: > > virtual void willChangeWebProcessIsResponsive() = 0; > virtual void didChangeWebProcessIsResponsive() = 0; >+ >+ virtual void didSwapWebProcesses() = 0; > }; > > class Transaction { >@@ -165,6 +167,8 @@ public: > void didFinishProgress(const Transaction::Token&); > void setNetworkRequestsInProgress(const Transaction::Token&, bool); > >+ void didSwapWebProcesses(); >+ > bool committedHasInsecureContent() const { return m_committedState.hasInsecureContent; } > > // FIXME: We piggy-back off PageLoadState::Observer so that both WKWebView and WKObservablePageState >Index: Source/WebKit/UIProcess/WebPageProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.cpp (revision 238771) >+++ Source/WebKit/UIProcess/WebPageProxy.cpp (working copy) >@@ -852,6 +852,7 @@ void WebPageProxy::finishAttachingToWebP > createInspectorTargets(); > > pageClient().didRelaunchProcess(); >+ m_pageLoadState.didSwapWebProcesses(); > m_drawingArea->waitForBackingStoreUpdateOnNextPaint(); > } > >Index: Source/WebKit/UIProcess/API/Cocoa/PageLoadStateObserver.h >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/PageLoadStateObserver.h (revision 238771) >+++ Source/WebKit/UIProcess/API/Cocoa/PageLoadStateObserver.h (working copy) >@@ -97,6 +97,7 @@ private: > void didChangeNetworkRequestsInProgress() override { } > void willChangeCertificateInfo() override { } > void didChangeCertificateInfo() override { } >+ void didSwapWebProcesses() override { } > > void willChangeWebProcessIsResponsive() override > { >Index: Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp >=================================================================== >--- Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp (revision 238771) >+++ Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp (working copy) >@@ -354,6 +354,7 @@ private: > void didChangeCertificateInfo() override { } > void willChangeWebProcessIsResponsive() override { } > void didChangeWebProcessIsResponsive() override { } >+ void didSwapWebProcesses() override { }; > > WebKitWebView* m_webView; > }; >Index: Source/WebKit/UIProcess/Cocoa/NavigationState.h >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/NavigationState.h (revision 238771) >+++ Source/WebKit/UIProcess/Cocoa/NavigationState.h (working copy) >@@ -176,6 +176,7 @@ private: > void didChangeCertificateInfo() override; > void willChangeWebProcessIsResponsive() override; > void didChangeWebProcessIsResponsive() override; >+ void didSwapWebProcesses() override; > > #if PLATFORM(IOS_FAMILY) > void releaseNetworkActivityTokenAfterLoadCompletion() { releaseNetworkActivityToken(NetworkActivityTokenReleaseReason::LoadCompleted); } >Index: Source/WebKit/UIProcess/Cocoa/NavigationState.mm >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/NavigationState.mm (revision 238771) >+++ Source/WebKit/UIProcess/Cocoa/NavigationState.mm (working copy) >@@ -1226,6 +1226,15 @@ void NavigationState::didChangeWebProces > [m_webView didChangeValueForKey:@"_webProcessIsResponsive"]; > } > >+void NavigationState::didSwapWebProcesses() >+{ >+#if PLATFORM(IOS_FAMILY) >+ // Take the process assertion from the old web process. >+ if (m_activityToken) >+ m_activityToken = m_webView->_page->process().throttler().backgroundActivityToken(); >+#endif >+} >+ > } // namespace WebKit > > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192318
:
356395
| 356397