Hello everyone, I'm implementing DumpRenderTree.cpp, I've got my own WebKit port ( I'm not using WebKit2). I'm working on Linux x86_64, with JSC/JIT, rev127214 There is an ASSERT when I call 'gTestRunner->makeWindowObject()' , I don't know what I'm doing wrong, maybe someone can give me a hint.
Basically I'm doing what other ports are doing. /* WebCoreSupport/WebFrameLoaderClient implements WebCore::FrameLoaderClient interface */ void WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* world) { SharedPtr<WebFrameLoadDelegate> frameLoaderDelegate = m_webFrame->webView()->webFrameLoadDelegate(); if (frameLoaderDelegate) { Frame* coreFrame = core(m_webFrame); ASSERT(coreFrame); if( world == mainThreadNormalWorld() ) { JSGlobalContextRef context = toGlobalRef(coreFrame->script()->globalObject(world)->globalExec()); JSObjectRef windowObject = toRef(coreFrame->script()->globalObject(world)); ASSERT(windowObject); frameLoaderDelegate->didClearWindowObjectInWorld(m_webFrame, context, windowObject); } } } /* In DumpRenderTree.cpp */ void FrameLoaderDelegate::didClearWindowObjectInWorld(WebFrame*, JSContextRef context, JSObjectRef windowObject) { JSValueRef exception = 0; assert(gTestRunner); gTestRunner->makeWindowObject(context, windowObject, &exception); assert(!exception); } The backtrace is the following : ASSERTION FAILED: from.isCell() && from.asCell()->JSCell::inherits(&WTF::RemovePointer<To>::Type::s_info) WebKit/Source/JavaScriptCore/runtime/JSCell.h(361) : To JSC::jsCast(JSC::JSValue) [with To = JSC::JSScope*] p from {u = {asInt64 = 140736154433152, ptr = 0x7fffb07df680, asBits = {payload = -1333922176, tag = 32767}}} bt #0 0x0000000000449821 in JSC::jsCast<JSC::JSScope*> (from=...) at /WebKit/Source/JavaScriptCore/runtime/JSCell.h:361 #1 0x0000000000448668 in JSC::Register::scope (this=0x7fffb07df890) at /WebKit/Source/JavaScriptCore/runtime/JSScope.h:162 #2 0x0000000000447534 in JSC::ExecState::scope (this=0x7fffb07df8a8) at /WebKit/Source/JavaScriptCore/interpreter/CallFrame.h:47 #3 0x0000000000448682 in JSC::ExecState::globalData (this=0x7fffb07df8a8) at /WebKit/Source/JavaScriptCore/runtime/JSScope.h:167 #4 0x0000000000449026 in JSC::APIEntryShim::APIEntryShim (this=0x7fffffffd080, exec=0x7fffb07df8a8, registerThread=true) at /WebKit/Source/JavaScriptCore/API/APIShims.h:73 #5 0x000000000044b382 in JSObjectMake (ctx=0x7fffb07df8a8, jsClass=0x107c7b0, data=0xfb2100) at /WebKit/Source/JavaScriptCore/API/JSObjectRef.cpp:79 #6 0x000000000042d561 in TestRunner::*makeWindowObject* (this=0xfb2100, context=0x7fffb07df8a8, windowObject=0x7fffb07df680, exception= 0x7fffffffd168) at /WebKit/Tools/DumpRenderTree/TestRunner.cpp:2258 #7 0x000000000043a963 in FrameLoadDelegate::didClearWindowObjectInWorld (this=0xfb2010, context=0x7fffb07df8a8, windowObject= 0x7fffb07df680) at /WebKit/Tools/DumpRenderTree/inverto/DumpRenderTree.cpp:530 #8 0x00007ffff2f38ff5 in WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld (this=0xfba8d0, world=0x1029160) at /WebKit/Source/WebKit/inverto/WebCoreSupport/WebFrameLoaderClient.cpp:925 #9 0x00007ffff325e57d in WebCore::FrameLoader::* dispatchDidClearWindowObjectInWorld* (this=0xfbb228, world=0x1029160) at /WebKit/Source/WebCore/loader/FrameLoader.cpp:3180 #10 0x00007ffff377307e in WebCore::ScriptController::initScript (this=0xfbb668, world=0x1029160) at /WebKit/Source/WebCore/bindings/js/ScriptController.cpp:232 #11 0x00007ffff2f3aaf5 in WebCore::ScriptController::windowShell (this=0xfbb668, world=0x1029160) at /WebKit/Source/WebCore/bindings/js/ScriptController.h:77 #12 0x00007ffff37729f5 in WebCore::ScriptController::evaluateInWorld (this=0xfbb668, sourceCode=..., world=0x1029160) at /WebKit/Source/WebCore/bindings/js/ScriptController.cpp:134 #13 0x00007ffff3772c04 in WebCore::ScriptController::evaluate (this=0xfbb668, sourceCode=...) at /WebKit/Source/WebCore/bindings/js/ScriptController.cpp:165 #14 0x00007ffff3c3f6ed in WebCore::ScriptElement::executeScript (this=0x101e220, sourceCode=...) at /WebKit/Source/WebCore/dom/ScriptElement.cpp:301 #15 0x00007ffff317ceb6 in WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent (this=0x1046e60, pendingScript=...) at /WebKit/Source/WebCore/html/parser/HTMLScriptRunner.cpp:139 #16 0x00007ffff317cd09 in WebCore::HTMLScriptRunner::executeParsingBlockingScript (this=0x1046e60) at /WebKit/Source/WebCore/html/parser/HTMLScriptRunner.cpp:118 #17 0x00007ffff317d234 in WebCore::HTMLScriptRunner::executeParsingBlockingScripts (this=0x1046e60) at /WebKit/Source/WebCore/html/parser/HTMLScriptRunner.cpp:190 #18 0x00007ffff317d3d2 in WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad (this=0x1046e60, cachedScript=0x10a2de0) at /WebKit/Source/WebCore/html/parser/HTMLScriptRunner.cpp:199 #19 0x00007ffff3177dcb in WebCore::HTMLDocumentParser::notifyFinished (this=0x1045ac0, cachedResource=0x10a2de0) at /WebKit/Source/WebCore/html/parser/HTMLDocumentParser.cpp:514 #20 0x00007ffff32aa41c in WebCore::CachedResource::checkNotify (this=0x10a2de0) at /WebKit/Source/WebCore/loader/cache/CachedResource.cpp:248 #21 0x00007ffff32be191 in WebCore::CachedScript::data (this=0x10a2de0, data=..., allDataReceived=true) at /WebKit/Source/WebCore/loader/cache/CachedScript.cpp:90 #22 0x00007ffff328664d in WebCore::SubresourceLoader::didFinishLoading (this=0x10362e0, finishTime=0) at /WebKit/Source/WebCore/loader/SubresourceLoader.cpp:298 #23 0x00007ffff3282049 in WebCore::ResourceLoader::didFinishLoading (this=0x10362e0, finishTime=0) at /WebKit/Source/WebCore/loader/ResourceLoader.cpp:441 #24 0x00007ffff399d7f6 in WebCore::ResourceHandleManager::downloadTimerCallback (this=0x10334d0, timer=0x10334d0) at /WebKit/Source/WebCore/platform/network/inverto/ResourceHandleManager.cpp:425 I've compiled GTK port and tested DumpRenderTree, it works without any problem.
_______________________________________________ webkit-help mailing list webkit-help@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-help