Bug 830027 - Allow all device APIs that uses the content permission prompt from the system principal. r=fabrice/gwagner a=tef+
authorDoug Turner <dougt@dougt.org>
Thu, 17 Jan 2013 10:26:40 -0800
changeset 119165 1f4836f0da578c9910b67213a90a403e54f353c0
parent 119164 e7e4224b8c8d6bd5cfdc7f9e4bc5497ea7bc88de
child 119166 dbaf061c64fbca2ce2c782a6d03395caff50c3ae
push id24195
push userMs2ger@gmail.com
push dateSat, 19 Jan 2013 16:10:11 +0000
treeherderautoland@02e12a80aef9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice, gwagner, tef
bugs830027
milestone21.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 830027 - Allow all device APIs that uses the content permission prompt from the system principal. r=fabrice/gwagner a=tef+
b2g/components/ContentPermissionPrompt.js
--- a/b2g/components/ContentPermissionPrompt.js
+++ b/b2g/components/ContentPermissionPrompt.js
@@ -112,16 +112,22 @@ ContentPermissionPrompt.prototype = {
       return false;
     }
 
     request.cancel();
     return true;
   },
 
   prompt: function(request) {
+
+    if (secMan.isSystemPrincipal(request.principal)) {
+      request.allow();
+      return true;
+    }
+
     if (this.handledByApp(request))
         return;
 
     // returns true if the request was handled
     if (this.handleExistingPermission(request))
        return;
 
     // If the request was initiated from a hidden iframe