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

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

Issue 1582773003: Make JSProxies always be in slow mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-dictionary.cc
diff --git a/test/cctest/test-dictionary.cc b/test/cctest/test-dictionary.cc
index e1745c424c9c82ec18e4571d2ef8c2a10059268c..0d4edf5dd4756c53c66768f145d32e8f5807c1d7 100644
--- a/test/cctest/test-dictionary.cc
+++ b/test/cctest/test-dictionary.cc
@@ -228,4 +228,18 @@ TEST(ObjectHashTableCausesGC) {
}
#endif
+TEST(SetRequiresCopyOnCapacityChange) {
+ LocalContext context;
+ v8::HandleScope scope(context->GetIsolate());
+ Isolate* isolate = CcTest::i_isolate();
+ Handle<NameDictionary> dict = NameDictionary::New(isolate, 0, TENURED);
+ dict->SetRequiresCopyOnCapacityChange();
+ Handle<Name> key = isolate->factory()->InternalizeString(
+ v8::Utils::OpenHandle(*v8_str("key")));
+ Handle<Object> value = handle(Smi::FromInt(0), isolate);
+ Handle<NameDictionary> new_dict =
+ NameDictionary::Add(dict, key, value, PropertyDetails::Empty());
+ CHECK_NE(*dict, *new_dict);
+}
+
} // namespace
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698