summaryrefslogtreecommitdiff
path: root/deps/v8/test
diff options
context:
space:
mode:
authorMyles Borins <mylesborins@google.com>2018-02-09 18:30:22 -0500
committerMyles Borins <mylesborins@google.com>2018-02-13 01:22:19 -0500
commitb6000d828525f991341bd69fc4550e1316d4c81c (patch)
treefe4b8c4cbe0f9907539d7230d460200d03fb6752 /deps/v8/test
parent6abce37f3469878d18ce3700b4aad2fcf5836eea (diff)
downloadnode-new-b6000d828525f991341bd69fc4550e1316d4c81c.tar.gz
deps: patch V8 to 6.4.388.44
PR-URL: https://github.com/nodejs/node/pull/18687 Refs: https://github.com/v8/v8/compare/6.4.388.42...6.4.388.44 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'deps/v8/test')
-rw-r--r--deps/v8/test/cctest/test-heap-profiler.cc11
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-806388.js20
2 files changed, 31 insertions, 0 deletions
diff --git a/deps/v8/test/cctest/test-heap-profiler.cc b/deps/v8/test/cctest/test-heap-profiler.cc
index a0796ccd56..5a94708ba8 100644
--- a/deps/v8/test/cctest/test-heap-profiler.cc
+++ b/deps/v8/test/cctest/test-heap-profiler.cc
@@ -3184,3 +3184,14 @@ TEST(SamplingHeapProfilerSampleDuringDeopt) {
CHECK(profile);
heap_profiler->StopSamplingHeapProfiler();
}
+
+TEST(HeapSnapshotPrototypeNotJSReceiver) {
+ LocalContext env;
+ v8::HandleScope scope(env->GetIsolate());
+ v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
+ CompileRun(
+ "function object() {}"
+ "object.prototype = 42;");
+ const v8::HeapSnapshot* snapshot = heap_profiler->TakeHeapSnapshot();
+ CHECK(ValidateSnapshot(snapshot));
+}
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-806388.js b/deps/v8/test/mjsunit/regress/regress-crbug-806388.js
new file mode 100644
index 0000000000..b55b50107e
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-806388.js
@@ -0,0 +1,20 @@
+// Copyright 2018 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 --enable-slow-asserts --expose-gc
+
+class Derived extends Array {
+ constructor(a) {
+ // Syntax Error.
+ const a = 1;
+ }
+}
+
+// Derived is not a subclass of RegExp
+let o = Reflect.construct(RegExp, [], Derived);
+o.lastIndex = 0x1234;
+%HeapObjectVerify(o);
+
+gc();
+%HeapObjectVerify(o);