Closed Bug 1309620 Opened 9 years ago Closed 8 years ago

extension.getViews should check whether private mode matches

Categories

(WebExtensions :: General, defect, P3)

52 Branch
defect

Tracking

(firefox52 wontfix)

RESOLVED WORKSFORME
Tracking Status
firefox52 --- wontfix

People

(Reporter: robwu, Unassigned)

Details

(Whiteboard: triaged [platform-rel-Symantec][platform-rel-Norton])

Attachments

(1 file)

Attached file getViews-private.zip
extension.getViews returns a list of windows from the extension. This should only contain window objects that can be accessed by the caller. Pages in private browsing mode cannot access non-private pages and vice versa, so they should not appear in the list. 1. Load attached extension at about:debugging (via the Load extension button) 2. Click on the extension button. 3. -- The extension now opens a tab and shows the active URLs. -- For the record, there are two: _generated_background_page.html and tab.html 4. Open an private browsing window. 5. Click on the extension button to open another tab, in the private window. 6. Look at the tab content. Expected result: - tab.html (no background page, nor the tab.html from the other window because this is a private window). Actual result: - tab.html shows: Result not set, probably an error occurred. Check the console. - The page console shows: Error: Not allowed to define cross-origin object as property on [Object] or [Array] XrayWrapper - The above error comes from getViews in ext-extension.js (after bug 1287007, this moves to ext-c-extension.js). Similarly for extension/runtime.getBackgroundPage(): until split incognito mode is supported, getBackgroundPage() must return a void value.
PS. A context.incognito property may be added in bug 1254221, so filtering DOM windows should then be quite straightforward.
Oops. I meant bug 1309610.
Priority: -- → P3
Whiteboard: triaged
Whiteboard: triaged → triaged [platform-rel-Symantec][platform-rel-Norton]
Mass wontfix for bugs affecting firefox 52.
unable to reproduce
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Apparently fixed by bug 1319452.
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: