mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Add proof parameter to Promise::new_in_current_compartment
This commit is contained in:
parent
7b293ee8cb
commit
1b6949d4cf
25 changed files with 263 additions and 95 deletions
|
@ -2,6 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::compartments::{AlreadyInCompartment, InCompartment};
|
||||
use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestInfo;
|
||||
use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestInit;
|
||||
use crate::dom::bindings::codegen::Bindings::ResponseBinding::ResponseBinding::ResponseMethods;
|
||||
|
@ -129,7 +130,6 @@ fn request_init_from_request(request: NetTraitsRequest) -> RequestBuilder {
|
|||
|
||||
// https://fetch.spec.whatwg.org/#fetch-method
|
||||
#[allow(unrooted_must_root)]
|
||||
#[allow(unsafe_code)]
|
||||
pub fn Fetch(
|
||||
global: &GlobalScope,
|
||||
input: RequestInfo,
|
||||
|
@ -138,7 +138,8 @@ pub fn Fetch(
|
|||
let core_resource_thread = global.core_resource_thread();
|
||||
|
||||
// Step 1
|
||||
let promise = unsafe { Promise::new_in_current_compartment(global) };
|
||||
let aic = AlreadyInCompartment::assert(global);
|
||||
let promise = Promise::new_in_current_compartment(global, &InCompartment::Already(&aic));
|
||||
let response = Response::new(global);
|
||||
|
||||
// Step 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue