Bug 894938 - Content permission prompts don't work when prompt requestor is an iframe. r=mfinkle, a=bajaj
authorGian-Carlo Pascutto <gpascutto@mozilla.com>
Thu, 18 Jul 2013 14:05:33 +0200
changeset 148119 142db87e69e4da743aac407ffbb1617adf284869
parent 148118 6c395ae8c304f8fa55744f83695f17897ba5c5db
child 148120 0883cacf940bbeb711235ce0d6ecba42b5f6c192
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, bajaj
bugs894938
milestone24.0a2
Bug 894938 - Content permission prompts don't work when prompt requestor is an iframe. r=mfinkle, a=bajaj
mobile/android/components/ContentPermissionPrompt.js
--- a/mobile/android/components/ContentPermissionPrompt.js
+++ b/mobile/android/components/ContentPermissionPrompt.js
@@ -53,17 +53,17 @@ ContentPermissionPrompt.prototype = {
   },
 
   prompt: function(request) {
     // Returns true if the request was handled
     if (this.handleExistingPermission(request))
        return;
 
     let chromeWin = this.getChromeForRequest(request);
-    let tab = chromeWin.BrowserApp.getTabForWindow(request.window);
+    let tab = chromeWin.BrowserApp.getTabForWindow(request.window.top);
     if (!tab)
       return;
 
     let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
     let entityName = kEntities[request.type];
 
     let buttons = [{
       label: browserBundle.GetStringFromName(entityName + ".allow"),