| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index d5e838ebe09618a6dbc3dcdd567d5d0136482cc2..d6fce3e54e04f5554c30853e666449e783ddc0dd 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -1938,6 +1938,21 @@ void AddInterceptor(Handle<FunctionTemplate> templ,
|
| }
|
|
|
|
|
| +THREADED_TEST(EmptyInterceptorBreakTransitions) {
|
| + v8::HandleScope scope(CcTest::isolate());
|
| + Handle<FunctionTemplate> templ = FunctionTemplate::New();
|
| + AddInterceptor(templ, EmptyInterceptorGetter, EmptyInterceptorSetter);
|
| + LocalContext env;
|
| + env->Global()->Set(v8_str("Constructor"), templ->GetFunction());
|
| + CompileRun("var o1 = new Constructor;"
|
| + "o1.a = 1;" // Ensure a and x share the descriptor array.
|
| + "Object.defineProperty(o1, 'x', {value: 10});");
|
| + CompileRun("var o2 = new Constructor;"
|
| + "o2.a = 1;"
|
| + "Object.defineProperty(o2, 'x', {value: 10});");
|
| +}
|
| +
|
| +
|
| THREADED_TEST(EmptyInterceptorDoesNotShadowAccessors) {
|
| v8::HandleScope scope(CcTest::isolate());
|
| Handle<FunctionTemplate> parent = FunctionTemplate::New();
|
|
|