Backout b1e246595663
authorGregor Wagner <anygregor@gmail.com>
Mon, 03 Feb 2014 07:29:16 +0100
changeset 182610 cb4960e3af99b68d7cb1866af69f5342b187e220
parent 182609 c8460f1ffc9c92ca2621d1eabc83c550e8c0a83f
child 182611 69040d57243146349aa6dd7be94dfdec472fb38b
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone29.0a1
backs outb1e2465956630c75d41feced2e4a6ede1cafa07c
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
Backout b1e246595663
dom/permission/PermissionPromptHelper.jsm
dom/permission/PermissionPromptService.js
--- a/dom/permission/PermissionPromptHelper.jsm
+++ b/dom/permission/PermissionPromptHelper.jsm
@@ -69,28 +69,20 @@ this.PermissionPromptHelper = {
 
     if (permValue == Ci.nsIPermissionManager.DENY_ACTION ||
         permValue == Ci.nsIPermissionManager.UNKNOWN_ACTION) {
       aCallbacks.cancel();
       return;
     }
 
     if (permValue == Ci.nsIPermissionManager.PROMPT_ACTION) {
-      // create an array with a nsIContentPermissionType element
-      let type = {
+      // create a nsIContentPermissionRequest
+      let request = {
         type: msg.type,
         access: msg.access ? msg.access : "unused",
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionType])
-      };
-      let typeArray = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
-      typeArray.appendElement(type, false);
-
-      // create a nsIContentPermissionRequest
-      let request = {
-        types: typeArray,
         principal: principal,
         QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionRequest]),
         allow: aCallbacks.allow,
         cancel: aCallbacks.cancel,
         window: Services.wm.getOuterWindowWithId(msg.windowID)
       };
 
       permissionPromptService.getPermission(request);
--- a/dom/permission/PermissionPromptService.js
+++ b/dom/permission/PermissionPromptService.js
@@ -63,27 +63,18 @@ PermissionPromptService.prototype = {
    **/
   getPermission: function PS_getPermission(aRequest)
   {
     if (!(aRequest instanceof Ci.nsIContentPermissionRequest)) {
       throw new Error("PermissionService.getPermission: "
                       + "2nd argument must be type 'nsIContentPermissionRequest'");
     }
 
-    // Only allow exactly one permission request here.
-    let types = aRequest.types.QueryInterface(Ci.nsIArray);
-    if (types.length != 1) {
-      aRequest.cancel();
-      return;
-    }
-
-    let reqType = types.queryElementAt(0, Ci.nsIContentPermissionType);
-
-    let type = reqType.access !== "unused" ? reqType.type + "-" + reqType.access
-                                           : reqType.type;
+    let type = aRequest.access !== "unused" ? aRequest.type + "-" + aRequest.access
+                                            : aRequest.type;
     let perm =
       permissionManager.testExactPermissionFromPrincipal(aRequest.principal, type);
 
     switch (perm) {
       case Ci.nsIPermissionManager.ALLOW_ACTION:
         aRequest.allow();
         break;
       case Ci.nsIPermissionManager.PROMPT_ACTION: