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

Side by Side Diff: test/mjsunit/regress/regress-633998.js

Issue 2206313002: Handle stack overflows in NoSideEffectToString (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Disallow recursion in NoSideEffectToString Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 var err_str_1 = "apply was called on , which is a object and not a function";
6 var err_str_2 =
7 "apply was called on Error, which is a object and not a function";
8
9 var reached = false;
10 var error = new Error();
11 error.name = error;
12 try {
13 Reflect.apply(error);
14 reached = true;
15 } catch (e) {
16 assertTrue(e.stack.indexOf(err_str_1) != -1);
17 } finally {
18 assertFalse(reached);
19 }
20
21 reached = false;
22 error = new Error();
23 error.msg = error;
24 try {
25 Reflect.apply(error);
26 reached = true;
27 } catch (e) {
28 assertTrue(e.stack.indexOf(err_str_2) != -1);
29 } finally {
30 assertFalse(reached);
31 }
32
33 reached = false;
34 error = new Error();
35 error.name = error;
36 error.msg = error;
37 try {
38 Reflect.apply(error);
39 reached = true;
40 } catch (e) {
41 assertTrue(e.stack.indexOf(err_str_1) != -1);
42 } finally {
43 assertFalse(reached);
44 }
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698