Backed out changeset e5e0bb1653b5 (bug 922187) for mochitest-4 bustage on a CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Mon, 23 Jun 2014 16:49:12 -0700
changeset 190374 9324051fd22c9adfae73a7b1905efaef3768000e
parent 190373 f446926ce971cdacd758476b05ad881c261dcd50
child 190375 c0e27620432b8e8d891360a3633ac8e26427d15b
push id27004
push useremorley@mozilla.com
push dateTue, 24 Jun 2014 15:52:34 +0000
treeherdermozilla-central@7b174d47f3cc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs922187
milestone33.0a1
backs oute5e0bb1653b5d4f6567c6ad088c5ed83438b021a
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
Backed out changeset e5e0bb1653b5 (bug 922187) for mochitest-4 bustage on a CLOSED TREE
dom/apps/src/Webapps.js
dom/tests/mochitest/webapps/file_bug_779982.html
--- a/dom/apps/src/Webapps.js
+++ b/dom/apps/src/Webapps.js
@@ -176,27 +176,20 @@ WebappsRegistry.prototype = {
                                                appId: this._window.document.nodePrincipal.appId,
                                                oid: this._id,
                                                requestID: this.getRequestId(request) });
     return request;
   },
 
   checkInstalled: function(aManifestURL) {
     let manifestURL = Services.io.newURI(aManifestURL, null, this._window.document.baseURIObject);
+    this._window.document.nodePrincipal.checkMayLoad(manifestURL, true, false);
 
     let request = this.createRequest();
 
-    try {
-      this._window.document.nodePrincipal.checkMayLoad(manifestURL, true,
-                                                       false);
-    } catch (ex) {
-      Services.DOMRequest.fireErrorAsync(request, "CROSS_ORIGIN_CHECK_NOT_ALLOWED");
-      return request;
-    }
-
     this.addMessageListeners("Webapps:CheckInstalled:Return:OK");
     cpmm.sendAsyncMessage("Webapps:CheckInstalled", { origin: this._getOrigin(this._window.location.href),
                                                       manifestURL: manifestURL.spec,
                                                       oid: this._id,
                                                       requestID: this.getRequestId(request) });
     return request;
   },
 
--- a/dom/tests/mochitest/webapps/file_bug_779982.html
+++ b/dom/tests/mochitest/webapps/file_bug_779982.html
@@ -29,26 +29,21 @@
             finish(!this.result);
           } else {
             finish(!!this.result);
           }
         }
         break;
 
       case "checkInstalledWrong":
-        var request = navigator.mozApps.checkInstalled('http://something.org/manifest.webapp');
-        request.onsuccess = function() {
+        try {
+          navigator.mozApps.checkInstalled('http://something.org/manifest.webapp');
           finish(false);
-        }
-        request.onerror = function() {
-          if (this.error.name == "CROSS_ORIGIN_URL_NOT_ALLOWED") {
-            finish(true);
-          } else {
-            finish(false);
-          }
+        } catch (e) {
+          finish(true);
         }
         break;
 
       default:
         finish(false);
         break;
     }
   </script>