Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1924)

Unified Diff: Source/devtools/front_end/ui/View.js

Issue 685203003: DevTools: Get rid of synchronous XHRs in the frontend code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/ui/View.js
diff --git a/Source/devtools/front_end/ui/View.js b/Source/devtools/front_end/ui/View.js
index 611e1ae8c1d900a2defc39fcdb813e7137492c80..95b55ca3d40dfb1b1c55e9d38725971afe634b95 100644
--- a/Source/devtools/front_end/ui/View.js
+++ b/Source/devtools/front_end/ui/View.js
@@ -61,13 +61,9 @@ WebInspector.View._buildSourceURL = function(cssFile)
*/
WebInspector.View.createStyleElement = function(cssFile)
{
- var content = Runtime.cachedResources[cssFile];
- if (!content) {
- if (Runtime.isReleaseMode())
- console.error(cssFile + " not preloaded, loading from the remote. Check module.json");
- content = loadResource(cssFile) + WebInspector.View._buildSourceURL(cssFile);
- Runtime.cachedResources[cssFile] = content;
- }
+ var content = Runtime.cachedResources[cssFile] || "";
+ if (!content)
+ console.error(cssFile + " not preloaded. Check module.json");
var styleElement = createElement("style");
styleElement.type = "text/css";
styleElement.textContent = content;

Powered by Google App Engine
This is Rietveld 408576698