X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=Source%2FWebCore%2Finspector%2Ffront-end%2Futilities.js;h=d415ca0c3a3219dc26792d2ddba48891a8ae7964;hp=8dd23847dc5fb94d436eb4e1ab0b07b2e48d94ef;hb=5fc41ce20f509dcf99744e6ea037f480afdd77c5;hpb=64b0b4f288c09af5962ee89343c8feb91d92f74f diff --git a/Source/WebCore/inspector/front-end/utilities.js b/Source/WebCore/inspector/front-end/utilities.js index 8dd2384..d415ca0 100644 --- a/Source/WebCore/inspector/front-end/utilities.js +++ b/Source/WebCore/inspector/front-end/utilities.js @@ -982,15 +982,10 @@ function importScript(scriptName) return; var xhr = new XMLHttpRequest(); _importedScripts[scriptName] = true; - try { - xhr.open("GET", scriptName, false); - xhr.send(null); - } catch (e) { - // Try to load file from the root directory + if (window.flattenImports) scriptName = scriptName.split("/").reverse()[0]; - xhr.open("GET", scriptName, false); - xhr.send(null); - } + xhr.open("GET", scriptName, false); + xhr.send(null); var sourceURL = WebInspector.ParsedURL.completeURL(window.location.href, scriptName); window.eval(xhr.responseText + "\n//@ sourceURL=" + sourceURL); }