diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-11-27 01:23:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-27 01:23:20 -0500 |
commit | f16642210258bcf86de5e40574852002f7c08a80 (patch) | |
tree | d163365d072555ef0247c24c65918dec2a073209 /components/script/init.rs | |
parent | b62d1d4f7a70292b55547f6ea9f59e19525522ec (diff) | |
parent | 1c7f2d696c4c19238d1362497db3ca1b866cc3da (diff) | |
download | servo-f16642210258bcf86de5e40574852002f7c08a80.tar.gz servo-f16642210258bcf86de5e40574852002f7c08a80.zip |
Auto merge of #24862 - jdm:js-init-destroy-fit-the-second, r=asajeffrey
Ensure SpiderMonkey shuts down cleanly
This is the alternate solution that I described in #24845. Given how much simpler the resulting code is, I'm now much more in favour of this design. Depends on https://github.com/servo/rust-mozjs/pull/487.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21696 and fix #22276
- [x] There are tests for these changes
Diffstat (limited to 'components/script/init.rs')
-rw-r--r-- | components/script/init.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/init.rs b/components/script/init.rs index 15428f4f3fe..30e01dda74e 100644 --- a/components/script/init.rs +++ b/components/script/init.rs @@ -4,6 +4,7 @@ use crate::dom::bindings::codegen::RegisterBindings; use crate::dom::bindings::proxyhandler; +use crate::script_runtime::JSEngineSetup; use crate::serviceworker_manager::ServiceWorkerManager; use script_traits::SWManagerSenders; @@ -56,7 +57,7 @@ pub fn init_service_workers(sw_senders: SWManagerSenders) { } #[allow(unsafe_code)] -pub fn init() { +pub fn init() -> JSEngineSetup { unsafe { proxyhandler::init(); @@ -66,4 +67,6 @@ pub fn init() { } perform_platform_specific_initialization(); + + JSEngineSetup::new() } |