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

Unified Diff: webkit/glue/devtools/js/inspector_controller_impl.js

Issue 249032: DevTools: temporary fix for bug 23260 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months 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
« no previous file with comments | « webkit/glue/devtools/js/devtools.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/devtools/js/inspector_controller_impl.js
===================================================================
--- webkit/glue/devtools/js/inspector_controller_impl.js (revision 27364)
+++ webkit/glue/devtools/js/inspector_controller_impl.js (working copy)
@@ -124,7 +124,18 @@
if (!resource) {
return;
}
- DevToolsHost.addResourceSourceToFrame(identifier, resource.mimeType, element);
+
+ // Temporary fix for http://crbug/23260.
+ var mimeType = resource.mimeType;
+ if (!mimeType && resource.url) {
+ if (resource.url.search('\.js$') != -1) {
+ mimeType = 'application/x-javascript';
+ } else if (resource.url.search('\.html$') != -1) {
+ mimeType = 'text/html';
+ }
+ }
+
+ DevToolsHost.addResourceSourceToFrame(identifier, mimeType, element);
};
« no previous file with comments | « webkit/glue/devtools/js/devtools.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698