Closed
Bug 665281
Opened 13 years ago
Closed 13 years ago
Unnecessary content script proxies when document has system principal
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
1.1
People
(Reporter: ochameau, Assigned: ochameau)
Details
Attachments
(1 file)
882 bytes,
patch
|
myk
:
review+
|
Details | Diff | Splinter Review |
I faced this bug recently while working with chrome-mod. I don't think we can reproduce this bug easily using only high level APIs. The problem is about content script proxies created even if the target document has system principal. When we use a Worker on such document, XPCNativeWrapper(window) === window! And because of this, Proxies become useless as they need this wrapper to hold a different set of attributes. Finally as proxies code expect a wrappedJSObject attribute, we got exceptions. In chrome-mod, I'm using Worker on chrome documents. There may be some problem when using chrome urls in panels or when a user load a chrome document in a tab and a developer do tab.attach().
Assignee | ||
Comment 1•13 years ago
|
||
Low risk fix with comments.
Assignee: nobody → poirot.alex
Attachment #540232 -
Flags: review?(myk)
Updated•13 years ago
|
Priority: -- → P2
Target Milestone: --- → 1.1
Comment 2•13 years ago
|
||
Comment on attachment 540232 [details] [diff] [review] Fix Looks good. I wouldn't mind a test here, but my primary concern is testing the case where we do want the proxy, and the existing proxy tests should be doing that.
Attachment #540232 -
Flags: review?(myk) → review+
Assignee | ||
Comment 3•13 years ago
|
||
Landed with additional unit tests that check wrapped access with "content documents" and unwrapped one with "chrome documents": https://github.com/mozilla/addon-sdk/commit/5c5ea9505a13732cfb3fc87b715795a603aabce9
Assignee | ||
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•