Closed Bug 998291 Opened 8 years ago Closed 8 years ago
Relative() to import into a given scope
Sorry, I got that description of Components.utils.import() wrong; it doesn't take a third argument, however it does obviously allow you to load a module into a given scope using its second argument.
Patch allowing optional third argument for scope to be specified in importRelative function. Tested and working on my Linux build.
Version 2 of the patch without my debugging stuff in it.
Comment on attachment 8408955 [details] [diff] [review] patch v2 Please add a test for this to http://mxr.mozilla.org/mozilla-central/source/testing/xpcshell/example/unit/import_module.jsm#20
Adding patch with test.
Attachment #8410590 - Flags: review?(bzbarsky) → review?(benjamin)
Assignee: nobody → bugzilla
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.