Bug 221653

Summary: Stop using GenericCallback from WebPageProxy
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, cmarcelo, ews-watchlist, gyuyoung.kim, luiz, mcatanzaro, ryuan.choi, sergio, webkit-bug-importer, zeno
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=221741
https://bugs.webkit.org/show_bug.cgi?id=221843
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
ews-feeder: commit-queue-
Patch
none
Patch none

Description Alex Christensen 2021-02-09 22:52:15 PST
Stop using GenericCallback from WebPageProxy
Comment 1 Alex Christensen 2021-02-09 22:53:34 PST
Created attachment 419817 [details]
Patch
Comment 2 Alex Christensen 2021-02-10 08:54:18 PST
Created attachment 419850 [details]
Patch
Comment 3 Alex Christensen 2021-02-10 11:14:48 PST
Created attachment 419870 [details]
Patch
Comment 4 Alex Christensen 2021-02-10 19:06:45 PST
r272702
Comment 5 Ryan Haddad 2021-02-10 21:23:59 PST
Reverted r272702 for reason:

Caused assertion failure on macOS debug WK2 bots

Committed r272705: <https://trac.webkit.org/changeset/272705>
Comment 6 Alex Christensen 2021-02-11 13:45:08 PST
Created attachment 420038 [details]
Patch
Comment 7 Alex Christensen 2021-02-11 14:21:55 PST
Created attachment 420044 [details]
Patch
Comment 8 Alex Christensen 2021-02-12 09:50:54 PST
r272784
Comment 9 Radar WebKit Bug Importer 2021-02-12 09:51:14 PST
<rdar://problem/74280146>
Comment 10 Michael Catanzaro 2021-02-15 13:13:58 PST
This introduced an unused variable warning:

[1954/2287] Building CXX object Source/WebKit/CMakeFiles/...ces/WebKit/unified-sources/UnifiedSource-88d1702b-7.cpp.o
In file included from DerivedSources/WebKit/unified-sources/UnifiedSource-88d1702b-7.cpp:8:
../../Source/WebKit/UIProcess/WebPageProxy.cpp: In member function ‘void WebKit::WebPageProxy::resetState(WebKit::WebPageProxy::ResetStateReason)’:
../../Source/WebKit/UIProcess/WebPageProxy.cpp:7462:25: warning: variable ‘error’ set but not used [-Wunused-but-set-variable]
 7462 |     CallbackBase::Error error { };
      |                         ^~~~~

Solution is:

diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp
index 48d74e2fa57f..e25bca9cfad6 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp
@@ -7459,18 +7459,6 @@ void WebPageProxy::resetState(ResetStateReason resetStateReason)
     m_webDeviceOrientationUpdateProviderProxy = nullptr;
 #endif
 
-    CallbackBase::Error error { };
-    switch (resetStateReason) {
-    case ResetStateReason::NavigationSwap:
-        FALLTHROUGH;
-    case ResetStateReason::PageInvalidated:
-        error = CallbackBase::Error::OwnerWasInvalidated;
-        break;
-    case ResetStateReason::WebProcessExited:
-        error = CallbackBase::Error::ProcessExited;
-        break;
-    }
-
     for (auto& editCommand : std::exchange(m_editCommandSet, { }))
         editCommand->invalidate();

Will attach a follow-up.
Comment 11 Michael Catanzaro 2021-02-15 13:14:54 PST
Created attachment 420355 [details]
Patch
Comment 12 EWS 2021-02-15 14:03:24 PST
Committed r272879: <https://commits.webkit.org/r272879>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 420355 [details].