| 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
|
|
|