RESOLVED FIXED 109987
[JSC]: ASSERT in KURL(ParsedURLStringTag) under sourceMapURLForScript
https://bugs.webkit.org/show_bug.cgi?id=109987
Summary [JSC]: ASSERT in KURL(ParsedURLStringTag) under sourceMapURLForScript
Joseph Pecoraro
Reported 2013-02-15 16:45:07 PST
* STEPS TO REPRODUCE 1. Load a page with <script src="foo.js"></script> and the script has "//@ sourceURL=/one/two" 2. Open the inspector for the page 3. Reload the page => ASSERT ASSERTION FAILED: url.isEmpty() || isSchemeFirstChar(url[0]) /Volumes/SSData/Development/OSX/webkit/OpenSource/Source/WebCore/platform/KURL.cpp(317) : void WebCore::checkEncodedString(const WTF::String &) 1 0x1040b4825 WebCore::checkEncodedString(WTF::String const&) 2 0x1040af60a WebCore::KURL::parse(WTF::String const&) 3 0x1040af580 WebCore::KURL::KURL(WebCore::ParsedURLStringTag, WTF::String const&) 4 0x1040af543 WebCore::KURL::KURL(WebCore::ParsedURLStringTag, WTF::String const&) 5 0x103a30e16 WebCore::InspectorDebuggerAgent::sourceMapURLForScript(WebCore::ScriptDebugListener::Script const&) 6 0x103a30f3e WebCore::InspectorDebuggerAgent::didParseSource(WTF::String const&, WebCore::ScriptDebugListener::Script const&) 7 0x103a31627 non-virtual thunk to WebCore::InspectorDebuggerAgent::didParseSource(WTF::String const&, WebCore::ScriptDebugListener::Script const&) 8 0x1045abd36 WebCore::ScriptDebugServer::dispatchDidParseSource(WTF::HashSet<WebCore::ScriptDebugListener*, WTF::PtrHash<WebCore::ScriptDebugListener*>, WTF::HashTraits<WebCore::ScriptDebugListener*> > const&, JSC::SourceProvider*, bool) 9 0x1045ac078 WebCore::ScriptDebugServer::sourceParsed(JSC::ExecState*, JSC::SourceProvider*, int, WTF::String const&) 10 0x102212835 (anonymous namespace)::Recompiler::~Recompiler() 11 0x102212265 (anonymous namespace)::Recompiler::~Recompiler() 12 0x102212131 JSC::Debugger::recompileAllJSFunctions(JSC::JSGlobalData*) 13 0x1042038c9 WebCore::PageScriptDebugServer::recompileAllJSFunctions(WebCore::Timer<WebCore::ScriptDebugServer>*) 14 0x1045b4ad3 WebCore::Timer<WebCore::ScriptDebugServer>::fired()
Attachments
[PATCH] Proposed fix and test (4.53 KB, patch)
2013-02-15 17:11 PST, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2013-02-15 16:46:34 PST
Looks like there was duplicate sourceURL parsing on the JSC side. This caused use to override the real Script.url with the sourceURL before its expected. So in sourceMapURLForScript, JSC was working with the sourceURL url, instead of the real script url.
Joseph Pecoraro
Comment 2 2013-02-15 16:46:47 PST
Joseph Pecoraro
Comment 3 2013-02-15 16:50:58 PST
I'll try to write a test for this to see if this hits the v8 side as well.
Joseph Pecoraro
Comment 4 2013-02-15 16:54:06 PST
Easier way to test this. Just eval the following in the console: js> //@ sourceURL=/one/two
Joseph Pecoraro
Comment 5 2013-02-15 17:11:56 PST
Created attachment 188670 [details] [PATCH] Proposed fix and test
WebKit Review Bot
Comment 6 2013-02-18 10:34:45 PST
Comment on attachment 188670 [details] [PATCH] Proposed fix and test Clearing flags on attachment: 188670 Committed r143240: <http://trac.webkit.org/changeset/143240>
WebKit Review Bot
Comment 7 2013-02-18 10:34:50 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.