trusted content of panel can't access 'addon' object

RESOLVED FIXED

Status

Add-on SDK
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Vikas Saurabh, Assigned: irakli)

Tracking

({regression})

unspecified
regression
Dependency tree / graph

Firefox Tracking Flags

(firefox22 unaffected, firefox23+ fixed, firefox24 fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release)
Build ID: 20130511120803

Steps to reproduce:

In https://addons.mozilla.org/en-US/firefox/addon/OfflineQR/, I use 'addon' object to communicate between trusted content and main addon code.
Post FF23 (Aurora channel), the access of 'addon' object isn't working from trusted content.


Actual results:

I find following in console:
Error: ReferenceError: addon is not defined
Source File: resource://jid1-5h9we5dytuz14q-at-jetpack/offline_qr/data/htmlQR/index.html?isAddon=true
Line: 35


Expected results:

'addon' object should be accessible.
(Reporter)

Comment 1

5 years ago
Bisecting mozilla/addon-sdk led to https://github.com/mozilla/addon-sdk/commit/5536d4235df0779349f1a19065b00775aeb38573 as the first commit when 'addon' object couldn't be accessed.
Created attachment 753552 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/1005

Pointer to Github pull-request
Attachment #753552 - Flags: review?(dtownsend+bugmail)
I fixed that regression and think we should probably uplift the change.
status-firefox22: --- → unaffected
status-firefox23: --- → affected
status-firefox24: --- → affected
tracking-firefox23: --- → ?
Attachment #753552 - Flags: review?(dtownsend+bugmail) → review+

Comment 4

5 years ago
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/007eb037f0406e9791ac179dae21411ed6663966
Merge pull request #1005 from Gozala/bug/addon-global@874152

Bug 874152 - Fix regression that removed `addon` global.
Depends on: 875812
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
status-firefox24: affected → fixed
tracking-firefox23: ? → +
Blocks: 816257
Keywords: regression
Created attachment 754934 [details] [diff] [review]
aurora uplift patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 816257
User impact if declined: Some add-ons will not function correctly
Testing completed (on m-c, etc.): On m-c over the weekend, has automated tests
Risk to taking this patch (and alternatives if risky): Low risk
String or IDL/UUID changes made by this patch: None
Attachment #754934 - Flags: approval-mozilla-aurora?
Attachment #754934 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/f56bb4acb8ba
Assignee: nobody → rFobic
status-firefox23: affected → fixed
You need to log in before you can comment on or make changes to this bug.