servo / rust-mozjs

DEPRECATED - moved to servo/mozjs instead.
Mozilla Public License 2.0
293 stars 122 forks source link

Expose bindings for JSAutoNullableRealm #486

Open jdm opened 4 years ago

jdm commented 4 years ago

https://github.com/servo/mozjs/blob/b2f83932fe9d361face14efd03f2465b9262e687/mozjs/js/src/jsapi.h#L520-L530

jdm commented 4 years ago

This is important for supporting streaming web assembly compilation, where we need to enter a realm before invoking the JS runnable but there's no clue which realm is the correct one to enter.

jdm commented 4 years ago

This is used by Gecko in https://searchfox.org/mozilla-central/rev/492214c05cde6e6db5feff9465ece4920400acc3/dom/script/ScriptSettings.cpp#296 for example.