Bug 1498252 - Remove bogus newlines from ContextChecks crash messages. r=jwalden
authorJason Orendorff <jorendorff@mozilla.com>
Fri, 12 Oct 2018 00:39:23 +0000
changeset 496897 7109102a6cdd6c4764ae9fdbd6fa4effdb1688ab
parent 496896 298dcf923f48ff967efcab0a41c33046bed3817a
child 496898 7e0abd16a50b77fb6437f96b80cafe0b83723c27
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs1498252
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1498252 - Remove bogus newlines from ContextChecks crash messages. r=jwalden Differential Revision: https://phabricator.services.mozilla.com/D8393
js/src/vm/JSContext-inl.h
--- a/js/src/vm/JSContext-inl.h
+++ b/js/src/vm/JSContext-inl.h
@@ -40,25 +40,25 @@ class ContextChecks
     {
     }
 
     /*
      * Set a breakpoint here (break js::ContextChecks::fail) to debug
      * realm/compartment/zone mismatches.
      */
     static void fail(JS::Realm* r1, JS::Realm* r2, int argIndex) {
-        MOZ_CRASH_UNSAFE_PRINTF("*** Realm mismatch %p vs. %p at argument %d\n",
+        MOZ_CRASH_UNSAFE_PRINTF("*** Realm mismatch %p vs. %p at argument %d",
                                 r1, r2, argIndex);
     }
     static void fail(JS::Compartment* c1, JS::Compartment* c2, int argIndex) {
-        MOZ_CRASH_UNSAFE_PRINTF("*** Compartment mismatch %p vs. %p at argument %d\n",
+        MOZ_CRASH_UNSAFE_PRINTF("*** Compartment mismatch %p vs. %p at argument %d",
                                 c1, c2, argIndex);
     }
     static void fail(JS::Zone* z1, JS::Zone* z2, int argIndex) {
-        MOZ_CRASH_UNSAFE_PRINTF("*** Zone mismatch %p vs. %p at argument %d\n",
+        MOZ_CRASH_UNSAFE_PRINTF("*** Zone mismatch %p vs. %p at argument %d",
                                 z1, z2, argIndex);
     }
 
     void check(JS::Realm* r, int argIndex) {
         if (r && r != realm()) {
             fail(realm(), r, argIndex);
         }
     }
@@ -89,17 +89,17 @@ class ContextChecks
                       mozilla::IsSame<T, JS::Symbol>::value,
                       "Should only be called with JSAtom* or JS::Symbol* argument");
 
 #ifdef DEBUG
         // Atoms which move across zone boundaries need to be marked in the new
         // zone, see JS_MarkCrossZoneId.
         if (zone()) {
             if (!cx->runtime()->gc.atomMarking.atomIsMarked(zone(), thing)) {
-                MOZ_CRASH_UNSAFE_PRINTF("*** Atom not marked for zone %p at argument %d\n",
+                MOZ_CRASH_UNSAFE_PRINTF("*** Atom not marked for zone %p at argument %d",
                                         zone(), argIndex);
             }
         }
 #endif
     }
 
     void check(JSString* str, int argIndex) {
         MOZ_ASSERT(JS::CellIsNotGray(str));