inspector/heap/getRemoteObject.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=206903
Summary inspector/heap/getRemoteObject.html is a flaky crash
Alexey Proskuryakov
Reported 2020-01-28 12:49:06 PST
Now that inspector/heap/getRemoteObject.html is unskipped on WK2, it's flakily crashing again. Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 com.apple.JavaScriptCore 0x0000000107fd0773 WTFCrashWithInfo(int, char const*, char const*, int) + 19 (Assertions.h:618) 1 com.apple.JavaScriptCore 0x0000000107c58f29 Inspector::InjectedScriptModule::ensureInjected(Inspector::InjectedScriptManager*, Inspector::InjectedScript const&) + 2121 (JSString.h:788) 2 com.apple.WebCore 0x0000000103919240 WebCore::CommandLineAPIModule::injectIfNeeded(Inspector::InjectedScriptManager*, Inspector::InjectedScript const&) + 112 (CommandLineAPIModule.cpp:44) 3 com.apple.JavaScriptCore 0x0000000107c4e0b3 Inspector::InjectedScriptManager::injectedScriptFor(JSC::JSGlobalObject*) + 1011 (InjectedScriptBase.h:53) 4 com.apple.JavaScriptCore 0x0000000107cdbadf Inspector::InspectorHeapAgent::getRemoteObject(WTF::String&, int, WTF::String const*, WTF::RefPtr<Inspector::Protocol::Runtime::RemoteObject, WTF::DumbPtrTraits<Inspector::Protocol::Runtime::RemoteObject> >&) + 175 (InspectorHeapAgent.cpp:251) 5 com.apple.JavaScriptCore 0x0000000107c8303c Inspector::HeapBackendDispatcher::getRemoteObject(long, WTF::RefPtr<WTF::JSONImpl::Object, WTF::DumbPtrTraits<WTF::JSONImpl::Object> >&&) + 860 (InspectorBackendDispatchers.cpp:4137) 6 com.apple.JavaScriptCore 0x0000000107c81b4f Inspector::HeapBackendDispatcher::dispatch(long, WTF::String const&, WTF::Ref<WTF::JSONImpl::Object, WTF::DumbPtrTraits<WTF::JSONImpl::Object> >&&) + 1071 (utility:925) 7 com.apple.JavaScriptCore 0x0000000107c5aadd Inspector::BackendDispatcher::dispatch(WTF::String const&) + 2349 (Ref.h:60) 8 com.apple.WebKit 0x00000001011aaa14 void IPC::handleMessage<Messages::WebPage::SendMessageToTargetBackend, WebKit::WebPage, void (WebKit::WebPage::*)(WTF::String const&, WTF::String const&)>(IPC::Decoder&, WebKit::WebPage*, void (WebKit::WebPage::*)(WTF::String const&, WTF::String const&)) + 85 9 com.apple.WebKit 0x00000001011a6de0 WebKit::WebPage::didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&) + 4284 10 com.apple.WebKit 0x0000000100c950e8 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) + 114 11 com.apple.WebKit 0x000000010108bc5a WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 28 (WebProcess.cpp:745) 12 com.apple.WebKit 0x0000000100c7e414 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 176 (Connection.cpp:1079) 13 com.apple.WebKit 0x0000000100c7e613 IPC::Connection::dispatchOneIncomingMessage() + 199 (Connection.cpp:1146) 14 com.apple.JavaScriptCore 0x00000001073ffea4 WTF::RunLoop::performWork() + 228 (RunLoop.cpp:107) 15 com.apple.JavaScriptCore 0x0000000107400142 WTF::RunLoop::performWork(void*) + 34 (RunLoopCF.cpp:39)
Attachments
Update Test Expectations (1.44 KB, patch)
2020-02-03 09:47 PST, Jacob Uphoff
no flags
Radar WebKit Bug Importer
Comment 1 2020-01-28 12:49:17 PST
Alexey Proskuryakov
Comment 2 2020-01-28 12:54:01 PST
Same crash in debug, plus stderr output: stderr: Error when calling 'injectModule' for 'CommandLineAPI': SecurityError: Blocked a frame with origin "http://localhost:8800" from accessing a cross-origin frame. Protocols, domains, and ports must match. (26:79) //# sourceURL=__InjectedScript_CommandLineAPIModuleSource.js (function(InjectedScriptHost,inspectedGlobalObject,injectedScriptId,injectedScript,{RemoteObject,CommandLineAPI},CommandLineAPIHost){injectedScript._inspectObject=function(object){if(arguments.length===0) return;let objectId=RemoteObject.create(object);let hints={};switch(RemoteObject.describe(object)){case"Database":var databaseId=CommandLineAPIHost.databaseId(object);if(databaseId) hints.databaseId=databaseId;break;case"Storage":var storageId=CommandLineAPIHost.storageId(object);if(storageId) hints.domStorageId=InjectedScriptHost.evaluate("("+storageId+")");break;} CommandLineAPIHost.inspect(objectId,hints);};CommandLineAPI.getters["0"]=function(){return CommandLineAPIHost.inspectedObject();};CommandLineAPI.methods["copy"]=function(object){let string=null;let subtype=RemoteObject.subtype(object);if(subtype==="node") string=object.outerHTML;else if(subtype==="regexp") string=""+object;else if(injectedScript.isPrimitiveValue(object)) string=""+object;else if(typeof object==="symbol") string=inspectedGlobalObject.String(object);else if(typeof object==="function") string=""+object;else{try{string=inspectedGlobalObject.JSON.stringify(object,null," ");}catch{string=""+object;}} CommandLineAPIHost.copyText(string);};CommandLineAPI.methods["getEventListeners"]=function(target){return CommandLineAPIHost.getEventListeners(target);};function normalizeEventTypes(types){if(types===undefined) types=["mouse","key","touch","control","abort","blur","change","devicemotion","deviceorientation","error","focus","load","reset","resize","scroll","search","select","submit","unload"];else if(typeof types==="string") types=[types];let result=[];for(let i=0;i<types.length;i++){if(types[i]==="mouse") result.push("click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","mousewheel");else if(types[i]==="key") result.push("keydown","keypress","keyup","textInput");else if(types[i]==="touch") result.push("touchcancel","touchend","touchmove","touchstart");else if(types[i]==="control") result.push("blur","change","focus","reset","resize","scroll","select","submit","zoom");else result.push(types[i]);} return result;} function logEvent(event) {inspectedGlobalObject.console.log(event.type,event);} CommandLineAPI.methods["monitorEvents"]=function(object,types){if(!object||!object.addEventListener||!object.removeEventListener) return;types=normalizeEventTypes(types);for(let i=0;i<types.length;++i){object.removeEventListener(types[i],logEvent,false);object.addEventListener(types[i],logEvent,false);}};CommandLineAPI.methods["unmonitorEvents"]=function(object,types){if(!object||!object.addEventListener||!object.removeEventListener) return;types=normalizeEventTypes(types);for(let i=0;i<types.length;++i) object.removeEventListener(types[i],logEvent,false);};if(inspectedGlobalObject.document&&inspectedGlobalObject.Node){function canQuerySelectorOnNode(node){return node&&InjectedScriptHost.subtype(node)==="node"&&(node.nodeType===inspectedGlobalObject.Node.ELEMENT_NODE||node.nodeType===inspectedGlobalObject.Node.DOCUMENT_NODE||node.nodeType===inspectedGlobalObject.Node.DOCUMENT_FRAGMENT_NODE);} CommandLineAPI.methods["$"]=function(selector,start){if(canQuerySelectorOnNode(start)) return start.querySelector(selector);let result=inspectedGlobalObject.document.querySelector(selector);if(result) return result;if(selector&&selector[0]!=="#"){result=inspectedGlobalObject.document.getElementById(selector);if(result){inspectedGlobalObject.console.warn("The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $(\"#%s\")",selector);return null;}} return result;};CommandLineAPI.methods["$$"]=function(selector,start){if(canQuerySelectorOnNode(start)) return inspectedGlobalObject.Array.from(start.querySelectorAll(selector));return inspectedGlobalObject.Array.from(inspectedGlobalObject.document.querySelectorAll(selector));};CommandLineAPI.methods["$x"]=function(xpath,context){let doc=(context&&context.ownerDocument)||inspectedGlobalObject.document;let result=doc.evaluate(xpath,context||doc,null,inspectedGlobalObject.XPathResult.ANY_TYPE,null);switch(result.resultType){case inspectedGlobalObject.XPathResult.NUMBER_TYPE:return result.numberValue;case inspectedGlobalObject.XPathResult.STRING_TYPE:return result.stringValue;case inspectedGlobalObject.XPathResult.BOOLEAN_TYPE:return result.booleanValue;} let nodes=[];let node=null;while(node=result.iterateNext()) nodes.push(node);return nodes;};} for(let name in CommandLineAPI.methods) CommandLineAPI.methods[name].toString=function(){return"function "+name+"() { [Command Line API] }";};})
Alexey Proskuryakov
Comment 3 2020-01-29 16:27:37 PST
*** Bug 206936 has been marked as a duplicate of this bug. ***
Jacob Uphoff
Comment 5 2020-02-03 09:47:21 PST
Created attachment 389530 [details] Update Test Expectations
Truitt Savell
Comment 6 2020-02-03 09:54:27 PST
Comment on attachment 389530 [details] Update Test Expectations Clearing flags on attachment: 389530 Committed r255571: <https://trac.webkit.org/changeset/255571>
Note You need to log in before you can comment on or make changes to this bug.