ASSERTION FAILED: m_refCount > 0 (../../../qtwebkit-webkit2-dev/JavaScriptCore/wtf/RefCounted.h:83 bool WTF::RefCountedBase::derefBase()) occurs when closing a window. Apparently a ref is missing, when WebPageProxy is destroyed. I am still yet to check it out on Mac, but with Qt, it is easy to reproduce. It looks like, during the construction of a new page, we lose one ref in WebUIClient::createNewPage(), when we call adoptRef on the WebPageProxy object. I'm puzzled why this adoptRef is called (WebUIClient.cpp line#78), when we already call adoptRef on the object, when it is being created (WebPageProxy::create()). Looking at the 'new page' callback backtrace, I can't see where this extra (adopted) ref would come from. When adoptRef() is removed, refcount goes back to normal and no assert on window.close().
Created attachment 73586 [details] remove extra adoptref
Comment on attachment 73586 [details] remove extra adoptref The implementation of createNewPage should return a retained WKPageRef, so the existing code is correct.
This is probably a bug in the test program, not WebKit2 itself.
ok, thanks for the clarification.
Created attachment 74380 [details] retain WKPageRef
Comment on attachment 74380 [details] retain WKPageRef LGTM
The commit-queue encountered the following flaky tests while processing attachment 74380 [details]: fast/profiler/throw-exception-from-eval.html Please file bugs against the tests. These tests were authored by kmccullough@apple.com, oliver@apple.com, and timothy@apple.com. The commit-queue is continuing to process your patch.
Comment on attachment 74380 [details] retain WKPageRef Clearing flags on attachment: 74380 Committed r72468: <http://trac.webkit.org/changeset/72468>
All reviewed patches have been landed. Closing bug.