Bug 1073853 - Do Symbol-related tests only if defined. r=jorendorff

This commit is contained in:
Tooru Fujisawa 2014-10-08 09:53:00 -04:00
parent 828c21859e
commit fe07bea80b
2 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,6 @@
// |jit-test| ion-eager;
if (typeof Symbol !== "function") quit(0);
var x
(function() {
x

View File

@ -929,8 +929,12 @@ function rregexp_m_literal_replace(i) {
var uceFault_typeof = eval(uneval(uceFault).replace('uceFault', 'uceFault_typeof'))
function rtypeof(i) {
var inputs = [ {}, [], 1, true, Symbol(), undefined, function(){}, null ];
var types = [ "object", "object", "number", "boolean", "symbol", "undefined", "function", "object"];
var inputs = [ {}, [], 1, true, undefined, function(){}, null ];
var types = [ "object", "object", "number", "boolean", "undefined", "function", "object"];
if (typeof Symbol === "function") {
inputs.push(Symbol());
types.push("symbol");
}
var x = typeof (inputs[i % inputs.length]);
var y = types[i % types.length];