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

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

Issue 343563009: Fix stack trace accessor behavior. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix for the prototype chain lookup Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/runtime-gen/collectstacktrace.js » ('j') | 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 2014 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 function testError(error) {
6 // Reconfigure e.stack to be non-configurable
7 var desc1 = Object.getOwnPropertyDescriptor(error, "stack");
8 Object.defineProperty(error, "stack",
9 {get: desc1.get, set: desc1.set, configurable: false});
10
11 var desc2 = Object.getOwnPropertyDescriptor(error, "stack");
12 assertFalse(desc2.configurable);
13 assertEquals(desc1.get, desc2.get);
14 assertEquals(desc2.get, desc2.get);
15 }
16
17 function stackOverflow() {
18 function f() { f(); }
19 try { f() } catch (e) { return e; }
20 }
21
22 function referenceError() {
23 try { g() } catch (e) { return e; }
24 }
25
26 testError(referenceError());
27 testError(stackOverflow());
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/runtime-gen/collectstacktrace.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698