зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1196089 - Treat script sources introduced by DOM timers as anonymous. r=davidwalsh
Differential Revision: https://phabricator.services.mozilla.com/D83410
This commit is contained in:
Родитель
d1c3302aa9
Коммит
283fb0d42d
|
@ -26,8 +26,7 @@ function getDebuggerSourceURL(source) {
|
|||
introType === "debugger eval" ||
|
||||
introType === "Function" ||
|
||||
introType === "eventHandler" ||
|
||||
introType === "setTimeout" ||
|
||||
introType === "setInterval"
|
||||
introType === "domTimer"
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -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<JSObject*> global(aes.cx(), mGlobal->GetGlobalJSObject());
|
||||
{
|
||||
nsJSUtils::ExecutionContext exec(aes.cx(), global);
|
||||
|
|
|
@ -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<JS::Value> unused(cx);
|
||||
JS::SourceText<char16_t> srcBuf;
|
||||
|
|
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче