Closed lyjappleclub closed 3 years ago
两种hook方式都会这样,我没用你们的webView 用了自定义的
objc_storeWeak + 200 frame #1: 0x0000000191e093b4 WebKit
ScriptMessageHandlerDelegate::didPostMessage(WebKit::WebPageProxy&, WebKit::FrameInfoData const&, WebCore::SerializedScriptValue&) + 208 frame #3: 0x000000019216b328 WebKit
void IPC::callMemberFunctionImpl<WebKit::WebUserContentControllerProxy, void (WebKit::WebUserContentControllerProxy::*)(IPC::Connection&, WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::FrameInfoData const&, unsigned long long, IPC::DataReference const&), std::__1::tuple<WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::FrameInfoData, unsigned long long, IPC::DataReference>, 0ul, 1ul, 2ul, 3ul>(WebKit::WebUserContentControllerProxy*, void (WebKit::WebUserContentControllerProxy::*)(IPC::Connection&, WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::FrameInfoData const&, unsigned long long, IPC::DataReference const&), IPC::Connection&, std::__1::tuple<WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::FrameInfoData, unsigned long long, IPC::DataReference>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul>) + 88 frame #5: 0x000000019236eac8 WebKit
IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) + 112 frame #7: 0x00000001920a8b68 WebKit
IPC::Connection::dispatchMessage(IPC::Decoder&) + 104 frame #9: 0x0000000191e25f88 WebKit
IPC::Connection::dispatchIncomingMessages() + 368 frame #11: 0x0000000199884914 JavaScriptCore
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 frame #14: 0x000000018a67805c CoreFoundation
__CFRunLoopRun + 1068 frame #17: 0x000000018a671f40 CoreFoundation
GSEventRunModal + 108 frame #19: 0x000000018e7fd580 UIKitCore
main(argc=1, argv=0x000000016b727788) at main.m:14:16 frame #21: 0x000000018a4f0e18 libdyld.dylib
两种hook方式都会这样,我没用你们的webView 用了自定义的
objc_storeWeak + 200 frame #1: 0x0000000191e093b4 WebKit
-[WKScriptMessage _initWithBody:webView:frameInfo:name:] + 132 frame #2: 0x0000000191fd4474 WebKitScriptMessageHandlerDelegate::didPostMessage(WebKit::WebPageProxy&, WebKit::FrameInfoData const&, WebCore::SerializedScriptValue&) + 208 frame #3: 0x000000019216b328 WebKit
WebKit::WebUserContentControllerProxy::didPostMessage(IPC::Connection&, WTF::ObjectIdentifiervoid IPC::callMemberFunctionImpl<WebKit::WebUserContentControllerProxy, void (WebKit::WebUserContentControllerProxy::*)(IPC::Connection&, WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::FrameInfoData const&, unsigned long long, IPC::DataReference const&), std::__1::tuple<WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::FrameInfoData, unsigned long long, IPC::DataReference>, 0ul, 1ul, 2ul, 3ul>(WebKit::WebUserContentControllerProxy*, void (WebKit::WebUserContentControllerProxy::*)(IPC::Connection&, WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::FrameInfoData const&, unsigned long long, IPC::DataReference const&), IPC::Connection&, std::__1::tuple<WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::FrameInfoData, unsigned long long, IPC::DataReference>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul>) + 88 frame #5: 0x000000019236eac8 WebKit
void IPC::handleMessage<Messages::WebUserContentControllerProxy::DidPostMessage, WebKit::WebUserContentControllerProxy, void (WebKit::WebUserContentControllerProxy::)(IPC::Connection&, WTF::ObjectIdentifierIPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) + 112 frame #7: 0x00000001920a8b68 WebKit
WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 36 frame #8: 0x0000000191e29638 WebKitIPC::Connection::dispatchMessage(IPC::Decoder&) + 104 frame #9: 0x0000000191e25f88 WebKit
IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_deleteIPC::Connection::dispatchIncomingMessages() + 368 frame #11: 0x0000000199884914 JavaScriptCore
WTF::RunLoop::performWork() + 272 frame #12: 0x0000000199884be4 JavaScriptCore`WTF::RunLoop::performWork(void__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 frame #14: 0x000000018a67805c CoreFoundation
CFRunLoopDoSource0 + 84 frame #15: 0x000000018a6777c8 CoreFoundation`CFRunLoopDoSources0 + 184 frame #16: 0x000000018a672694 CoreFoundation__CFRunLoopRun + 1068 frame #17: 0x000000018a671f40 CoreFoundation
CFRunLoopRunSpecific + 480 frame #18: 0x0000000194902534 GraphicsServicesGSEventRunModal + 108 frame #19: 0x000000018e7fd580 UIKitCore
UIApplicationMain + 1940 frame #20: 0x000000010470e0dcmain(argc=1, argv=0x000000016b727788) at main.m:14:16 frame #21: 0x000000018a4f0e18 libdyld.dylib
start + 4 (lldb)