Bug 930863 - update CharsetLoadListener() to be e10s compliant.r=felipc
authorAllison Naaktgeboren <ally@mozilla.com>
Tue, 29 Apr 2014 11:05:57 -0700
changeset 180747 a33ffc774df7b40e4b73505f3671816ee3b24351
parent 180746 12fe8b5be961a6ea2f94c39f2653b75154b21125
child 180748 e68c18a91f3d95e3696e827a45090c8ab5f71e69
push id6563
push useranaaktgeboren@mozilla.com
push dateTue, 29 Apr 2014 18:06:15 +0000
treeherderfx-team@a33ffc774df7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipc
bugs930863
milestone32.0a1
Bug 930863 - update CharsetLoadListener() to be e10s compliant.r=felipc
browser/base/content/browser.js
toolkit/content/widgets/remote-browser.xml
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -5175,17 +5175,18 @@ function UpdateCurrentCharset(target) {
 
     var menuitem = charsetMenuGetElement(target, CharsetMenu.foldCharset(wnd.document.characterSet));
     if (menuitem) {
         menuitem.setAttribute('checked', 'true');
     }
 }
 
 function charsetLoadListener() {
-  var charset = CharsetMenu.foldCharset(window.content.document.characterSet);
+  let currCharset = gBrowser.selectedBrowser.characterSet;
+  let charset = CharsetMenu.foldCharset(currCharset);
 
   if (charset.length > 0 && (charset != gLastBrowserCharset)) {
     gPrevCharset = gLastBrowserCharset;
     gLastBrowserCharset = charset;
   }
 }
 
 var gPageStyleMenu = {
--- a/toolkit/content/widgets/remote-browser.xml
+++ b/toolkit/content/widgets/remote-browser.xml
@@ -100,17 +100,17 @@
                 readonly="true"/>
 
       <field name="_contentTitle">""</field>
 
       <property name="contentTitle"
                 onget="return this._contentTitle"
                 readonly="true"/>
 
-      <field name="_characterSet">null</field>
+      <field name="_characterSet">""</field>
 
       <property name="characterSet"
                 onget="return this._characterSet"
                 readonly="true"/>
 
       <field name="_contentWindow">null</field>
 
       <property name="contentWindow"