mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
add CanGc as argument to methods in ElementInternals, GlobalScope, HTMLAnchorElement, HTMLAreaElement, HTMLCanvasElement (#36492)
add CanGc as argument to methods in ElementInternals, GlobalScope, HTMLAnchorElement, HTMLAreaElement, HTMLCanvasElement Testing: These changes do not require tests because they are a refactor. Addresses part of https://github.com/servo/servo/issues/34573. Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
parent
dcc88b53aa
commit
70c0faa0e9
10 changed files with 29 additions and 27 deletions
|
@ -2126,8 +2126,8 @@ impl GlobalScope {
|
|||
unsafe { SafeJSContext::from_ptr(cx) }
|
||||
}
|
||||
|
||||
pub(crate) fn crypto(&self) -> DomRoot<Crypto> {
|
||||
self.crypto.or_init(|| Crypto::new(self, CanGc::note()))
|
||||
pub(crate) fn crypto(&self, can_gc: CanGc) -> DomRoot<Crypto> {
|
||||
self.crypto.or_init(|| Crypto::new(self, can_gc))
|
||||
}
|
||||
|
||||
pub(crate) fn live_devtools_updates(&self) -> bool {
|
||||
|
@ -2994,6 +2994,7 @@ impl GlobalScope {
|
|||
device: WebGPUDevice,
|
||||
reason: DeviceLostReason,
|
||||
msg: String,
|
||||
can_gc: CanGc,
|
||||
) {
|
||||
let reason = match reason {
|
||||
DeviceLostReason::Unknown => GPUDeviceLostReason::Unknown,
|
||||
|
@ -3007,7 +3008,7 @@ impl GlobalScope {
|
|||
.expect("GPUDevice should still be in devices hashmap")
|
||||
.root()
|
||||
{
|
||||
device.lose(reason, msg, CanGc::note());
|
||||
device.lose(reason, msg, can_gc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue