| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index 66ffc9a8b3679afe7be2ae8ac4167aeb2e489f89..7f1b3733d031d390a90e31317abadcede09cd8de 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -21627,3 +21627,27 @@ TEST(EscapeableHandleScope) {
|
| }
|
| }
|
| }
|
| +
|
| +
|
| +static void SetterWhichExpectsThisAndHolderToDiffer(
|
| + Local<String>, Local<Value>, const v8::PropertyCallbackInfo<void>& info) {
|
| + CHECK(info.Holder() != info.This());
|
| +}
|
| +
|
| +
|
| +TEST(Regress239669) {
|
| + LocalContext context;
|
| + v8::Isolate* isolate = context->GetIsolate();
|
| + v8::HandleScope scope(isolate);
|
| + Local<ObjectTemplate> templ = ObjectTemplate::New(isolate);
|
| + templ->SetAccessor(v8_str("x"), 0, SetterWhichExpectsThisAndHolderToDiffer);
|
| + context->Global()->Set(v8_str("P"), templ->NewInstance());
|
| + CompileRun(
|
| + "function C1() {"
|
| + " this.x = 23;"
|
| + "};"
|
| + "C1.prototype = P;"
|
| + "for (var i = 0; i < 4; i++ ) {"
|
| + " new C1();"
|
| + "}");
|
| +}
|
|
|