Bug 221653 - Stop using GenericCallback from WebPageProxy
Summary: Stop using GenericCallback from WebPageProxy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-02-09 22:52 PST by Alex Christensen
Modified: 2021-02-15 14:03 PST (History)
10 users (show)

See Also:


Attachments
Patch (67.90 KB, patch)
2021-02-09 22:53 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (70.20 KB, patch)
2021-02-10 08:54 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (70.21 KB, patch)
2021-02-10 11:14 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (70.88 KB, patch)
2021-02-11 13:45 PST, Alex Christensen
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (71.49 KB, patch)
2021-02-11 14:21 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (1.61 KB, patch)
2021-02-15 13:14 PST, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].