mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Run a script in a new DebuggerGlobalScope
Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: atbrakhi <atbrakhi@igalia.com>
This commit is contained in:
parent
186558ca08
commit
23c166fcf1
7 changed files with 123 additions and 3 deletions
|
@ -114,7 +114,7 @@ use crate::dom::reportingobserver::ReportingObserver;
|
|||
use crate::dom::serviceworker::ServiceWorker;
|
||||
use crate::dom::serviceworkerregistration::ServiceWorkerRegistration;
|
||||
use crate::dom::trustedtypepolicyfactory::TrustedTypePolicyFactory;
|
||||
use crate::dom::types::MessageEvent;
|
||||
use crate::dom::types::{DebuggerGlobalScope, MessageEvent};
|
||||
use crate::dom::underlyingsourcecontainer::UnderlyingSourceType;
|
||||
#[cfg(feature = "webgpu")]
|
||||
use crate::dom::webgpu::gpudevice::GPUDevice;
|
||||
|
@ -2530,6 +2530,9 @@ impl GlobalScope {
|
|||
// https://drafts.css-houdini.org/worklets/#script-settings-for-worklets
|
||||
return worklet.base_url();
|
||||
}
|
||||
if let Some(_debugger_global) = self.downcast::<DebuggerGlobalScope>() {
|
||||
return self.creation_url.clone();
|
||||
}
|
||||
unreachable!();
|
||||
}
|
||||
|
||||
|
@ -2545,6 +2548,9 @@ impl GlobalScope {
|
|||
// TODO: is this the right URL to return?
|
||||
return worklet.base_url();
|
||||
}
|
||||
if let Some(_debugger_global) = self.downcast::<DebuggerGlobalScope>() {
|
||||
return self.creation_url.clone();
|
||||
}
|
||||
unreachable!();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue