mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
use ThreadSafeJSContext
instead of ContextForRequestInterrupt
(#33769)
* use `ThreadSafeJSContext` instead of `ContextForRequestInterrupt` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * use servo/mozjs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
61a930402d
commit
7cd73ef4a7
10 changed files with 53 additions and 89 deletions
|
@ -55,8 +55,7 @@ use crate::dom::workernavigator::WorkerNavigator;
|
|||
use crate::fetch;
|
||||
use crate::realms::{enter_realm, InRealm};
|
||||
use crate::script_runtime::{
|
||||
get_reports, CommonScriptMsg, ContextForRequestInterrupt, JSContext, Runtime, ScriptChan,
|
||||
ScriptPort,
|
||||
get_reports, CommonScriptMsg, JSContext, Runtime, ScriptChan, ScriptPort,
|
||||
};
|
||||
use crate::task::TaskCanceller;
|
||||
use crate::task_source::dom_manipulation::DOMManipulationTaskSource;
|
||||
|
@ -177,10 +176,7 @@ impl WorkerGlobalScope {
|
|||
}
|
||||
|
||||
/// Clear various items when the worker event-loop shuts-down.
|
||||
pub fn clear_js_runtime(&self, cx_for_interrupt: ContextForRequestInterrupt) {
|
||||
// Ensure parent thread can no longer request interrupt
|
||||
// using our JSContext that will soon be destroyed
|
||||
cx_for_interrupt.revoke();
|
||||
pub fn clear_js_runtime(&self) {
|
||||
self.upcast::<GlobalScope>()
|
||||
.remove_web_messaging_and_dedicated_workers_infra();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue