Closed Bug 985812 Opened 11 years ago Closed 11 years ago

Figure out the type of ActivityRequestHandler.source

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

Over in bug 903873, I'm converting this interface to WebIDL. The original design of this interface <https://wiki.mozilla.org/WebAPI/WebActivities#Proposed_API> uses the ActivityOptions dictionary as the type of this property, which is disallowed in WebIDL for the reasons Boris explained in bug 903873 comment 6. The question to answer here is: "Whether the consumers of this API want the same object every time they call this getter or whether they want a new object." I don't see any reason why they would want a new object every time, and a quick look through the consumers of this API seems to suggest that they don't care. One thing to note about this interface is that it's currently used to wrap the argument passed to the activity system message, which means that none of our internal code uses the same instance of this object more than once. Fabrice, you were the implementer of this API. What's your take on this? I'm happy to write a patch based on what we decide here.
Actually needinfo-ing Fabrice! Please see comment 0.
Flags: needinfo?(fabrice)
We agreed on irc to return the same object.
Flags: needinfo?(fabrice)
Frozen, or not?
Flags: needinfo?(fabrice)
Frozen is fine.
Flags: needinfo?(fabrice)
Attachment #8395084 - Flags: review?(bzbarsky)
Comment on attachment 8395084 [details] [diff] [review] Make a ActivityRequestHandler.source a pure cached frozen dictionary; r=bzbarsky r=me, but document in the "source" getter that we have to keep cloning it because it has an "any" member that WebIDL would otherwise pass through unchanged and hence hand a COW to the web page?
Attachment #8395084 - Flags: review?(bzbarsky) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: