Backed out changeset 7e58207e220a (bug 1471371) for spidermonkey failures at oom-in-construction.js. CLOSED TREE
authorCsoregi Natalia <ncsoregi@mozilla.com>
Thu, 16 Aug 2018 01:23:13 +0300
changeset 486910 083414a62ea15be84270efc2bc86bb358a3b22f1
parent 486909 0161b3bbc9d21cb915ffb3fe6b0aead720141c0b
child 486911 baba90c7c28f86218bbf7f0fc8ae5c3831f33b34
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1471371
milestone63.0a1
backs out7e58207e220a837a79af6101c6fdfb14bb84a828
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
Backed out changeset 7e58207e220a (bug 1471371) for spidermonkey failures at oom-in-construction.js. CLOSED TREE
js/src/tests/non262/RegExp/oom-in-construction.js
js/src/vm/RegExpObject.cpp
deleted file mode 100644
--- a/js/src/tests/non262/RegExp/oom-in-construction.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var BUGNUMBER = 1471371;
-var summary = 'Handle OOM in RegExp';
-
-printBugNumber(BUGNUMBER);
-printStatus(summary);
-
-if (!('oomTest' in this))
-    quit();
-
-oomTest(function () {
-    for (var i = 0; i < 10; ++i) {
-        try {
-            RegExp("", "gimuyz");
-        } catch { }
-    }
-});
-
-if (typeof reportCompare === "function")
-    reportCompare(true, true);
--- a/js/src/vm/RegExpObject.cpp
+++ b/js/src/vm/RegExpObject.cpp
@@ -1408,17 +1408,17 @@ js::ParseRegExpFlags(JSContext* cx, JSSt
         ok = ::ParseRegExpFlags(linear->latin1Chars(nogc), len, flagsOut, &invalidFlag);
     } else {
         AutoCheckCannotGC nogc;
         ok = ::ParseRegExpFlags(linear->twoByteChars(nogc), len, flagsOut, &invalidFlag);
     }
 
     if (!ok) {
         TwoByteChars range(&invalidFlag, 1);
-        UniqueChars utf8(JS::CharsToNewUTF8CharsZ(cx, range).c_str());
+        UniqueChars utf8(JS::CharsToNewUTF8CharsZ(nullptr, range).c_str());
         if (!utf8)
             return false;
         JS_ReportErrorNumberUTF8(cx, GetErrorMessage, nullptr, JSMSG_BAD_REGEXP_FLAG, utf8.get());
         return false;
     }
 
     return true;
 }