Bug 214098

Summary: ASSERTION FAILURE: Completion handlers not invalidated when WebPage::~WebPage() invoked navigating to docs.google.com and signing in
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, ggaren, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Chris Dumez 2020-07-08 14:20:33 PDT
ASSERTION FAILURE: Completion handlers not invalidated when WebPage::~WebPage() invoked navigating to docs.google.com and signing in:
#0	0x000000012090306e in ::WTFCrash() at Source/WTF/wtf/Assertions.cpp:295
#1	0x000000011455e637 in WTF::CompletionHandler<void (bool)>::~CompletionHandler() at Source/WTF/wtf/CompletionHandler.h:53
#2	0x000000011455c285 in WTF::CompletionHandler<void (bool)>::~CompletionHandler() at Source/WTF/wtf/CompletionHandler.h:52
#3	0x000000011535cc3f in WTF::VectorDestructor<true, WTF::CompletionHandler<void (bool)> >::destruct(WTF::CompletionHandler<void (bool)>*, WTF::CompletionHandler<void (bool)>*) at Source/WTF/wtf/Vector.h:66
#4	0x000000011535cb9d in WTF::VectorTypeOperations<WTF::CompletionHandler<void (bool)> >::destruct(WTF::CompletionHandler<void (bool)>*, WTF::CompletionHandler<void (bool)>*) at Source/WTF/wtf/Vector.h:242
#5	0x000000011535cb60 in WTF::Vector<WTF::CompletionHandler<void (bool)>, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>::~Vector() at Source/WTF/wtf/Vector.h:677
#6	0x0000000115277615 in WTF::Vector<WTF::CompletionHandler<void (bool)>, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>::~Vector() at Source/WTF/wtf/Vector.h:675
#7	0x0000000115c0b049 in WebKit::WebPage::~WebPage() at Source/WebKit/WebProcess/WebPage/WebPage.cpp:895
#8	0x0000000115c0bb95 in WebKit::WebPage::~WebPage() at Source/WebKit/WebProcess/WebPage/WebPage.cpp:867
#9	0x00000001154e918b in -[WKWebProcessPlugInBrowserContextController dealloc] at Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:355
#10	0x000000010ba23964 in objc_object::sidetable_release(bool, bool) ()
#11	0x0000000114a248ed in API::Object::deref() const at Source/WebKit/Shared/Cocoa/APIObject.mm:114
#12	0x0000000115760d5f in WTF::Ref<WebKit::WebPage, WTF::DumbPtrTraits<WebKit::WebPage> >::~Ref() at Source/WTF/wtf/Ref.h:61
#13	0x000000011573a805 in WTF::Ref<WebKit::WebPage, WTF::DumbPtrTraits<WebKit::WebPage> >::~Ref() at Source/WTF/wtf/Ref.h:55
#14	0x0000000115c7996c in WebKit::WebPage::didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&) at /Volumes/Scratch/WebKitBuild/Debug-iphonesimulator/DerivedSources/WebKit2/WebPageMessageReceiver.cpp:2743
#15	0x0000000115c1e312 in WebKit::WebPage::didReceiveMessage(IPC::Connection&, IPC::Decoder&) at Source/WebKit/WebProcess/WebPage/WebPage.cpp:4624
#16	0x0000000114500201 in IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) at Source/WebKit/Platform/IPC/MessageReceiverMap.cpp:123
#17	0x000000011573af67 in WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&) at Source/WebKit/WebProcess/WebProcess.cpp:770
#18	0x0000000114453fbf in IPC::Connection::dispatchMessage(IPC::Decoder&) at Source/WebKit/Platform/IPC/Connection.cpp:1001
#19	0x0000000114454910 in IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) at Source/WebKit/Platform/IPC/Connection.cpp:1070
#20	0x0000000114454f70 in IPC::Connection::dispatchOneIncomingMessage() at Source/WebKit/Platform/IPC/Connection.cpp:1139
#21	0x00000001144731ce in IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_7::operator()() at Source/WebKit/Platform/IPC/Connection.cpp:978
#22	0x00000001144730de in WTF::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_7, void>::call() at Source/WTF/wtf/Function.h:52
#23	0x000000012092bc42 in WTF::Function<void ()>::operator()() const at Source/WTF/wtf/Function.h:84
#24	0x000000012099cbb8 in WTF::RunLoop::performWork() at Source/WTF/wtf/RunLoop.cpp:140
#25	0x000000012099d591 in WTF::RunLoop::performWork(void*) at Source/WTF/wtf/cf/RunLoopCF.cpp:38
#26	0x000000010bb938bc in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
Comment 1 Chris Dumez 2020-07-08 14:20:49 PDT
<rdar://problem/64848288>
Comment 2 Chris Dumez 2020-07-08 14:22:55 PDT
Created attachment 403810 [details]
Patch
Comment 3 Geoffrey Garen 2020-07-08 14:29:28 PDT
Comment on attachment 403810 [details]
Patch

r=me
Comment 4 EWS 2020-07-08 15:07:27 PDT
Committed r264138: <https://trac.webkit.org/changeset/264138>

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