diff --git a/components/script/dom/debuggerglobalscope.rs b/components/script/dom/debuggerglobalscope.rs index 65721a188fb..984e8a5ba20 100644 --- a/components/script/dom/debuggerglobalscope.rs +++ b/components/script/dom/debuggerglobalscope.rs @@ -174,7 +174,7 @@ impl DebuggerGlobalScopeMethods for DebuggerGlobalScope { url: ServoUrl::parse(args.url.str()).expect("Failed to parse url"), external: true, // TODO worker_id: None, // TODO - content: Some(args.text.to_string()), + content: (!args.isInline).then(|| args.text.to_string()), content_type: None, // TODO spidermonkey_id: args.spidermonkeyId, }; diff --git a/components/script_bindings/webidls/DebuggerGlobalScope.webidl b/components/script_bindings/webidls/DebuggerGlobalScope.webidl index 545e68dbe62..bc333e31bbc 100644 --- a/components/script_bindings/webidls/DebuggerGlobalScope.webidl +++ b/components/script_bindings/webidls/DebuggerGlobalScope.webidl @@ -15,6 +15,7 @@ dictionary NotifyNewSource { required unsigned long spidermonkeyId; required DOMString url; required DOMString text; + required boolean isInline; // FIXME: error[E0599]: the method `trace` exists for reference `&Option>`, but // its trait bounds were not satisfied diff --git a/resources/debugger.js b/resources/debugger.js index 4e36466bbfb..646308c85d0 100644 --- a/resources/debugger.js +++ b/resources/debugger.js @@ -19,6 +19,7 @@ if (!("dbg" in this)) { spidermonkeyId: script.source.id, url: script.source.url, text: script.source.text, + isInline: script.source.introductionType == "inlineScript", }); } catch (error) { logError(error);