| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index df70d5c5f8865025004c1f07f08f94298516068c..9c344233584d6f38dae574a61946211c8978ea67 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -2004,6 +2004,27 @@ THREADED_TEST(EmptyInterceptorDoesNotShadowAccessors) {
|
| }
|
|
|
|
|
| +THREADED_TEST(ExecutableAccessorIsPreservedOnAttributeChange) {
|
| + v8::Isolate* isolate = CcTest::isolate();
|
| + v8::HandleScope scope(isolate);
|
| + LocalContext env;
|
| + v8::Local<v8::Value> res = CompileRun("var a = []; a;");
|
| + i::Handle<i::JSObject> a(v8::Utils::OpenHandle(v8::Object::Cast(*res)));
|
| + CHECK(a->map()->instance_descriptors()->IsFixedArray());
|
| + CHECK_GT(i::FixedArray::cast(a->map()->instance_descriptors())->length(), 0);
|
| + CompileRun("Object.defineProperty(a, 'length', { writable: false });");
|
| + CHECK_EQ(i::FixedArray::cast(a->map()->instance_descriptors())->length(), 0);
|
| + // But we should still have an ExecutableAccessorInfo.
|
| + i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
|
| + i::LookupResult lookup(i_isolate);
|
| + i::Handle<i::String> name(v8::Utils::OpenHandle(*v8_str("length")));
|
| + a->LocalLookupRealNamedProperty(name, &lookup);
|
| + CHECK(lookup.IsPropertyCallbacks());
|
| + i::Handle<i::Object> callback(lookup.GetCallbackObject(), i_isolate);
|
| + CHECK(callback->IsExecutableAccessorInfo());
|
| +}
|
| +
|
| +
|
| THREADED_TEST(EmptyInterceptorBreakTransitions) {
|
| v8::HandleScope scope(CcTest::isolate());
|
| Handle<FunctionTemplate> templ = FunctionTemplate::New(CcTest::isolate());
|
|
|