RESOLVED FIXED 225481
[iOS] Safari sometimes hangs underneath `WebKit::UIDelegate::UIClient::createNewPage`
https://bugs.webkit.org/show_bug.cgi?id=225481
Summary [iOS] Safari sometimes hangs underneath `WebKit::UIDelegate::UIClient::create...
Wenson Hsieh
Reported 2021-05-06 14:16:09 PDT
Attachments
Patch (8.27 KB, patch)
2021-05-06 14:41 PDT, Wenson Hsieh
no flags
For EWS (12.46 KB, patch)
2021-05-06 17:44 PDT, Wenson Hsieh
ews-feeder: commit-queue-
Fix non-internal builds (12.45 KB, patch)
2021-05-06 17:52 PDT, Wenson Hsieh
cdumez: review+
Use %{public}s (12.45 KB, patch)
2021-05-06 19:26 PDT, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 2021-05-06 14:41:11 PDT
Chris Dumez
Comment 2 2021-05-06 17:00:03 PDT
Comment on attachment 427937 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427937&action=review > Source/WebKit/Platform/IPC/Connection.cpp:573 > The patch doesn't seem to apply to tip of tree. Could you please make sure we have an ASSERT(isMainRunLoop()) in Connection::waitForMessage() and Connection::dispatchSyncMessage() since we're using m_inDispatchSyncMessageCount in both? > Source/WebKit/Platform/IPC/Connection.cpp:940 > + m_inDispatchSyncMessageCount++; Would use prefixed version: ++m_inDispatchSyncMessageCount; > Source/WebKit/Platform/IPC/Connection.cpp:942 > + m_inDispatchSyncMessageCount--; Would use prefixed version and add an assertion for extra safety: ASSERT(m_inDispatchSyncMessageCount); --m_inDispatchSyncMessageCount; > Source/WebKit/Platform/IPC/Timeout.h:41 > + constexpr bool isInfinity() const { return !m_deadline; } Isn't m_deadline MonotonicTime::infinity() when we're infinity?
Chris Dumez
Comment 3 2021-05-06 17:04:58 PDT
Comment on attachment 427937 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427937&action=review >> Source/WebKit/Platform/IPC/Timeout.h:41 >> + constexpr bool isInfinity() const { return !m_deadline; } > > Isn't m_deadline MonotonicTime::infinity() when we're infinity? I *think* this should be `std::isnan(m_deadline)`
Chris Dumez
Comment 4 2021-05-06 17:05:40 PDT
(In reply to Chris Dumez from comment #3) > Comment on attachment 427937 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=427937&action=review > > >> Source/WebKit/Platform/IPC/Timeout.h:41 > >> + constexpr bool isInfinity() const { return !m_deadline; } > > > > Isn't m_deadline MonotonicTime::infinity() when we're infinity? > > I *think* this should be `std::isnan(m_deadline)` I meant std::isinf().
Wenson Hsieh
Comment 5 2021-05-06 17:17:14 PDT
Comment on attachment 427937 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427937&action=review >> Source/WebKit/Platform/IPC/Connection.cpp:573 >> > > The patch doesn't seem to apply to tip of tree. Could you please make sure we have an ASSERT(isMainRunLoop()) in Connection::waitForMessage() and Connection::dispatchSyncMessage() since we're using m_inDispatchSyncMessageCount in both? That's odd — it seemed to apply when I just pulled. Will add the assertions! >> Source/WebKit/Platform/IPC/Connection.cpp:940 >> + m_inDispatchSyncMessageCount++; > > Would use prefixed version: ++m_inDispatchSyncMessageCount; 👍🏻 >> Source/WebKit/Platform/IPC/Connection.cpp:942 >> + m_inDispatchSyncMessageCount--; > > Would use prefixed version and add an assertion for extra safety: > ASSERT(m_inDispatchSyncMessageCount); > --m_inDispatchSyncMessageCount; Good call! >>>> Source/WebKit/Platform/IPC/Timeout.h:41 >>>> + constexpr bool isInfinity() const { return !m_deadline; } >>> >>> Isn't m_deadline MonotonicTime::infinity() when we're infinity? >> >> I *think* this should be `std::isnan(m_deadline)` > > I meant std::isinf(). Good catch — changing this to `std::isinf(m_deadline)`. I didn't see the private constructor below, and thought that it initialized m_deadline to the default MonotonicTime :(
Wenson Hsieh
Comment 6 2021-05-06 17:28:46 PDT
For some reason, it looks like Timeout.h isn't in the Xcode project either. I'll go ahead and add it there while I'm making changes...
Wenson Hsieh
Comment 7 2021-05-06 17:44:26 PDT
Wenson Hsieh
Comment 8 2021-05-06 17:52:41 PDT
Created attachment 427968 [details] Fix non-internal builds
Chris Dumez
Comment 9 2021-05-06 18:21:57 PDT
Comment on attachment 427968 [details] Fix non-internal builds View in context: https://bugs.webkit.org/attachment.cgi?id=427968&action=review > Source/WebKit/Platform/IPC/Connection.cpp:575 > + RELEASE_LOG_ERROR(IPC, "Connection::waitForMessage(%s): Exiting immediately, since we're handling a sync message already", description(messageName)); %{public}s
Wenson Hsieh
Comment 10 2021-05-06 19:26:27 PDT
Created attachment 427971 [details] Use %{public}s
EWS
Comment 11 2021-05-07 05:05:50 PDT
Committed r277169 (237455@main): <https://commits.webkit.org/237455@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 427971 [details].
Note You need to log in before you can comment on or make changes to this bug.