Closed
Bug 986940
Opened 10 years ago
Closed 10 years ago
Remove Cu.createArrayIn and Cu.createDateIn
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: bholley, Assigned: bholley)
References
Details
Attachments
(2 files)
3.13 KB,
patch
|
gkrizsanits
:
review+
|
Details | Diff | Splinter Review |
8.07 KB,
patch
|
gkrizsanits
:
review+
|
Details | Diff | Splinter Review |
In bug 933681, I set things up so that we resolve standard classes on Xrayed globals. This means that you can now safely do: new contentWindow.Date(); new contentWindow.Array(); new contentWindow.Object(); (Note that I also implemented eval, so you can do contentWindow.eval(foo) as well). This means that Cu.createObjectIn, Cu.createArrayIn, and Cu.createDateIn are no longer very useful. The latter two are not widely used, and I think we can remove them. createObjectIn is more widely used, and has a few extra features, so I'll leave it for now. Cu.createDataIn is not used in addons. Cu.createArrayIn is used by the b2g simulator, so I'm CCing myk to make sure he knows this is coming.
Assignee | ||
Comment 1•10 years ago
|
||
(also note that Cu.cloneInto is a more powerful API that also subsumes all of these).
Assignee | ||
Updated•10 years ago
|
Summary: Remove Cu.createArrayIn and Cu.createDatein → Remove Cu.createArrayIn and Cu.createDateIn
Assignee | ||
Comment 2•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=df3b5d13a402
Assignee | ||
Comment 3•10 years ago
|
||
When we switch ObjectWrapper.jsm to use Cu.cloneInto, this became unused.
Attachment #8395413 -
Flags: review?(gkrizsanits)
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8395414 -
Flags: review?(gkrizsanits)
Comment 5•10 years ago
|
||
(In reply to Bobby Holley (:bholley) from comment #0) > In bug 933681, I set things up so that we resolve standard classes on Xrayed > globals. This means that you can now safely do: > > new contentWindow.Date(); > new contentWindow.Array(); > new contentWindow.Object(); > > (Note that I also implemented eval, so you can do contentWindow.eval(foo) as > well). > > This means that Cu.createObjectIn, Cu.createArrayIn, and Cu.createDateIn are > no longer very useful. The latter two are not widely used, and I think we > can remove them. createObjectIn is more widely used, and has a few extra > features, so I'll leave it for now. > > Cu.createDataIn is not used in addons. Cu.createArrayIn is used by the b2g > simulator, so I'm CCing myk to make sure he knows this is coming. Would be great to see a one liner summary of this under Components.utils.createObjectIn on MDN... And then we could slowly deprecate createObjectIn... and note Cu.cloneInto ofc, it's a very handy function.
Updated•10 years ago
|
Attachment #8395413 -
Flags: review?(gkrizsanits) → review+
Updated•10 years ago
|
Attachment #8395414 -
Flags: review?(gkrizsanits) → review+
Assignee | ||
Comment 6•10 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/0f8fbc309505 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/936b03713f6c (In reply to Gabor Krizsanits [:krizsa :gabor] from comment #5) > Would be great to see a one liner summary of this under > Components.utils.createObjectIn on MDN... And then we could slowly deprecate > createObjectIn... and note Cu.cloneInto ofc, it's a very handy function. Will seems to be the owner of these docs.
Flags: needinfo?(wbamberg)
Comment 7•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0f8fbc309505 https://hg.mozilla.org/mozilla-central/rev/936b03713f6c
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Comment 8•10 years ago
|
||
Sorry this took so long. I've added a note in https://developer.mozilla.org/en-US/docs/Components.utils.createObjectIn, let me know if it works for you.
Flags: needinfo?(wbamberg)
You need to log in
before you can comment on or make changes to this bug.
Description
•