mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
Move unsafe to the wrap method for global objects (#38896)
The method now doesn't need unsafe in its signature because it no longer accepts unsafe pointers as arguments. We move the unsafe marker to the method itself. Testing: I opened the browser and went to google.com; I ran some WPT (IndexedDB) tests. Fixes: #38361 --------- Signed-off-by: criskell <96352451+criskell@users.noreply.github.com>
This commit is contained in:
parent
b9dc228e51
commit
9082217272
11 changed files with 41 additions and 75 deletions
|
@ -13,7 +13,6 @@ use dom_struct::dom_struct;
|
|||
use embedder_traits::JavaScriptEvaluationError;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::rust::Runtime;
|
||||
use net_traits::ResourceThreads;
|
||||
use net_traits::image_cache::ImageCache;
|
||||
use profile_traits::{mem, time};
|
||||
|
@ -56,7 +55,6 @@ impl WorkletGlobalScope {
|
|||
/// Create a new heap-allocated `WorkletGlobalScope`.
|
||||
pub(crate) fn new(
|
||||
scope_type: WorkletGlobalScopeType,
|
||||
runtime: &Runtime,
|
||||
pipeline_id: PipelineId,
|
||||
base_url: ServoUrl,
|
||||
executor: WorkletExecutor,
|
||||
|
@ -65,14 +63,12 @@ impl WorkletGlobalScope {
|
|||
let scope: DomRoot<WorkletGlobalScope> = match scope_type {
|
||||
#[cfg(feature = "testbinding")]
|
||||
WorkletGlobalScopeType::Test => DomRoot::upcast(TestWorkletGlobalScope::new(
|
||||
runtime,
|
||||
pipeline_id,
|
||||
base_url,
|
||||
executor,
|
||||
init,
|
||||
)),
|
||||
WorkletGlobalScopeType::Paint => DomRoot::upcast(PaintWorkletGlobalScope::new(
|
||||
runtime,
|
||||
pipeline_id,
|
||||
base_url,
|
||||
executor,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue