2
如何調試WebKit?如何調試WebKit?
或者如何禁用WebKit中的「Crash Handler」?
如果崩潰發生,它只是崩潰的處理程序和正常退出(如下面)
當然,我在單進程模式下工作。
Marin:repro marin$ ../WebKit/Tools/Scripts/debug-safari repro/webkit_check.html
Starting SafariForWebKitDevelopment under lldb with DYLD_FRAMEWORK_PATH set to point to built WebKit in /Users/marin/WebKit/WebKitBuild/Debug.
(lldb) target create --arch=x86_64 "/Applications/Safari.app/Contents/MacOS/SafariForWebKitDevelopment"
Current executable set to '/Applications/Safari.app/Contents/MacOS/SafariForWebKitDevelopment' (x86_64).
(lldb) settings set -- target.run-args "repro/webkit_check.html"
(lldb) run
Process 1026 launched: '/Applications/Safari.app/Contents/MacOS/SafariForWebKitDevelopment' (x86_64)
2015-12-05 16:09:54.674 SafariForWebKitDevelopment[1026:15705] [AOSAccounts] : [__49-[ACAccountStore(iCloudAccount) icaAppleAccounts]_block_invoke] : accountsWithAccountType returned error: Error Domain=com.apple.accounts Code=9 "(null)"
2015-12-05 16:09:54.676 SafariForWebKitDevelopment[1026:15705] [AOSAccounts] : [__49-[ACAccountStore(iCloudAccount) icaAppleAccounts]_block_invoke] : accountsWithAccountType returned error: Error Domain=com.apple.accounts Code=9 "(null)"
ASSERTION FAILED: destination.deepEquivalent().anchorNode()->inDocument()
/Users/marin/WebKit/Source/WebCore/editing/CompositeEditCommand.cpp(1294) : void WebCore::CompositeEditCommand::moveParagraphs(const WebCore::VisiblePosition &, const WebCore::VisiblePosition &, const WebCore::VisiblePosition &, bool, bool)
1 0x10d0816b0 WTFCrash
2 0x10f0f7591 WebCore::CompositeEditCommand::moveParagraphs(WebCore::VisiblePosition const&, WebCore::VisiblePosition const&, WebCore::VisiblePosition const&, bool, bool)
3 0x10f0f6c87 WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary(WebCore::Position const&)
4 0x10eea4173 WebCore::ApplyStyleCommand::applyBlockStyle(WebCore::EditingStyle*)
5 0x10eea3c1a WebCore::ApplyStyleCommand::doApply()
6 0x10f0f1f38 WebCore::CompositeEditCommand::apply()
7 0x10f0f1e51 WebCore::applyCommand(WTF::PassRefPtr<WebCore::CompositeEditCommand>)
8 0x10f588250 WebCore::Editor::applyParagraphStyle(WebCore::StyleProperties*, WebCore::EditAction)
9 0x10f5a26f4 WebCore::executeApplyParagraphStyle(WebCore::Frame&, WebCore::EditorCommandSource, WebCore::EditAction, WebCore::CSSPropertyID, WTF::String const&)
10 0x10f59de25 WebCore::executeJustifyCenter(WebCore::Frame&, WebCore::Event*, WebCore::EditorCommandSource, WTF::String const&)
11 0x10f59d887 WebCore::Editor::Command::execute(WTF::String const&, WebCore::Event*) const
12 0x10f40b8b9 WebCore::Document::execCommand(WTF::String const&, bool, WTF::String const&)
13 0x10fe48c44 WebCore::jsDocumentPrototypeFunctionExecCommand(JSC::ExecState*)
14 0x3e628ac01028
15 0x10cd7cc7a llint_entry
16 0x10cd761fe vmEntryToJavaScript
17 0x10cbabf95 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*)
18 0x10cb75aa2 JSC::Interpreter::execute(JSC::ProgramExecutable*, JSC::ExecState*, JSC::JSObject*)
19 0x10c59a521 JSC::evaluate(JSC::ExecState*, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&)
20 0x110075b45 WebCore::JSMainThreadExecState::evaluate(JSC::ExecState*, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&)
21 0x110c14061 WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode const&, WebCore::DOMWrapperWorld&, WebCore::ExceptionDetails*)
22 0x110c141bc WebCore::ScriptController::evaluate(WebCore::ScriptSourceCode const&, WebCore::ExceptionDetails*)
23 0x110c23125 WebCore::ScriptElement::executeScript(WebCore::ScriptSourceCode const&)
24 0x110c22013 WebCore::ScriptElement::prepareScript(WTF::TextPosition const&, WebCore::ScriptElement::LegacyTypeSupport)
25 0x10f9e96b5 WebCore::HTMLScriptRunner::runScript(WebCore::Element*, WTF::TextPosition const&)
26 0x10f9e94c9 WebCore::HTMLScriptRunner::execute(WTF::PassRefPtr<WebCore::Element>, WTF::TextPosition const&)
27 0x10f915280 WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder()
28 0x10f915381 WebCore::HTMLDocumentParser::canTakeNextToken(WebCore::HTMLDocumentParser::SynchronousMode, WebCore::PumpSession&)
29 0x10f914711 WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode)
30 0x10f914359 WebCore::HTMLDocumentParser::pumpTokenizerIfPossible(WebCore::HTMLDocumentParser::SynchronousMode)
31 0x10f915e13 WebCore::HTMLDocumentParser::append(WTF::RefPtr<WTF::StringImpl>&&)
LEAK: 1 WebProcessPool
LEAK: 1 WebPageProxy
Process 1026 exited with status = 1 (0x00000001)
(lldb)