andrewplummer / Sugar

A Javascript library for working with native objects.
https://sugarjs.com/
MIT License
4.54k stars 305 forks source link

Fix for getting global context in recent Firefox and Thunderbird #664

Open jikamens opened 4 years ago

jikamens commented 4 years ago

If we can't get the global contest from either global or window and Cu.getGlobalForObject exists, then use that.

See https://developer.mozilla.org/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.getGlobalForObject.

Fixes andrewplummer/Sugar#627.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.08%) to 96.541% when pulling 1a9f4baa7a07ca307c10cd32d0b63cac9f8d2289 on jikamens:Sugar627 into 4adba2e6ef8c8734a693af3141461dec6d674d50 on andrewplummer:master.