Bug 193338

Summary: Leak of WKWebProcessPlugInHitTestResult (160 bytes) in com.apple.WebKit.WebContent running layout tests
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Tools / TestsAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ddkilzer, joepeck, lforschler, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Joseph Pecoraro
Reported 2019-01-10 14:12:05 PST
Leak of WKWebProcessPlugInHitTestResult (160 bytes) in com.apple.WebKit.WebContent running layout tests STACK OF 1 INSTANCE OF 'ROOT LEAK: <WKWebProcessPlugInHitTestResult>': [thread 0x11214d5c0]: 112 libdyld.dylib 0x7fff633ad08d start + 1 111 com.apple.WebKit.WebContent 0x10d77a352 main + 34 110 com.apple.WebKit.WebContent 0x10d77a065 WebKit::XPCServiceMain(int, char const**) + 1333 109 libxpc.dylib 0x7fff635e39e5 _xpc_copy_xpcservice_dictionary + 0 108 libxpc.dylib 0x7fff635e3ee6 _xpc_objc_main + 555 107 com.apple.Foundation 0x7fff384b828f -[NSRunLoop(NSRunLoop) run] + 76 106 com.apple.Foundation 0x7fff384b83ba -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 280 105 com.apple.CoreFoundation 0x7fff36133be6 CFRunLoopRunSpecific + 467 104 com.apple.CoreFoundation 0x7fff36134303 __CFRunLoopRun + 1226 103 com.apple.CoreFoundation 0x7fff36134d5c __CFRunLoopDoSources0 + 195 102 com.apple.CoreFoundation 0x7fff36150eaf __CFRunLoopDoSource0 + 108 101 com.apple.CoreFoundation 0x7fff36150f09 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 100 com.apple.JavaScriptCore 0x3aea67174 WTF::RunLoop::performWork(void*) + 36 RunLoopCF.cpp:38 99 com.apple.JavaScriptCore 0x3aea667e3 WTF::RunLoop::performWork() + 211 RunLoop.cpp:107 98 com.apple.JavaScriptCore 0x3aea00dad WTF::Function<void ()>::operator()() const + 173 Function.h:56 97 com.apple.WebKit 0x39806d939 WTF::Function<void ()>::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14>::call() + 25 Function.h:101 96 com.apple.WebKit 0x39806da28 IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14::operator()() + 104 Connection.cpp:957 95 com.apple.WebKit 0x39804ccb7 IPC::Connection::dispatchOneIncomingMessage() + 1607 Connection.cpp:1074 94 com.apple.WebKit 0x39803e2d1 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 721 Connection.cpp:0 93 com.apple.WebKit 0x39804beec IPC::Connection::dispatchMessage(IPC::Decoder&) + 476 Connection.cpp:979 92 com.apple.WebKit 0x398e69a46 WebKit::NetworkProcessConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 166 NetworkProcessConnection.cpp:79 91 com.apple.WebKit 0x3992514dc WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&, IPC::Decoder&) + 636 WebResourceLoaderMessageReceiver.cpp:65 90 com.apple.WebKit 0x399251e28 void IPC::handleMessage<Messages::WebResourceLoader::DidFinishResourceLoad, WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&)>(IPC::Decoder&, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&)) + 296 HandleMessage.h:134 89 com.apple.WebKit 0x399252b20 void IPC::callMemberFunction<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&), std::__1::tuple<WebCore::NetworkLoadMetrics>, std::__1::integer_sequence<unsigned long, 0ul> >(std::__1::tuple<WebCore::NetworkLoadMetrics>&&, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&)) + 96 HandleMessage.h:48 88 com.apple.WebKit 0x399252c9a void IPC::callMemberFunctionImpl<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&), std::__1::tuple<WebCore::NetworkLoadMetrics>, 0ul>(WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&), std::__1::tuple<WebCore::NetworkLoadMetrics>&&, std::__1::integer_sequence<unsigned long, 0ul>) + 154 HandleMessage.h:42 87 com.apple.WebKit 0x398e77b49 WebKit::WebResourceLoader::didFinishResourceLoad(WebCore::NetworkLoadMetrics const&) + 457 WebResourceLoader.cpp:154 86 com.apple.WebCore 0x3a04fe50f WebCore::SubresourceLoader::didFinishLoading(WebCore::NetworkLoadMetrics const&) + 799 SubresourceLoader.cpp:636 85 com.apple.WebCore 0x3a0575096 WebCore::CachedRawResource::finishLoading(WebCore::SharedBuffer*) + 326 CachedRawResource.cpp:121 84 com.apple.WebCore 0x3a0575501 WebCore::CachedResource::finishLoading(WebCore::SharedBuffer*) + 49 CachedResource.cpp:366 83 com.apple.WebCore 0x3a057a6af WebCore::CachedResource::checkNotify() + 127 CachedResource.cpp:348 82 com.apple.WebCore 0x3a042cc19 WebCore::DocumentLoader::notifyFinished(WebCore::CachedResource&) + 505 DocumentLoader.cpp:385 81 com.apple.WebCore 0x3a042ce7f WebCore::DocumentLoader::finishedLoading() + 479 DocumentLoader.cpp:435 80 com.apple.WebCore 0x3a046c91a WebCore::DocumentWriter::end() + 394 DocumentWriter.cpp:284 79 com.apple.WebCore 0x3a01cc578 WebCore::HTMLDocumentParser::finish() + 72 HTMLDocumentParser.cpp:477 78 com.apple.WebCore 0x3a01cc49f WebCore::HTMLDocumentParser::attemptToEnd() + 63 HTMLDocumentParser.cpp:449 77 com.apple.WebCore 0x3a01c91a1 WebCore::HTMLDocumentParser::prepareToStopParsing() + 305 HTMLDocumentParser.cpp:142 76 com.apple.WebCore 0x3a01c94a5 WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd() + 325 HTMLDocumentParser.cpp:437 75 com.apple.WebCore 0x3a01cc438 WebCore::HTMLDocumentParser::end() + 264 HTMLDocumentParser.cpp:428 74 com.apple.WebCore 0x3a020aa35 WebCore::HTMLTreeBuilder::finished() + 261 HTMLTreeBuilder.cpp:2844 73 com.apple.WebCore 0x3a01c34b8 WebCore::HTMLConstructionSite::finishedParsing() + 24 HTMLConstructionSite.cpp:420 72 com.apple.WebCore 0x39fcbf0bf WebCore::Document::finishedParsing() + 623 Document.cpp:5678 71 com.apple.WebCore 0x3a04893e5 WebCore::FrameLoader::finishedParsing() + 293 FrameLoader.cpp:783 70 com.apple.WebCore 0x3a048b3c4 WebCore::FrameLoader::checkCompleted() + 532 FrameLoader.cpp:894 69 com.apple.WebCore 0x3a048b92b WebCore::FrameLoader::checkCallImplicitClose() + 155 FrameLoader.cpp:952 68 com.apple.WebCore 0x39fca4fd3 WebCore::Document::implicitClose() + 547 Document.cpp:2989 67 com.apple.WebCore 0x39fcacb68 WebCore::Document::dispatchWindowLoadEvent() + 136 Document.cpp:4566 66 com.apple.WebCore 0x3a05ed3d5 WebCore::DOMWindow::dispatchLoadEvent() + 309 DOMWindow.cpp:1977 65 com.apple.WebCore 0x3a05e3171 WebCore::DOMWindow::dispatchEvent(WebCore::Event&, WebCore::EventTarget*) + 449 DOMWindow.cpp:2028 64 com.apple.WebCore 0x39fd820f2 WebCore::EventTarget::fireEventListeners(WebCore::Event&, WebCore::EventTarget::EventInvokePhase) + 354 EventTarget.cpp:242 63 com.apple.WebCore 0x39fd8671c WebCore::EventTarget::innerInvokeEventListeners(WebCore::Event&, WTF::Vector<WTF::RefPtr<WebCore::RegisteredEventListener, WTF::DumbPtrTraits<WebCore::RegisteredEventListener> >, 1ul, WTF::CrashOnOverflow, 16ul>, WebCore::EventTarget::EventInvokePhase) + 1020 EventTarget.cpp:302 62 com.apple.WebCore 0x39f7ca884 WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext&, WebCore::Event&) + 2004 JSEventListener.cpp:175 61 com.apple.WebCore 0x39f78785b WebCore::JSExecState::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) + 139 JSExecState.h:74 60 com.apple.JavaScriptCore 0x3afddb70e JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) + 142 CallData.cpp:69 59 com.apple.JavaScriptCore 0x3afddb41a JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, WTF::NakedPtr<JSC::Exception>&) + 218 CallData.cpp:48 58 com.apple.JavaScriptCore 0x3afddb32c JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 236 CallData.cpp:41 57 com.apple.JavaScriptCore 0x3afb11929 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 1433 Interpreter.cpp:891 56 com.apple.JavaScriptCore 0x3afb1128e JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 206 JITCodeInlines.h:38 55 com.apple.JavaScriptCore 0x3aeebc0f2 vmEntryToJavaScript + 273 LowLevelInterpreter64.asm:295 54 com.apple.JavaScriptCore 0x3aeecf1eb llint_entry + 77442 LowLevelInterpreter.asm:899 53 com.apple.JavaScriptCore 0x3aeecf1eb llint_entry + 77442 LowLevelInterpreter.asm:899 52 0x571018c0102d 0x571018c01000 + 45 51 com.apple.JavaScriptCore 0x3aef536b1 long long JSC::APICallbackFunction::call<JSC::JSCallbackFunction>(JSC::ExecState*) + 577 APICallbackFunction.h:63 50 com.apple.WebKitTestRunner.InjectedBundle 0x3b62a02e1 WTR::JSEventSendingController::mouseUp(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) + 209 JSEventSendingController.cpp:117 49 com.apple.WebKitTestRunner.InjectedBundle 0x3b627998e WTR::EventSendingController::mouseUp(int, OpaqueJSValue const*) + 206 EventSendingController.cpp:235 48 com.apple.WebKit 0x398e462c9 WKBundlePagePostSynchronousMessageForTesting + 105 WKBundlePage.cpp:706 47 com.apple.WebKit 0x3991057b5 WebKit::WebPage::postSynchronousMessageForTesting(WTF::String const&, API::Object*, WTF::RefPtr<API::Object, WTF::DumbPtrTraits<API::Object> >&) + 341 WebPage.cpp:6070 46 com.apple.WebKit 0x3991058e9 bool IPC::MessageSender::sendSync<Messages::WebPageProxy::HandleSynchronousMessage>(Messages::WebPageProxy::HandleSynchronousMessage&&, Messages::WebPageProxy::HandleSynchronousMessage::Reply&&, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 121 MessageSender.h:57 45 com.apple.WebKit 0x39914099d bool IPC::MessageSender::sendSync<Messages::WebPageProxy::HandleSynchronousMessage>(Messages::WebPageProxy::HandleSynchronousMessage&&, Messages::WebPageProxy::HandleSynchronousMessage::Reply&&, unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 221 MessageSender.h:65 44 com.apple.WebKit 0x399140d84 bool IPC::Connection::sendSync<Messages::WebPageProxy::HandleSynchronousMessage>(Messages::WebPageProxy::HandleSynchronousMessage&&, Messages::WebPageProxy::HandleSynchronousMessage::Reply&&, unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 948 Connection.h:473 43 com.apple.WebKit 0x398042ce1 IPC::Connection::sendSyncMessage(unsigned long long, std::__1::unique_ptr<IPC::Encoder, std::__1::default_delete<IPC::Encoder> >, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 1665 Connection.cpp:0 42 com.apple.WebKit 0x398044d5a IPC::Connection::waitForSyncReply(unsigned long long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) + 266 Connection.cpp:592 41 com.apple.WebKit 0x39803db9f IPC::Connection::SyncMessageState::dispatchMessages(IPC::Connection*) + 943 Connection.cpp:182 40 com.apple.WebKit 0x39803e292 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 658 Connection.cpp:1003 39 com.apple.WebKit 0x39804b448 IPC::Connection::dispatchSyncMessage(IPC::Decoder&) + 1720 Connection.cpp:897 38 com.apple.WebKit 0x39803db9f IPC::Connection::SyncMessageState::dispatchMessages(IPC::Connection*) + 943 Connection.cpp:182 37 com.apple.WebKit 0x39803e2d1 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 721 Connection.cpp:0 36 com.apple.WebKit 0x39804beec IPC::Connection::dispatchMessage(IPC::Decoder&) + 476 Connection.cpp:979 35 com.apple.WebKit 0x398d9565d WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 61 WebProcess.cpp:676 34 com.apple.WebKit 0x3980b579a IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) + 490 MessageReceiverMap.cpp:124 33 com.apple.WebKit 0x3990faa9e WebKit::WebPage::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 510 WebPage.cpp:4265 32 com.apple.WebKit 0x39914b538 WebKit::WebPage::didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&) + 1976 WebPageMessageReceiver.cpp:277 31 com.apple.WebKit 0x3991536e9 void IPC::handleMessage<Messages::WebPage::MouseEvent, WebKit::WebPage, void (WebKit::WebPage::*)(WebKit::WebMouseEvent const&)>(IPC::Decoder&, WebKit::WebPage*, void (WebKit::WebPage::*)(WebKit::WebMouseEvent const&)) + 281 HandleMessage.h:134 30 com.apple.WebKit 0x399168300 void IPC::callMemberFunction<WebKit::WebPage, void (WebKit::WebPage::*)(WebKit::WebMouseEvent const&), std::__1::tuple<WebKit::WebMouseEvent>, std::__1::integer_sequence<unsigned long, 0ul> >(std::__1::tuple<WebKit::WebMouseEvent>&&, WebKit::WebPage*, void (WebKit::WebPage::*)(WebKit::WebMouseEvent const&)) + 96 HandleMessage.h:48 29 com.apple.WebKit 0x3991683aa void IPC::callMemberFunctionImpl<WebKit::WebPage, void (WebKit::WebPage::*)(WebKit::WebMouseEvent const&), std::__1::tuple<WebKit::WebMouseEvent>, 0ul>(WebKit::WebPage*, void (WebKit::WebPage::*)(WebKit::WebMouseEvent const&), std::__1::tuple<WebKit::WebMouseEvent>&&, std::__1::integer_sequence<unsigned long, 0ul>) + 154 HandleMessage.h:42 28 com.apple.WebKit 0x3990f2342 WebKit::WebPage::mouseEvent(WebKit::WebMouseEvent const&) + 402 WebPage.cpp:2556 27 com.apple.WebKit 0x3990f259d WebKit::handleMouseEvent(WebKit::WebMouseEvent const&, WebKit::WebPage*) + 317 WebPage.cpp:2497 26 com.apple.WebCore 0x3a11082a3 WebCore::UserInputBridge::handleMouseReleaseEvent(WebCore::PlatformMouseEvent const&, WebCore::InputSource) + 51 UserInputBridge.cpp:62 25 com.apple.WebCore 0x3a063022b WebCore::EventHandler::handleMouseReleaseEvent(WebCore::PlatformMouseEvent const&) + 1707 EventHandler.cpp:2132 24 com.apple.WebCore 0x3a062d48f WebCore::EventHandler::dispatchMouseEvent(WTF::AtomicString const&, WebCore::Node*, bool, int, WebCore::PlatformMouseEvent const&, bool) + 223 EventHandler.cpp:2592 23 com.apple.WebCore 0x39fd51643 WebCore::Element::dispatchMouseEvent(WebCore::PlatformMouseEvent const&, WTF::AtomicString const&, int, WebCore::Element*) + 499 Element.cpp:288 22 com.apple.WebCore 0x39fde7ffd WebCore::Node::dispatchEvent(WebCore::Event&) + 29 Node.cpp:2385 21 com.apple.WebCore 0x39fd7d7be WebCore::EventDispatcher::dispatchEvent(WebCore::Node&, WebCore::Event&) + 766 EventDispatcher.cpp:170 20 com.apple.WebCore 0x39fd7de2c WebCore::callDefaultEventHandlersInBubblingOrder(WebCore::Event&, WebCore::EventPath const&) + 332 EventDispatcher.cpp:70 19 com.apple.WebCore 0x3a001423d WebCore::HTMLAnchorElement::defaultEventHandler(WebCore::Event&) + 221 HTMLAnchorElement.cpp:181 18 com.apple.WebCore 0x3a0014ae7 WebCore::HTMLAnchorElement::handleClick(WebCore::Event&) + 1239 HTMLAnchorElement.cpp:441 17 com.apple.WebCore 0x3a0487ac2 WebCore::FrameLoader::urlSelected(WTF::URL const&, WTF::String const&, WebCore::Event*, WebCore::LockHistory, WebCore::LockBackForwardList, WebCore::ShouldSendReferrer, WebCore::ShouldOpenExternalURLsPolicy, std::optional<WebCore::NewFrameOpenerPolicy>, WTF::AtomicString const&, WebCore::SystemPreviewInfo const&) + 578 FrameLoader.cpp:388 16 com.apple.WebCore 0x3a0487848 WebCore::FrameLoader::urlSelected(WebCore::FrameLoadRequest&&, WebCore::Event*) + 360 FrameLoader.cpp:404 15 com.apple.WebCore 0x3a0488121 WebCore::FrameLoader::loadFrameRequest(WebCore::FrameLoadRequest&&, WebCore::Event*, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&) + 1057 FrameLoader.cpp:1280 14 com.apple.WebCore 0x3a048d956 WebCore::FrameLoader::loadURL(WebCore::FrameLoadRequest&&, WTF::String const&, WebCore::FrameLoadType, WebCore::Event*, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WTF::CompletionHandler<void ()>&&) + 2694 FrameLoader.cpp:1404 13 com.apple.WebCore 0x3a049078e WebCore::FrameLoader::loadWithNavigationAction(WebCore::ResourceRequest const&, WebCore::NavigationAction&&, WebCore::LockHistory, WebCore::FrameLoadType, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WebCore::AllowNavigationToInvalidURL, WTF::CompletionHandler<void ()>&&) + 846 FrameLoader.cpp:1489 12 com.apple.WebCore 0x3a0491ddd WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WebCore::AllowNavigationToInvalidURL, WebCore::ShouldTreatAsContinuingLoad, WTF::CompletionHandler<void ()>&&) + 2461 FrameLoader.cpp:1612 11 com.apple.WebCore 0x3a04d7cf3 WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WebCore::DocumentLoader*, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&, WTF::WeakPtr<WebCore::FormState>&&, WebCore::ShouldContinue)>&&, WebCore::PolicyDecisionMode) + 2563 PolicyChecker.cpp:175 10 com.apple.WebKit 0x398f5cf7e WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(WebCore::NavigationAction const&, WebCore::ResourceRequest const&, WebCore::ResourceResponse const&, WebCore::FormState*, WebCore::PolicyDecisionMode, WTF::Function<void (WebCore::PolicyAction)>&&) + 430 WebFrameLoaderClient.cpp:837 9 com.apple.WebKit 0x398e2a521 WebKit::InjectedBundleNavigationAction::create(WebKit::WebFrame*, WebCore::NavigationAction const&, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&) + 97 InjectedBundleNavigationAction.cpp:95 8 com.apple.WebKit 0x398e2a5ed WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction(WebKit::WebFrame*, WebCore::NavigationAction const&, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&) + 45 InjectedBundleNavigationAction.cpp:115 7 com.apple.WebKit 0x398e2a7fd WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction(WebKit::WebFrame*, WebCore::NavigationAction const&, WTF::RefPtr<WebCore::FormState, WTF::DumbPtrTraits<WebCore::FormState> >&&) + 509 InjectedBundleNavigationAction.cpp:107 6 com.apple.WebKit 0x398e29746 WebKit::InjectedBundleHitTestResult::create(WebCore::HitTestResult const&) + 38 InjectedBundleHitTestResult.cpp:48 5 com.apple.WebKit 0x398e2978a API::ObjectImpl<(API::Object::Type)111>::operator new(unsigned long) + 26 APIObject.h:265 4 com.apple.WebKit 0x3984027ad API::Object::newObject(unsigned long, API::Object::Type) + 1773 APIObject.mm:358 3 libobjc.A.dylib 0x7fff622db099 _objc_rootAlloc + 45 2 libobjc.A.dylib 0x7fff622d73f0 class_createInstance + 83 1 libsystem_malloc.dylib 0x7fff6355ccba calloc + 30 0 libsystem_malloc.dylib 0x7fff6355cd62 malloc_zone_calloc + 139 ==== 1 (160 bytes) ROOT LEAK: <WKWebProcessPlugInHitTestResult 0x7f8ec3d60cf0> [160]
Attachments
[PATCH] Proposed Fix (1.99 KB, patch)
2019-01-10 14:14 PST, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2019-01-10 14:12:18 PST
Joseph Pecoraro
Comment 2 2019-01-10 14:14:50 PST
Created attachment 358834 [details] [PATCH] Proposed Fix
David Kilzer (:ddkilzer)
Comment 3 2019-01-10 14:38:13 PST
Comment on attachment 358834 [details] [PATCH] Proposed Fix r=me
David Kilzer (:ddkilzer)
Comment 4 2019-01-10 14:42:23 PST
Comment on attachment 358834 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=358834&action=review > Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:1379 > - WKBundleHitTestResultRef hitTestResultRef = WKBundleNavigationActionCopyHitTestResult(navigationAction); > + WKRetainPtr<WKBundleHitTestResultRef> hitTestResultRef = adoptWK(WKBundleNavigationActionCopyHitTestResult(navigationAction)); > if (hitTestResultRef) { > + WKRetainPtr<WKBundleNodeHandleRef> nodeHandleRef = adoptWK(WKBundleHitTestResultCopyNodeHandle(hitTestResultRef.get())); > stringBuilder.appendLiteral(" originating from "); > - stringBuilder.append(dumpPath(m_page, m_world.get(), WKBundleHitTestResultCopyNodeHandle(hitTestResultRef))); > + stringBuilder.append(dumpPath(m_page, m_world.get(), nodeHandleRef.get())); This change is fine, but it would be nice if WKBundleNavigationActionCopyHitTestResult() and WKBundleHitTestResultCopyNodeHandle() both returned a WKRetain<> value instead of raw pointers to make this mistake harder to make! The clang static analyzer won't reason about these functions (even though they have "Copy" in the name) because they're not returning CFTypes. (I'm not sure labeling them with CF_RETURNS_RETAINED would even work as expected.)
David Kilzer (:ddkilzer)
Comment 5 2019-01-10 14:49:12 PST
Comment on attachment 358834 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=358834&action=review >> Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:1379 >> + stringBuilder.append(dumpPath(m_page, m_world.get(), nodeHandleRef.get())); > > This change is fine, but it would be nice if WKBundleNavigationActionCopyHitTestResult() and WKBundleHitTestResultCopyNodeHandle() both returned a WKRetain<> value instead of raw pointers to make this mistake harder to make! > > The clang static analyzer won't reason about these functions (even though they have "Copy" in the name) because they're not returning CFTypes. (I'm not sure labeling them with CF_RETURNS_RETAINED would even work as expected.) Darin may say the second change will be easier to read in one line (vis a vis Bug 192481 and r239050): stringBuilder.append(dumpPath(m_page, m_world.get(), adoptWK(WKBundleHitTestResultCopyNodeHandle(hitTestResultRef)).get())); I think it's easier to reason about shorter lines of code, though. :)
Joseph Pecoraro
Comment 6 2019-01-10 14:54:21 PST
Comment on attachment 358834 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=358834&action=review >>> Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:1379 >>> + stringBuilder.append(dumpPath(m_page, m_world.get(), nodeHandleRef.get())); >> >> This change is fine, but it would be nice if WKBundleNavigationActionCopyHitTestResult() and WKBundleHitTestResultCopyNodeHandle() both returned a WKRetain<> value instead of raw pointers to make this mistake harder to make! >> >> The clang static analyzer won't reason about these functions (even though they have "Copy" in the name) because they're not returning CFTypes. (I'm not sure labeling them with CF_RETURNS_RETAINED would even work as expected.) > > Darin may say the second change will be easier to read in one line (vis a vis Bug 192481 and r239050): > > stringBuilder.append(dumpPath(m_page, m_world.get(), adoptWK(WKBundleHitTestResultCopyNodeHandle(hitTestResultRef)).get())); > > I think it's easier to reason about shorter lines of code, though. :) We don't have any WebKit APIs or SPIs that return a WKRetainPtr that I'm aware of. Only test code. I agree with shorter lines in this case which is why I went that route.
WebKit Commit Bot
Comment 7 2019-01-10 15:03:56 PST
Comment on attachment 358834 [details] [PATCH] Proposed Fix Clearing flags on attachment: 358834 Committed r239848: <https://trac.webkit.org/changeset/239848>
WebKit Commit Bot
Comment 8 2019-01-10 15:03:57 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.