Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: test/intl/general/empty-handle.js

Issue 148883002: Synchronize with r15594. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/intl/date-format/wellformed-unsupported-locale.js ('k') | test/intl/general/mapped-locale.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/intl/general/empty-handle.js
diff --git a/test/mjsunit/regress/regress-crbug-242924.js b/test/intl/general/empty-handle.js
similarity index 74%
copy from test/mjsunit/regress/regress-crbug-242924.js
copy to test/intl/general/empty-handle.js
index 68ad7c6fd4e3e11b8f6d93e8b8afef01f4b143cd..d61896381cb5e25037d53a2d08d0eb1ac1ac58e9 100644
--- a/test/mjsunit/regress/regress-crbug-242924.js
+++ b/test/intl/general/empty-handle.js
@@ -25,24 +25,24 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --expose-gc --gc-global
+// Minimal test case for b/161999.
+// We have to check if ObjectTemplate::NewInstance returned empty handle, which
+// can happen if there was a stack overflow.
+// This test can take some time to fail.
-function f() {
- return [,{}];
+var didThrowRangeError = false;
+try {
+ var X = '})()';
+ function C() { X[C("asd".localeCompare("asdf") < 0)] = C("a"); }
+ var b = C(C(new Date(Number.b, "").getTime()),
+ function() {
+ if (!X.C()) {
+ }
+ }[0].b++);
+} catch (e) {
+ if (e instanceof RangeError) {
+ didThrowRangeError = true;
+ }
}
-assertEquals([,{}], f());
-assertEquals([,{}], f());
-%OptimizeFunctionOnNextCall(f);
-assertEquals([,{}], f());
-gc();
-
-function g() {
- return [[,1.5],{}];
-}
-
-assertEquals([[,1.5],{}], g());
-assertEquals([[,1.5],{}], g());
-%OptimizeFunctionOnNextCall(g);
-assertEquals([[,1.5],{}], g());
-gc();
+assertTrue(didThrowRangeError);
« no previous file with comments | « test/intl/date-format/wellformed-unsupported-locale.js ('k') | test/intl/general/mapped-locale.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698