git://git.webkit.org
/
WebKit-https.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Web Inspector: add runtime flag to determine if inspector's source files were flattened.
[WebKit-https.git]
/
Source
/
WebCore
/
inspector
/
front-end
/
utilities.js
diff --git
a/Source/WebCore/inspector/front-end/utilities.js
b/Source/WebCore/inspector/front-end/utilities.js
index
8dd2384
..
d415ca0
100644
(file)
--- 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;
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];
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);
}
var sourceURL = WebInspector.ParsedURL.completeURL(window.location.href, scriptName);
window.eval(xhr.responseText + "\n//@ sourceURL=" + sourceURL);
}