我们在基于iOS Cordova的应用程序中面临以下崩溃:
Crashed: WebThread
0 JavaScriptCore 0x187a3b22c WTFCrash + 72
1 JavaScriptCore 0x187a3b224 WTFCrash + 64
2 WebCore 0x187d6c4fc WebCore::CSSParser::addNamespace(WTF::AtomicString const&, WTF::AtomicString const&) + 186
3 WebCore 0x188a6ecac WebCore::TextResourceDecoder::decodeAndFlush(char const*, unsigned long) + 192
4 WebCore 0x187cb5c9c WebCore::CachedScript::script() + 72
5 JavaScriptCore 0x187a21f20 std::__1::unique_ptr<JSC::FunctionNode, std::__1::default_delete<JSC::FunctionNode> > JSC::parse<JSC::FunctionNode>(JSC::VM*, JSC::SourceCode const&, JSC::FunctionParameters*, JSC::Identifier const&, JSC::JSParserBuiltinMode, JSC::JSParserStrictMode, JSC::JSParserCodeType, JSC::ParserError&, JSC::JSTextPosition*, JSC::ConstructorKind, JSC::ThisTDZMode) + 88
6 JavaScriptCore 0x187a21550 JSC::UnlinkedFunctionExecutable::codeBlockFor(JSC::VM&, JSC::SourceCode const&, JSC::CodeSpecializationKind, JSC::DebuggerMode, JSC::ProfilerMode, JSC::ParserError&) + 156
7 JavaScriptCore 0x1877a3440 JSC::ScriptExecutable::newCodeBlockFor(JSC::CodeSpecializationKind, JSC::JSFunction*, JSC::JSScope*, JSC::JSObject*&) + 508
8 JavaScriptCore 0x1877a3a70 JSC::ScriptExecutable::prepareForExecutionImpl(JSC::ExecState*, JSC::JSFunction*, JSC::JSScope*, JSC::CodeSpecializationKind) + 104
9 JavaScriptCore 0x1875229b0 JSC::LLInt::setUpCall(JSC::ExecState*, JSC::Instruction*, JSC::CodeSpecializationKind, JSC::JSValue, JSC::LLIntCallLinkInfo*) + 164
10 JavaScriptCore 0x187961e58 llint_entry + 23912
11 JavaScriptCore 0x187961d44 llint_entry + 23636
我尝试检查源代码并找到以下内容:
void CSSParser::addNamespace(const AtomicString& prefix, const AtomicString& uri)
{
if (!m_styleSheet || !m_allowNamespaceDeclarations)
return;
m_allowImportRules = false;
m_styleSheet->parserAddNamespace(prefix, uri);
if (prefix.isEmpty() && !uri.isNull())
m_defaultNamespace = uri;
}
但我无法弄清楚WTFCrash会在哪里发生。有什么想法吗?