mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
script: pass &mut JSContext inside worklet code (#44441)
Testing: It compiles Part of #40600 Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
@@ -690,9 +690,9 @@ impl Window {
|
||||
self.webxr_registry.clone()
|
||||
}
|
||||
|
||||
fn new_paint_worklet(&self, can_gc: CanGc) -> DomRoot<Worklet> {
|
||||
fn new_paint_worklet(&self, cx: &mut JSContext) -> DomRoot<Worklet> {
|
||||
debug!("Creating new paint worklet.");
|
||||
Worklet::new(self, WorkletGlobalScopeType::Paint, can_gc)
|
||||
Worklet::new(cx, self, WorkletGlobalScopeType::Paint)
|
||||
}
|
||||
|
||||
pub(crate) fn register_image_cache_listener(
|
||||
@@ -2451,9 +2451,8 @@ impl Window {
|
||||
}
|
||||
|
||||
// https://drafts.css-houdini.org/css-paint-api-1/#paint-worklet
|
||||
pub(crate) fn paint_worklet(&self) -> DomRoot<Worklet> {
|
||||
self.paint_worklet
|
||||
.or_init(|| self.new_paint_worklet(CanGc::deprecated_note()))
|
||||
pub(crate) fn paint_worklet(&self, cx: &mut JSContext) -> DomRoot<Worklet> {
|
||||
self.paint_worklet.or_init(|| self.new_paint_worklet(cx))
|
||||
}
|
||||
|
||||
pub(crate) fn has_document(&self) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user