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

Unified Diff: test/cctest/test-api.cc

Issue 787763005: Ensure class prototype objects have the right Map::constructor field (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « src/runtime/runtime-classes.cc ('k') | test/mjsunit/harmony/regress/regress-3750.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 0e2f97c8137407175c0c3aa845ccf22ed46312ad..14fb42a26ea8da7b033f8bbace22fef01c5e2595 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -24630,3 +24630,15 @@ TEST(GetPrototypeHidden) {
"f()");
CHECK(result->Equals(proto2));
}
+
+
+TEST(ClassPrototypeCreationContext) {
+ i::FLAG_harmony_classes = true;
+ v8::Isolate* isolate = CcTest::isolate();
+ v8::HandleScope handle_scope(isolate);
+ LocalContext env;
+
+ Handle<Object> result = Handle<Object>::Cast(
+ CompileRun("'use strict'; class Example { }; Example.prototype"));
+ CHECK(env.local() == result->CreationContext());
+}
« no previous file with comments | « src/runtime/runtime-classes.cc ('k') | test/mjsunit/harmony/regress/regress-3750.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698