Bug 882319 - Page load fixes for first release. r=nalexander, a=bajaj
--- a/mobile/android/chrome/content/aboutHealthReport.js
+++ b/mobile/android/chrome/content/aboutHealthReport.js
@@ -68,17 +68,17 @@ let healthReportWrapper = {
onOptOut: function () {
console.log("AboutHealthReport: page sent opt-out command.");
sharedPrefs.setBoolPref(PREF_UPLOAD_ENABLED, false);
this.updatePrefState();
},
updatePrefState: function () {
- console.log("AboutHealthReport: page requested pref state.");
+ console.log("AboutHealthReport: sending pref state to page.");
try {
let prefs = {
enabled: sharedPrefs.getBoolPref(PREF_UPLOAD_ENABLED),
};
this.injectData("prefs", prefs);
} catch (e) {
this.reportFailure(this.ERROR_PREFS_FAILED);
}
@@ -137,17 +137,17 @@ let healthReportWrapper = {
}
},
initRemotePage: function () {
let iframe = document.getElementById("remote-report").contentDocument;
iframe.addEventListener("RemoteHealthReportCommand",
function onCommand(e) {healthReportWrapper.handleRemoteCommand(e);},
false);
- healthReportWrapper.updatePrefState();
+ healthReportWrapper.injectData("begin", null);
},
// error handling
ERROR_INIT_FAILED: 1,
ERROR_PAYLOAD_FAILED: 2,
ERROR_PREFS_FAILED: 3,
reportFailure: function (error) {