Backed out 2 changesets (bug 1099149, bug 1154356) for suspicion that one of them is causing frequent Android debug recursion.js failures. a=me
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 27 Apr 2015 15:14:19 -0400
changeset 241246 caf25344f73e491409e16dff59e5599858c87e32
parent 241245 4b3dcb5f7309797d05d50ea697cbf40382ed63ed
child 241253 2520f66c97a41784a97b127554d42342e50812a8
child 241297 b137a86f44bfc5b6dac99ad7c880deecf12bca03
child 241341 92cfbfb1a4648e5decf3b8cb9429e9e2f66bb149
push id28655
push userryanvm@gmail.com
push dateMon, 27 Apr 2015 19:14:23 +0000
treeherdermozilla-central@caf25344f73e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1099149, 1154356
milestone40.0a1
backs outecc645744a1134ce0e302611c8320a73f622a00a
1d7c532f2a627f129d329dca47917b2c18032556
first release with
nightly linux32
caf25344f73e / 40.0a1 / 20150428030209 / files
nightly linux64
caf25344f73e / 40.0a1 / 20150428030209 / files
nightly mac
caf25344f73e / 40.0a1 / 20150428030209 / files
nightly win32
caf25344f73e / 40.0a1 / 20150428030209 / files
nightly win64
caf25344f73e / 40.0a1 / 20150428030209 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 1099149, bug 1154356) for suspicion that one of them is causing frequent Android debug recursion.js failures. a=me Backed out changeset ecc645744a11 (bug 1154356) Backed out changeset 1d7c532f2a62 (bug 1099149)
js/src/builtin/SIMD.cpp
js/src/js.msg
layout/style/Declaration.cpp
layout/style/test/test_variables.html
--- a/js/src/builtin/SIMD.cpp
+++ b/js/src/builtin/SIMD.cpp
@@ -58,44 +58,25 @@ js::IsVectorObject(HandleValue v)
 {
     return CheckVectorObject(v, V::type);
 }
 
 template bool js::IsVectorObject<Int32x4>(HandleValue v);
 template bool js::IsVectorObject<Float32x4>(HandleValue v);
 template bool js::IsVectorObject<Float64x2>(HandleValue v);
 
-static inline bool
-ErrorBadArgs(JSContext* cx)
-{
-    JS_ReportErrorNumber(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_BAD_ARGS);
-    return false;
-}
-
-static inline bool
-ErrorWrongTypeArg(JSContext* cx, size_t argIndex, Handle<TypeDescr*> typeDescr)
-{
-    MOZ_ASSERT(argIndex < 10);
-    char charArgIndex[2];
-    JS_snprintf(charArgIndex, sizeof charArgIndex, "%d", argIndex);
-
-    HeapSlot& typeNameSlot = typeDescr->getReservedSlotRef(JS_DESCR_SLOT_STRING_REPR);
-    JS_ReportErrorNumber(cx, GetErrorMessage, nullptr, JSMSG_SIMD_NOT_A_VECTOR,
-                         JS_EncodeString(cx, typeNameSlot.toString()), charArgIndex);
-    return false;
-}
-
 template<typename V>
 bool
 js::ToSimdConstant(JSContext* cx, HandleValue v, jit::SimdConstant* out)
 {
     typedef typename V::Elem Elem;
-    Rooted<TypeDescr*> typeDescr(cx, &V::GetTypeDescr(*cx->global()));
-    if (!IsVectorObject<V>(v))
-        return ErrorWrongTypeArg(cx, 1, typeDescr);
+    if (!IsVectorObject<V>(v)) {
+        JS_ReportErrorNumber(cx, GetErrorMessage, nullptr, JSMSG_SIMD_NOT_A_VECTOR);
+        return false;
+    }
 
     Elem* mem = reinterpret_cast<Elem*>(v.toObject().as<TypedObject>().typedMem());
     *out = jit::SimdConstant::CreateX4(mem);
     return true;
 }
 
 template bool js::ToSimdConstant<Int32x4>(JSContext* cx, HandleValue v, jit::SimdConstant* out);
 template bool js::ToSimdConstant<Float32x4>(JSContext* cx, HandleValue v, jit::SimdConstant* out);
@@ -636,16 +617,23 @@ struct ShiftRightArithmetic {
 };
 struct ShiftRightLogical {
     static int32_t apply(int32_t v, int32_t bits) {
         return uint32_t(bits) >= 32 ? 0 : uint32_t(v) >> bits;
     }
 };
 }
 
