summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/regress/regress-3985.js
diff options
context:
space:
mode:
authorChris Dickinson <christopher.s.dickinson@gmail.com>2015-05-05 13:48:55 -0700
committerRod Vagg <rod@vagg.org>2015-08-04 11:56:09 -0700
commitd58e780504bdba6c5897c48428fd984c5b5f96fe (patch)
tree033f1568ae3f9f077aceb843b42eb1ed1739ce0f /deps/v8/test/mjsunit/regress/regress-3985.js
parent21d31c08e7d0b6865e52452750b20b05e6dca443 (diff)
downloadnode-new-d58e780504bdba6c5897c48428fd984c5b5f96fe.tar.gz
deps: update v8 to 4.3.61.21
* @indutny's SealHandleScope patch (484bebc38319fc7c622478037922ad73b2edcbf9) has been cherry picked onto the top of V8 to make it compile. * There's some test breakage in contextify. * This was merged at the request of the TC. PR-URL: https://github.com/iojs/io.js/pull/1632
Diffstat (limited to 'deps/v8/test/mjsunit/regress/regress-3985.js')
-rw-r--r--deps/v8/test/mjsunit/regress/regress-3985.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/regress/regress-3985.js b/deps/v8/test/mjsunit/regress/regress-3985.js
new file mode 100644
index 0000000000..6dbc4bdadd
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-3985.js
@@ -0,0 +1,45 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var shouldThrow = false;
+
+function h() {
+ try { // Prevent inlining in Crankshaft.
+ } catch(e) { }
+ var res = g.arguments[0].x;
+ if (shouldThrow) {
+ throw res;
+ }
+ return res;
+}
+
+function g(o) { h(); }
+
+function f1() {
+ var o = { x : 1 };
+ g(o);
+ return o.x;
+}
+
+function f2() {
+ var o = { x : 2 };
+ g(o);
+ return o.x;
+}
+
+f1();
+f2();
+f1();
+f2();
+%OptimizeFunctionOnNextCall(f1);
+%OptimizeFunctionOnNextCall(f2);
+shouldThrow = true;
+try { f1(); } catch(e) {
+ assertEquals(e, 1);
+}
+try { f2(); } catch(e) {
+ assertEquals(e, 2);
+}