Support isSecureContext for custom protocols

Signed-off-by: Tony <legendmastertony@gmail.com>
This commit is contained in:
Tony 2025-04-25 22:01:08 +08:00
parent 894fbd003d
commit d49689bf09
No known key found for this signature in database
GPG key ID: 34BDD3EA27824956
13 changed files with 103 additions and 10 deletions

View file

@ -52,11 +52,11 @@ use js::rust::{
};
use malloc_size_of::MallocSizeOf;
use media::WindowGLContext;
use net_traits::ResourceThreads;
use net_traits::image_cache::{
ImageCache, ImageResponder, ImageResponse, PendingImageId, PendingImageResponse,
};
use net_traits::storage_thread::StorageType;
use net_traits::{Protocols, ResourceThreads};
use num_traits::ToPrimitive;
use profile_traits::ipc as ProfiledIpc;
use profile_traits::mem::ProfilerChan as MemProfilerChan;
@ -2834,6 +2834,7 @@ impl Window {
player_context: WindowGLContext,
#[cfg(feature = "webgpu")] gpu_id_hub: Arc<IdentityHub>,
inherited_secure_context: Option<bool>,
protocols: Arc<Protocols>,
) -> DomRoot<Self> {
let error_reporter = CSSErrorReporter {
pipelineid: pipeline_id,
@ -2861,6 +2862,7 @@ impl Window {
gpu_id_hub,
inherited_secure_context,
unminify_js,
protocols,
),
script_chan,
layout: RefCell::new(layout),