Bug 230223 - Crash under WebPage::runJavaScript()
Summary: Crash under WebPage::runJavaScript()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-13 10:07 PDT by Chris Dumez
Modified: 2021-09-13 15:06 PDT (History)
4 users (show)

See Also:


Attachments
Patch (5.99 KB, patch)
2021-09-13 10:12 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (5.54 KB, patch)
2021-09-13 10:58 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (5.50 KB, patch)
2021-09-13 11:00 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2021-09-13 10:07:40 PDT
Crash under WebPage::runJavaScript():
Thread 0 Crashed ↩::   Dispatch queue: com.apple.main-thread
0   WebKit                        	       0x18f3fb988 WTF::Detail::CallableWrapper<WebKit::WebPage::runJavaScript(WebKit::WebFrame*, WebCore::RunJavaScriptParameters&&, WTF::ObjectIdentifier<WebKit::ContentWorldIdentifierType>, WTF::CompletionHandler<void (IPC::ArrayReference<unsigned char, 18446744073709551615ul> const&, std::__1::optional<WebCore::ExceptionDetails> const&)>&&)::$_3, void, std::experimental::fundamentals_v3::expected<JSC::JSValue, WebCore::ExceptionDetails> >::call(std::experimental::fundamentals_v3::expected<JSC::JSValue, WebCore::ExceptionDetails>) + 60
1   WebCore                       	       0x1904f3a5c WTF::CompletionHandler<void (std::experimental::fundamentals_v3::expected<JSC::JSValue, WebCore::ExceptionDetails>)>::operator()(std::experimental::fundamentals_v3::expected<JSC::JSValue, WebCore::ExceptionDetails>) + 152
2   WebCore                       	       0x1904f3a5c WTF::CompletionHandler<void (std::experimental::fundamentals_v3::expected<JSC::JSValue, WebCore::ExceptionDetails>)>::operator()(std::experimental::fundamentals_v3::expected<JSC::JSValue, WebCore::ExceptionDetails>) + 152
3   WebCore                       	       0x1904f257c WebCore::ScriptController::executeAsynchronousUserAgentScriptInWorld(WebCore::DOMWrapperWorld&, WebCore::RunJavaScriptParameters&&, WTF::CompletionHandler<void (std::experimental::fundamentals_v3::expected<JSC::JSValue, WebCore::ExceptionDetails>)>&&) + 1084
4   WebKit                        	       0x18f3ecc44 WebKit::WebPage::runJavaScriptInFrameInScriptWorld(WebCore::RunJavaScriptParameters&&, std::__1::optional<WTF::ObjectIdentifier<WebCore::FrameIdentifierType> >, std::__1::pair<WTF::ObjectIdentifier<WebKit::ContentWorldIdentifierType>, WTF::String> const&, WTF::CompletionHandler<void (IPC::ArrayReference<unsigned char, 18446744073709551615ul> const&, std::__1::optional<WebCore::ExceptionDetails> const&)>&&) + 1368
5   WebKit                        	       0x18f414708 WebKit::WebPage::didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&) + 56424
6   WebKit                        	       0x18ed0f2d0 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) + 272
7   WebKit                        	       0x18f248e90 WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 40
8   WebKit                        	       0x18eced010 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 808
9   WebKit                        	       0x18ecefbb4 WTF::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_11, void>::call() + 224
10  JavaScriptCore                	       0x18c60c5e4 WTF::RunLoop::performWork() + 292
Comment 1 Chris Dumez 2021-09-13 10:07:47 PDT
<rdar://80172436>
Comment 2 Chris Dumez 2021-09-13 10:12:42 PDT
Created attachment 438050 [details]
Patch
Comment 3 Alex Christensen 2021-09-13 10:45:34 PDT
Comment on attachment 438050 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=438050&action=review

> Tools/TestWebKitAPI/Tests/WebKitCocoa/AsyncFunction.mm:37
> +@interface AsyncJSUIDelegate : NSObject <WKUIDelegate>

TestUIDelegate has things to do this.
Comment 4 Chris Dumez 2021-09-13 10:47:02 PDT
(In reply to Alex Christensen from comment #3)
> Comment on attachment 438050 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=438050&action=review
> 
> > Tools/TestWebKitAPI/Tests/WebKitCocoa/AsyncFunction.mm:37
> > +@interface AsyncJSUIDelegate : NSObject <WKUIDelegate>
> 
> TestUIDelegate has things to do this.

Oh, I didn't know. I'll look into adopting it before landing. Thanks.
Comment 5 Chris Dumez 2021-09-13 10:58:45 PDT
Created attachment 438055 [details]
Patch
Comment 6 Chris Dumez 2021-09-13 11:00:06 PDT
Created attachment 438056 [details]
Patch
Comment 7 EWS 2021-09-13 15:06:53 PDT
Committed r282365 (241628@main): <https://commits.webkit.org/241628@main>

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