+static inline bool
+ErrorBadArgs(JSContext* cx)
+{
+    JS_ReportErrorNumber(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_BAD_ARGS);
+    return false;
+}
+
 template<typename Out>
 static bool
 StoreResult(JSContext* cx, CallArgs& args, typename Out::Elem* result)
 {
     RootedObject obj(cx, CreateSimd<Out>(cx, result));
     if (!obj)
         return false;
     args.rval().setObject(*obj);
--- a/js/src/js.msg
+++ b/js/src/js.msg
@@ -304,17 +304,17 @@ MSG_DEF(JSMSG_SEMI_AFTER_FOR_COND,     0
 MSG_DEF(JSMSG_SEMI_AFTER_FOR_INIT,     0, JSEXN_SYNTAXERR, "missing ; after for-loop initializer")
 MSG_DEF(JSMSG_SEMI_BEFORE_STMNT,       0, JSEXN_SYNTAXERR, "missing ; before statement")
 MSG_DEF(JSMSG_SOURCE_TOO_LONG,         0, JSEXN_RANGEERR, "source is too long")
 MSG_DEF(JSMSG_STMT_AFTER_SEMI_LESS,    0, JSEXN_SYNTAXERR, "unreachable expression after semicolon-less return statement")
 MSG_DEF(JSMSG_STRICT_CODE_LET_EXPR_STMT, 0, JSEXN_ERR, "strict mode code may not contain unparenthesized let expression statements")
 MSG_DEF(JSMSG_STRICT_CODE_WITH,        0, JSEXN_SYNTAXERR, "strict mode code may not contain 'with' statements")
 MSG_DEF(JSMSG_STRICT_FUNCTION_STATEMENT, 0, JSEXN_SYNTAXERR, "in strict mode code, functions may be declared only at top level or immediately within another function")
 MSG_DEF(JSMSG_TEMPLSTR_UNTERM_EXPR,    0, JSEXN_SYNTAXERR, "missing } in template string")
-MSG_DEF(JSMSG_SIMD_NOT_A_VECTOR,       2, JSEXN_TYPEERR, "expecting a SIMD {0} object as argument {1}")
+MSG_DEF(JSMSG_SIMD_NOT_A_VECTOR,       0, JSEXN_TYPEERR, "value isn't a SIMD value object")
 MSG_DEF(JSMSG_TOO_MANY_CASES,          0, JSEXN_INTERNALERR, "too many switch cases")
 MSG_DEF(JSMSG_TOO_MANY_CATCH_VARS,     0, JSEXN_SYNTAXERR, "too many catch variables")
 MSG_DEF(JSMSG_TOO_MANY_CON_ARGS,       0, JSEXN_SYNTAXERR, "too many constructor arguments")
 MSG_DEF(JSMSG_TOO_MANY_DEFAULTS,       0, JSEXN_SYNTAXERR, "more than one switch default")
 MSG_DEF(JSMSG_TOO_MANY_FUN_ARGS,       0, JSEXN_SYNTAXERR, "too many function arguments")
 MSG_DEF(JSMSG_TOO_MANY_LOCALS,         0, JSEXN_SYNTAXERR, "too many local variables")
 MSG_DEF(JSMSG_TOO_MANY_YIELDS,         0, JSEXN_SYNTAXERR, "too many yield expressions")
 MSG_DEF(JSMSG_TOUGH_BREAK,             0, JSEXN_SYNTAXERR, "unlabeled break must be inside loop or switch")
--- a/layout/style/Declaration.cpp
+++ b/layout/style/Declaration.cpp
@@ -1166,20 +1166,18 @@ Declaration::AppendPropertyAndValueToStr
   }
   aResult.AppendLiteral("; ");
 }
 
 void
 Declaration::AppendVariableAndValueToString(const nsAString& aName,
                                             nsAString& aResult) const
 {
-  nsAutoString localName;
-  localName.AppendLiteral("--");
-  localName.Append(aName);
-  nsStyleUtil::AppendEscapedCSSIdent(localName, aResult);
+  aResult.AppendLiteral("--");
+  aResult.Append(aName);
   CSSVariableDeclarations::Type type;
   nsString value;
   bool important;
 
   if (mImportantVariables && mImportantVariables->Get(aName, type, value)) {
     important = true;
   } else {
     MOZ_ASSERT(mVariables);
--- a/layout/style/test/test_variables.html
+++ b/layout/style/test/test_variables.html
@@ -21,19 +21,16 @@
 <style id="test5">
 </style>
 
 <div id="t5"></div>
 
 <style id="test6">
 </style>
 
-<style id="test7">
-</style>
-
 <script>
 var tests = [
   function() {
     // https://bugzilla.mozilla.org/show_bug.cgi?id=773296#c121
     var test1 = document.getElementById("test1");
     test1.textContent = "p { --a:123!important; }";
     var declaration = test1.sheet.cssRules[0].style;
     declaration.cssText;
@@ -89,25 +86,16 @@ var tests = [
   function() {
     // https://bugzilla.mozilla.org/show_bug.cgi?id=969756
     var test6 = document.getElementById("test6");
     test6.textContent = "p { font: var(--var6) hangul mongolian; font-size-adjust: none; }";
     var declaration = test6.sheet.cssRules[0].style;
     test6.style.color = "white";
     is(declaration.getPropertyValue("-x-system-font"), " var(--var6) hangul mongolian");
   },
-
-  function() {
-    // https://bugzilla.mozilla.org/show_bug.cgi?id=1154356
-    var test7 = document.getElementById("test7");
-    test7.textContent = "p { --weird\\;name: green; }";
-    is(test7.sheet.cssRules[0].style.cssText, "--weird\\;name:  green;");
-    test7.textContent = "p { --0: green; }";
-    is(test7.sheet.cssRules[0].style.cssText, "--0:  green;");
-  },
 ];
 
 function prepareTest() {
   // Load an external style sheet for test 4.
   var e = document.createElement("link");
   e.addEventListener("load", runTest);
   e.setAttribute("rel", "stylesheet");
   e.setAttribute("href", "support/external-variable-url.css");