The default bug view has changed. See this FAQ.

Accessing mozApps manifest properties need __exposedProps__ set correctly

RESOLVED FIXED in mozilla16

Status

()

Core
DOM: Apps
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Mardak, Assigned: fabrice)

Tracking

unspecified
mozilla16
x86
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
From bug 553102:

(In reply to Edward Lee :Mardak from comment #100)
> Fabrice, it also seems like each object level needs to have __exposedProps__
> because accessing this.result.manifest.name from getSelf() triggers the
> warning. (Test by running the following on an origin with an app installed.)
> 
> navigator.mozApps.getSelf().onsuccess = function() this.result.manifest.name

Oh, I thought we didn't need that for plain jsvals...
Can you create the relevant objects in the content compartment?
(Assignee)

Comment 2

5 years ago
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #1)
> Can you create the relevant objects in the content compartment?

Is there a way to do that in chrome JS?
https://developer.mozilla.org/en/Components.utils.createObjectIn

Updated

5 years ago
Blocks: 746465
(Assignee)

Updated

5 years ago
Depends on: 760109
(Assignee)

Comment 4

5 years ago
Created attachment 633730 [details] [diff] [review]
patch

This patch removes the manifest-related warnings, and also the one fired when returning arrays of apps.
Assignee: nobody → fabrice
Attachment #633730 - Flags: review?(edilee)
(Reporter)

Comment 5

5 years ago
I'm not sure if I'm the right person to be reviewing this, but do we want a general purpose wrapObjectIn or should we be explicit in what we expose from the manifest? Would being explicit just involve setting an __exposedProps__ hash of readable properties?
(Assignee)

Comment 6

5 years ago
(In reply to Edward Lee :Mardak from comment #5)
> I'm not sure if I'm the right person to be reviewing this, but do we want a
> general purpose wrapObjectIn or should we be explicit in what we expose from
> the manifest? Would being explicit just involve setting an __exposedProps__
> hash of readable properties?

There are two issues with this approach:
- we need to take care of nested structures in the manifest (eg, icons, authors, locales) and this will be very painful without introspecting.
- the manifest structure is not stable, and can potentially have extension points, so it's hard to whitelist only the properties we want.
(Assignee)

Updated

5 years ago
Attachment #633730 - Flags: review?(edilee) → review?(21)
Attachment #633730 - Flags: review?(21) → review+
(Assignee)

Comment 7

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/ddd52f236159
https://hg.mozilla.org/mozilla-central/rev/ddd52f236159
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16

Updated

5 years ago
Component: DOM: Mozilla Extensions → DOM: Apps
You need to log in before you can comment on or make changes to this bug.