mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Plumb the introductionType into notifyNewSource()
Co-authored-by: atbrakhi <atbrakhi@igalia.com> Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
parent
615c9ec013
commit
4e57fefeec
3 changed files with 3 additions and 1 deletions
|
@ -174,7 +174,7 @@ impl DebuggerGlobalScopeMethods<crate::DomTypeHolder> for DebuggerGlobalScope {
|
||||||
url: ServoUrl::parse(args.url.str()).expect("Failed to parse url"),
|
url: ServoUrl::parse(args.url.str()).expect("Failed to parse url"),
|
||||||
external: true, // TODO
|
external: true, // TODO
|
||||||
worker_id: None, // TODO
|
worker_id: None, // TODO
|
||||||
content: Some(args.text.to_string()),
|
content: (!args.isInline).then(|| args.text.to_string()),
|
||||||
content_type: None, // TODO
|
content_type: None, // TODO
|
||||||
spidermonkey_id: args.spidermonkeyId,
|
spidermonkey_id: args.spidermonkeyId,
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,6 +15,7 @@ dictionary NotifyNewSource {
|
||||||
required unsigned long spidermonkeyId;
|
required unsigned long spidermonkeyId;
|
||||||
required DOMString url;
|
required DOMString url;
|
||||||
required DOMString text;
|
required DOMString text;
|
||||||
|
required boolean isInline;
|
||||||
|
|
||||||
// FIXME: error[E0599]: the method `trace` exists for reference `&Option<TypedArray<Uint8, *mut JSObject>>`, but
|
// FIXME: error[E0599]: the method `trace` exists for reference `&Option<TypedArray<Uint8, *mut JSObject>>`, but
|
||||||
// its trait bounds were not satisfied
|
// its trait bounds were not satisfied
|
||||||
|
|
|
@ -19,6 +19,7 @@ if (!("dbg" in this)) {
|
||||||
spidermonkeyId: script.source.id,
|
spidermonkeyId: script.source.id,
|
||||||
url: script.source.url,
|
url: script.source.url,
|
||||||
text: script.source.text,
|
text: script.source.text,
|
||||||
|
isInline: script.source.introductionType == "inlineScript",
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logError(error);
|
logError(error);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue