mozilla / positron

a experimental, Electron-compatible runtime on top of Gecko
Other
564 stars 64 forks source link

inject Cc, Ci, Cr, and Cu globals into every native binding module #44

Open mykmelez opened 8 years ago

mykmelez commented 8 years ago

Instead of defining the Cc, Ci, Cr, and Cu globals at the top of every native binding module, we should make the module loader inject them into each module global, just as it injects Components itself, since almost every native binding module uses some of these (or will, once implemented, for the ones that are currently stubs), and using Components directly is too verbose (which is why use of the shortened globals is so prolific).

marcoscaceres commented 8 years ago

We should really just have this added to BackstagePass upstream. Just about every JSM uses them.

khuey commented 8 years ago

I agree, this would be useful to have in Gecko proper.