Bug 1369801 - dt-addon: use window object in webconsole/net/main to load stylesheets;r=jryans
authorJulian Descottes <jdescottes@mozilla.com>
Wed, 12 Jul 2017 19:26:33 +0200
changeset 371263 3ab3a5481b90874cf6900cdd001653bca213b2de
parent 371262 435291ffe2591d68e5bcb4474dd6111589a5c428
child 371264 0462e7a66185a233fe9cbd389c9ca45a7e860565
push id93049
push usercbook@mozilla.com
push dateThu, 27 Jul 2017 09:30:07 +0000
treeherdermozilla-inbound@5e9f7561c2eb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans
bugs1369801
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1369801 - dt-addon: use window object in webconsole/net/main to load stylesheets;r=jryans From console/net/main.js we are calling loadSheet from sdk/stylesheet/utils. This API needs a real window object to work, but now that devtools are loaded as a system addon, by default the global object is a sandbox wrapper. Use the window object which points to the actual Window instead. MozReview-Commit-ID: LxDNfDiOso3
devtools/client/webconsole/net/main.js
--- a/devtools/client/webconsole/net/main.js
+++ b/devtools/client/webconsole/net/main.js
@@ -33,17 +33,17 @@ var styleSheets = [
   "resource://devtools/client/webconsole/net/components/response-tab.css"
 ];
 
 // Load theme stylesheets into the Console frame. This should be
 // done automatically by UI Components as soon as we have consensus
 // on the right CSS strategy FIXME.
 // It would also be nice to include them using @import.
 styleSheets.forEach(url => {
-  loadSheet(this, url, "author");
+  loadSheet(window, url, "author");
 });
 
 // Localization API used by React components
 // accessing strings from *.properties file.
 // Example:
 //   let localizedString = Locale.$STR('string-key');
 //
 // Resources: