Update documentation to reflect that sandbox.importFunction is no longer necessary

RESOLVED FIXED

Status

()

Core
XPConnect
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: bholley, Unassigned)

Tracking

({dev-doc-complete})

Firefox Tracking Flags

(Not tracked)

Details

I'm not sure what it used to do, but it doesn't do anything useful now post-compartments. We should update the docs to tell people they can just define the functions directly on the sandbox.
For what it's worth, this was necessary before we had automatic wrappers. Simply doing sandbox.function = chromeFunction was unsafe because there were ways of attacking chrome with the function object (or by passing evil objects to it). Now that we have automatic wrappers, importFunction is no longer necessary.
I just updated https://developer.mozilla.org/en-US/docs/Components.utils.Sandbox - I hope that was the only docs you had in mind, so I'm closing this.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
I think dev-doc-needed can be removed from here as per markh's comment 2.
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.