mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
refactor: add CanGc as argument to Promise::resolve (#35616)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
parent
adb831eefe
commit
0383ba9a5b
57 changed files with 330 additions and 294 deletions
|
@ -256,7 +256,7 @@ impl BlobMethods<crate::DomTypeHolder> for Blob {
|
|||
Ok(b) => {
|
||||
let (text, _, _) = UTF_8.decode(&b);
|
||||
let text = DOMString::from(text);
|
||||
promise.resolve_native(&text);
|
||||
promise.resolve_native(&text, CanGc::note());
|
||||
},
|
||||
Err(e) => {
|
||||
promise.reject_error(e);
|
||||
|
@ -284,7 +284,9 @@ impl BlobMethods<crate::DomTypeHolder> for Blob {
|
|||
let result = run_array_buffer_data_algorithm(cx, b, CanGc::note());
|
||||
|
||||
match result {
|
||||
Ok(FetchedData::ArrayBuffer(a)) => promise.resolve_native(&a),
|
||||
Ok(FetchedData::ArrayBuffer(a)) => {
|
||||
promise.resolve_native(&a, CanGc::note())
|
||||
},
|
||||
Err(e) => promise.reject_error(e),
|
||||
_ => panic!("Unexpected result from run_array_buffer_data_algorithm"),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue