diff --git a/devtools/server/actors/utils/source-url.js b/devtools/server/actors/utils/source-url.js index b291a4182044..34e6b02272be 100644 --- a/devtools/server/actors/utils/source-url.js +++ b/devtools/server/actors/utils/source-url.js @@ -26,8 +26,7 @@ function getDebuggerSourceURL(source) { introType === "debugger eval" || introType === "Function" || introType === "eventHandler" || - introType === "setTimeout" || - introType === "setInterval" + introType === "domTimer" ) { return null; } diff --git a/dom/base/nsGlobalWindowInner.cpp b/dom/base/nsGlobalWindowInner.cpp index 4d49899cafad..65fe55ff3aeb 100644 --- a/dom/base/nsGlobalWindowInner.cpp +++ b/dom/base/nsGlobalWindowInner.cpp @@ -5744,6 +5744,7 @@ bool WindowScriptTimeoutHandler::Call(const char* aExecutionReason) { JS::CompileOptions options(aes.cx()); options.setFileAndLine(mFileName.get(), mLineNo); options.setNoScriptRval(true); + options.setIntroductionType("domTimer"); JS::Rooted global(aes.cx(), mGlobal->GetGlobalJSObject()); { nsJSUtils::ExecutionContext exec(aes.cx(), global); diff --git a/dom/workers/WorkerScope.cpp b/dom/workers/WorkerScope.cpp index 8bd8ab2eac50..a748e652a5b1 100644 --- a/dom/workers/WorkerScope.cpp +++ b/dom/workers/WorkerScope.cpp @@ -95,6 +95,7 @@ bool WorkerScriptTimeoutHandler::Call(const char* aExecutionReason) { JSContext* cx = aes.cx(); JS::CompileOptions options(cx); options.setFileAndLine(mFileName.get(), mLineNo).setNoScriptRval(true); + options.setIntroductionType("domTimer"); JS::Rooted unused(cx); JS::SourceText srcBuf; diff --git a/js/src/doc/Debugger/Debugger.Source.md b/js/src/doc/Debugger/Debugger.Source.md index 9ff5d257af2a..c9603bd89323 100644 --- a/js/src/doc/Debugger/Debugger.Source.md +++ b/js/src/doc/Debugger/Debugger.Source.md @@ -205,9 +205,7 @@ one of the following values: * `"javascriptURL"`, for code presented in `javascript:` URLs. -* `"setTimeout"`, for code passed to `setTimeout` as a string. - -* `"setInterval"`, for code passed to `setInterval` as a string. +* `"domTimer"`, for code passed to `setTimeout`/`setInterval` as a string. * `undefined`, if the implementation doesn't know how the code was introduced.