Open Bug 422321 Opened 17 years ago Updated 2 years ago

Components.utils.import() should inject exported objects into scope as lazy getters

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

People

(Reporter: dietrich, Unassigned)

Details

(Whiteboard: [Snappy:P3])

in bug 384370, it proved useful to not instantiate the exported object until called upon, as shown below. is there a reason to not do this for all imported objects? __defineGetter__("myVar", function() { delete this.myVar; var tmpScope = {}; Components.utils.import("resource://gre/modules/myFile.js", tmpScope); return this.myVar = tmpScope.myVar; });
Whiteboard: [tsnap]
Whiteboard: [tsnap] → [snappy]
Whiteboard: [snappy] → [snappy:p4]
Whiteboard: [snappy:p4] → [Snappy:P3]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.