зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1621817 - Remove nsIScriptError.strictFlag. r=remote-protocol-reviewers,mccr8,whimboo
I am not sure if you are okay with reviewing all those test changes. Sadly it's not that easy to search through our huge JavaScript code base for some generic name like 'isStrict'. Differential Revision: https://phabricator.services.mozilla.com/D66573 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
20a800aae6
Коммит
ff852cea9c
|
@ -277,10 +277,6 @@ function scriptErrorFlagsToKind(flags) {
|
|||
kind = "error";
|
||||
}
|
||||
|
||||
if (flags & Ci.nsIScriptError.strictFlag) {
|
||||
kind = "strict " + kind;
|
||||
}
|
||||
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,10 +45,6 @@ function scriptErrorFlagsToKind(flags) {
|
|||
kind = "error";
|
||||
}
|
||||
|
||||
if (flags & Ci.nsIScriptError.strictFlag) {
|
||||
kind = "strict " + kind;
|
||||
}
|
||||
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
@ -85,10 +81,7 @@ var listener = {
|
|||
xpcInspector.exitNestedEventLoop();
|
||||
}
|
||||
|
||||
// Print in most cases, but ignore the "strict" messages
|
||||
if (!(message.flags & Ci.nsIScriptError.strictFlag)) {
|
||||
info("head_dbg.js got console message: " + string + "\n");
|
||||
}
|
||||
info("head_dbg.js got console message: " + string + "\n");
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -43,10 +43,6 @@ function scriptErrorFlagsToKind(flags) {
|
|||
kind = "error";
|
||||
}
|
||||
|
||||
if (flags & Ci.nsIScriptError.strictFlag) {
|
||||
kind = "strict " + kind;
|
||||
}
|
||||
|
||||
return kind;
|
||||
}
|
||||
|
||||
|
@ -87,10 +83,7 @@ var listener = {
|
|||
DevToolsServer.xpcInspector.exitNestedEventLoop();
|
||||
}
|
||||
|
||||
// Throw in most cases, but ignore the "strict" messages
|
||||
if (!(message.flags & Ci.nsIScriptError.strictFlag)) {
|
||||
do_throw("head_dbg.js got console message: " + string + "\n");
|
||||
}
|
||||
do_throw("head_dbg.js got console message: " + string + "\n");
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -47,10 +47,6 @@ interface nsIScriptError : nsIConsoleMessage
|
|||
/** exception was thrown for this case - exception-aware hosts can ignore */
|
||||
const unsigned long exceptionFlag = 0x2;
|
||||
|
||||
// XXX check how strict is implemented these days.
|
||||
/** error or warning is due to strict option */
|
||||
const unsigned long strictFlag = 0x4;
|
||||
|
||||
/** just a log message */
|
||||
const unsigned long infoFlag = 0x8;
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
static_assert(nsIScriptError::errorFlag == JSREPORT_ERROR &&
|
||||
nsIScriptError::warningFlag == JSREPORT_WARNING &&
|
||||
nsIScriptError::exceptionFlag == JSREPORT_EXCEPTION &&
|
||||
nsIScriptError::strictFlag == JSREPORT_STRICT &&
|
||||
nsIScriptError::infoFlag == JSREPORT_USER_1,
|
||||
"flags should be consistent");
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ ConsoleListener.prototype = {
|
|||
isScriptError: true,
|
||||
isWarning: (aMsg.flags & Ci.nsIScriptError.warningFlag) === 1,
|
||||
isException: (aMsg.flags & Ci.nsIScriptError.exceptionFlag) === 1,
|
||||
isStrict: (aMsg.flags & Ci.nsIScriptError.strictFlag) === 1,
|
||||
};
|
||||
|
||||
sendAsyncMessage("monitor", msg);
|
||||
|
|
|
@ -281,9 +281,6 @@ void xpc::ErrorReport::LogToStderr() {
|
|||
|
||||
nsAutoCString error;
|
||||
error.AssignLiteral("JavaScript ");
|
||||
if (JSREPORT_IS_STRICT(mFlags)) {
|
||||
error.AppendLiteral("strict ");
|
||||
}
|
||||
if (JSREPORT_IS_WARNING(mFlags)) {
|
||||
error.AppendLiteral("warning: ");
|
||||
} else {
|
||||
|
|
|
@ -122,10 +122,7 @@ function fromScriptError(error) {
|
|||
flags & Ci.nsIScriptError.errorFlag
|
||||
) {
|
||||
level = "error";
|
||||
} else if (
|
||||
flags & Ci.nsIScriptError.warningFlag ||
|
||||
flags & Ci.nsIScriptError.strictFlag
|
||||
) {
|
||||
} else if (flags & Ci.nsIScriptError.warningFlag) {
|
||||
level = "warning";
|
||||
} else if (flags & Ci.nsIScriptError.infoFlag) {
|
||||
level = "info";
|
||||
|
|
|
@ -1505,7 +1505,7 @@ SimpleTest.finish = function() {
|
|||
* message, errorMessage, sourceName, sourceLine, category:
|
||||
* string or regexp
|
||||
* lineNumber, columnNumber: number
|
||||
* isScriptError, isWarning, isException, isStrict: boolean
|
||||
* isScriptError, isWarning, isException: boolean
|
||||
* Strings, numbers, and booleans must compare equal to the named
|
||||
* property of the Nth console message. Regexps must match. Any
|
||||
* fields present in the message but not in the pattern object are ignored.
|
||||
|
|
|
@ -99,7 +99,6 @@ SPConsoleListener.prototype = {
|
|||
isConsoleEvent: false,
|
||||
isWarning: false,
|
||||
isException: false,
|
||||
isStrict: false,
|
||||
};
|
||||
if (msg instanceof Ci.nsIScriptError) {
|
||||
m.errorMessage = msg.errorMessage;
|
||||
|
@ -114,7 +113,6 @@ SPConsoleListener.prototype = {
|
|||
m.isScriptError = true;
|
||||
m.isWarning = (msg.flags & Ci.nsIScriptError.warningFlag) === 1;
|
||||
m.isException = (msg.flags & Ci.nsIScriptError.exceptionFlag) === 1;
|
||||
m.isStrict = (msg.flags & Ci.nsIScriptError.strictFlag) === 1;
|
||||
} else if (topic === "console-api-log-event") {
|
||||
// This is a dom/console event.
|
||||
let unwrapped = msg.wrappedJSObject;
|
||||
|
|
Загрузка…
Ссылка в новой задаче