Bug 1387737 - Fix switching back to the default theme. r=Gijs draft
authorTim Nguyen <ntim.bugs@gmail.com>
Mon, 07 Aug 2017 10:52:25 +0000
changeset 641622 8d34f65db24e45ef66b323904fe0962901cce005
parent 641249 fe6609d22dfdd710b11e3ac7773aff89f7a8d12c
child 724855 963f4279ed67e396cb0887964fc98740b81706ea
push id72594
push userbmo:ntim.bugs@gmail.com
push dateMon, 07 Aug 2017 10:52:39 +0000
reviewersGijs
bugs1387737
milestone57.0a1
Bug 1387737 - Fix switching back to the default theme. r=Gijs MozReview-Commit-ID: 3Mr55Vr8E7L
toolkit/modules/LightweightThemeConsumer.jsm
--- a/toolkit/modules/LightweightThemeConsumer.jsm
+++ b/toolkit/modules/LightweightThemeConsumer.jsm
@@ -66,17 +66,17 @@ LightweightThemeConsumer.prototype = {
     if (aTopic != "lightweight-theme-styling-update")
       return;
 
     const { outerWindowID } = this._win
       .QueryInterface(Ci.nsIInterfaceRequestor)
       .getInterface(Ci.nsIDOMWindowUtils);
 
     const parsedData = JSON.parse(aData);
-    if (parsedData.window && parsedData.window !== outerWindowID) {
+    if (parsedData && parsedData.window && parsedData.window !== outerWindowID) {
       return;
     }
 
     this._update(parsedData);
   },
 
   handleEvent(aEvent) {
     let {width, height} = this._win.screen;