mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Propagate CanGc through dommatrix, dommatrixreadonly, and testbindings (#33822)
* CanGc fixes starting from dommatrix.rs fixed conflicts Signed-off-by: L Ashwin B <lashwinib@gmail.com> ~ * cleaning up Signed-off-by: L Ashwin B <lashwinib@gmail.com> * fixed cannot find value can_gc in this scope error Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
bdd5fb2e5b
commit
92f12ff7cd
8 changed files with 124 additions and 62 deletions
|
@ -178,11 +178,11 @@ impl TestBindingMethods for TestBinding {
|
|||
TestEnum::_empty
|
||||
}
|
||||
fn SetEnumAttribute(&self, _: TestEnum) {}
|
||||
fn InterfaceAttribute(&self) -> DomRoot<Blob> {
|
||||
fn InterfaceAttribute(&self, can_gc: CanGc) -> DomRoot<Blob> {
|
||||
Blob::new(
|
||||
&self.global(),
|
||||
BlobImpl::new_from_bytes(vec![], "".to_owned()),
|
||||
CanGc::note(),
|
||||
can_gc,
|
||||
)
|
||||
}
|
||||
fn SetInterfaceAttribute(&self, _: &Blob) {}
|
||||
|
@ -324,11 +324,11 @@ impl TestBindingMethods for TestBinding {
|
|||
fn GetEnumAttributeNullable(&self) -> Option<TestEnum> {
|
||||
Some(TestEnum::_empty)
|
||||
}
|
||||
fn GetInterfaceAttributeNullable(&self) -> Option<DomRoot<Blob>> {
|
||||
fn GetInterfaceAttributeNullable(&self, can_gc: CanGc) -> Option<DomRoot<Blob>> {
|
||||
Some(Blob::new(
|
||||
&self.global(),
|
||||
BlobImpl::new_from_bytes(vec![], "".to_owned()),
|
||||
CanGc::note(),
|
||||
can_gc,
|
||||
))
|
||||
}
|
||||
fn SetInterfaceAttributeNullable(&self, _: Option<&Blob>) {}
|
||||
|
@ -419,11 +419,11 @@ impl TestBindingMethods for TestBinding {
|
|||
fn ReceiveEnum(&self) -> TestEnum {
|
||||
TestEnum::_empty
|
||||
}
|
||||
fn ReceiveInterface(&self) -> DomRoot<Blob> {
|
||||
fn ReceiveInterface(&self, can_gc: CanGc) -> DomRoot<Blob> {
|
||||
Blob::new(
|
||||
&self.global(),
|
||||
BlobImpl::new_from_bytes(vec![], "".to_owned()),
|
||||
CanGc::note(),
|
||||
can_gc,
|
||||
)
|
||||
}
|
||||
fn ReceiveAny(&self, _: SafeJSContext) -> JSVal {
|
||||
|
@ -468,11 +468,11 @@ impl TestBindingMethods for TestBinding {
|
|||
fn ReceiveSequence(&self) -> Vec<i32> {
|
||||
vec![1]
|
||||
}
|
||||
fn ReceiveInterfaceSequence(&self) -> Vec<DomRoot<Blob>> {
|
||||
fn ReceiveInterfaceSequence(&self, can_gc: CanGc) -> Vec<DomRoot<Blob>> {
|
||||
vec![Blob::new(
|
||||
&self.global(),
|
||||
BlobImpl::new_from_bytes(vec![], "".to_owned()),
|
||||
CanGc::note(),
|
||||
can_gc,
|
||||
)]
|
||||
}
|
||||
fn ReceiveUnionIdentity(
|
||||
|
@ -534,11 +534,11 @@ impl TestBindingMethods for TestBinding {
|
|||
fn ReceiveNullableEnum(&self) -> Option<TestEnum> {
|
||||
Some(TestEnum::_empty)
|
||||
}
|
||||
fn ReceiveNullableInterface(&self) -> Option<DomRoot<Blob>> {
|
||||
fn ReceiveNullableInterface(&self, can_gc: CanGc) -> Option<DomRoot<Blob>> {
|
||||
Some(Blob::new(
|
||||
&self.global(),
|
||||
BlobImpl::new_from_bytes(vec![], "".to_owned()),
|
||||
CanGc::note(),
|
||||
can_gc,
|
||||
))
|
||||
}
|
||||
fn ReceiveNullableObject(&self, cx: SafeJSContext) -> Option<NonNull<JSObject>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue