Changeset 143240 in webkit


Ignore:
Timestamp:
Feb 18, 2013 10:33:04 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[JSC]: ASSERT in KURL(ParsedURLStringTag) under sourceMapURLForScript
https://bugs.webkit.org/show_bug.cgi?id=109987

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2013-02-18
Reviewed by Pavel Feldman.

Source/WebCore:

Improved an existing test to cover this.

  • bindings/js/ScriptDebugServer.cpp:

(WebCore::ScriptDebugServer::dispatchDidParseSource):
Remove the sourceURL parsing and script.url replacement from the JSC
implementation of ScriptDebugServer. The WebCore inspector code that
this was added for already does this, at a more appropriate time.

LayoutTests:

  • inspector/debugger/source-url-comment-expected.txt:
  • inspector/debugger/source-url-comment.html:

Add a test for a sourceURL with a non-relative path. This was causing
an ASSERT, rightfully so, in JSC builds.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r143239 r143240  
     12013-02-18  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        [JSC]: ASSERT in KURL(ParsedURLStringTag) under sourceMapURLForScript
     4        https://bugs.webkit.org/show_bug.cgi?id=109987
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * inspector/debugger/source-url-comment-expected.txt:
     9        * inspector/debugger/source-url-comment.html:
     10        Add a test for a sourceURL with a non-relative path. This was causing
     11        an ASSERT, rightfully so, in JSC builds.
     12
    1132013-02-18  Mike West  <mkwst@chromium.org>
    214
  • trunk/LayoutTests/inspector/debugger/source-url-comment-expected.txt

    r130138 r143240  
    1212function keepAliveInDynamicScript() {}
    1313//@ sourceURL=dynamicScriptURL.js
     14
     15Running: testNonRelativeURL
     16function relativeURLScript() {}
     17//@ sourceURL=/js/nonRelativeURL.js
    1418Debugger was disabled.
    1519
  • trunk/LayoutTests/inspector/debugger/source-url-comment.html

    r139859 r143240  
    1212{
    1313    eval("function keepAlive() {}\n//@ sourceURL=evalURL.js");
     14}
     15
     16function doEvalWithNonRelativeURL()
     17{
     18    eval("function relativeURLScript() {}\n//@ sourceURL=/js/nonRelativeURL.js");
    1419}
    1520
     
    8893                next();
    8994            }
     95        },
     96
     97        function testNonRelativeURL(next)
     98        {
     99            InspectorTest.showScriptSource("nonRelativeURL.js", didShowScriptSource);
     100            InspectorTest.evaluateInPage("setTimeout(doEvalWithNonRelativeURL, 0)");
     101
     102            function didShowScriptSource(sourceFrame)
     103            {
     104                function checkScriptHasSourceURL(script)
     105                {
     106                    InspectorTest.assertTrue(script.hasSourceURL, "hasSourceURL flag is not set for eval with a non-relative URL in a sourceURL comment");
     107                }
     108
     109                InspectorTest.addResult(sourceFrame.textEditor.text());
     110                forEachScriptMatchingURL("nonRelativeURL.js", checkScriptHasSourceURL);
     111                next();
     112            }
    90113        }
    91114    ]);
  • trunk/Source/WebCore/ChangeLog

    r143239 r143240  
     12013-02-18  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        [JSC]: ASSERT in KURL(ParsedURLStringTag) under sourceMapURLForScript
     4        https://bugs.webkit.org/show_bug.cgi?id=109987
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Improved an existing test to cover this.
     9
     10        * bindings/js/ScriptDebugServer.cpp:
     11        (WebCore::ScriptDebugServer::dispatchDidParseSource):
     12        Remove the sourceURL parsing and script.url replacement from the JSC
     13        implementation of ScriptDebugServer. The WebCore inspector code that
     14        this was added for already does this, at a more appropriate time.
     15
    1162013-02-18  Mike West  <mkwst@chromium.org>
    217
  • trunk/Source/WebCore/bindings/js/ScriptDebugServer.cpp

    r140062 r143240  
    293293    script.isContentScript = isContentScript;
    294294
    295 #if ENABLE(INSPECTOR)
    296     if (!script.startLine && !script.startColumn) {
    297         String sourceURL = ContentSearchUtils::findSourceURL(script.source);
    298         if (!sourceURL.isEmpty())
    299             script.url = sourceURL;
    300     }
    301 #endif
    302 
    303295    int sourceLength = script.source.length();
    304296    int lineCount = 1;
Note: See TracChangeset for help on using the changeset viewer.