-
Notifications
You must be signed in to change notification settings - Fork 117
Call JS_ShutDown when all runtimes have been dropped. #344
Conversation
r? @nox |
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_ShutDown |
Yes, this PR is made under the assumption that we do not create new Runtime objects after all existing Runtime objects have been dropped. I could make that explicit by panicking in Runtime::new or making it return a Result if you'd like. |
Yeah, such assumptions are bad in safe code. |
Fixed. |
@bors-servo r+ |
@bors-servo: r=nox |
📌 Commit b991ef3 has been approved by |
Call JS_ShutDown when all runtimes have been dropped. This will enable better investigation of Servo's shutdown behaviour, since currently all of the JS helper threads just sit there until process exit. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-mozjs/344) <!-- Reviewable:end -->
💔 Test failed - status-travis |
☀️ Test successful - status-appveyor, status-travis |
This PR introduced a breaking change to rust-mozjs api. Is there any publishing model you use, to help lock projects on certain version? |
Is there any publishing model you use, to help lock projects on certain
version?
Not yet: mozjs shouldn't at all be considered stable at this point. Once it
gets closer to 1.0, it'll start following semantic versioning.
|
that is good to know, thanks. Is there anyway to track your progress? How far away you are from 1.0? |
I would not bet on 1.0 being declared this year. |
Agreed, it's quite unlikely it'll get stabilized this year. The API is very likely to undergo substantial changes, with stabilization beginning late this year or in 2018. |
This will enable better investigation of Servo's shutdown behaviour, since currently all of the JS helper threads just sit there until process exit.
This change is