bug 773411 - when running tests, freeze WebappRT config object after calling confirmInstall(); r=adw
authorMyk Melez <myk@mozilla.org>
Thu, 12 Jul 2012 13:59:45 -0700
changeset 103909 260f3b5e03f494c59e538f3a343a900df91bd29d
parent 103908 83e30b5c8dbaeb939dc23a8c07af084eacba1936
child 103910 741b4ebd050f1bfe39f0ff8d5be5ead2a72b18c7
push id1316
push userakeybl@mozilla.com
push dateMon, 27 Aug 2012 22:37:00 +0000
treeherdermozilla-beta@db4b09302ee2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs773411
milestone16.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 773411 - when running tests, freeze WebappRT config object after calling confirmInstall(); r=adw
webapprt/WebappRT.jsm
--- a/webapprt/WebappRT.jsm
+++ b/webapprt/WebappRT.jsm
@@ -26,19 +26,19 @@ Services.obs.addObserver(function observ
   Services.obs.removeObserver(observeCmdLine, "webapprt-command-line");
   let args = subj.QueryInterface(Ci.nsIPropertyBag2);
   if (!args.hasKey("test-mode"))
     return;
   Services.obs.addObserver(function observeInstall(subj, topic, data) {
     // observeInstall is present for the lifetime of the runtime.
     let config = JSON.parse(data);
     config.registryDir = Services.dirsvc.get("ProfD", Ci.nsIFile).path;
+    DOMApplicationRegistry.confirmInstall(config);
     delete WebappRT.config;
     WebappRT.config = deepFreeze(config);
-    DOMApplicationRegistry.confirmInstall(config);
     Services.obs.notifyObservers(null, "webapprt-test-did-install",
                                  JSON.stringify(config));
   }, "webapps-ask-install", false);
 }, "webapprt-command-line", false);
 
 let WebappRT = {
   get config() {
     let webappFile = FileUtils.getFile("AppRegD", ["webapp.json"]);