Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 2cdc653aea494185d19eb49397a53395b7df16c3..8a1e9147369fbde7d20e996c91e45089c0545e67 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -16212,6 +16212,30 @@ THREADED_TEST(Regress93759) { |
} |
+THREADED_TEST(Regress125988) { |
+ v8::HandleScope scope; |
+ Handle<FunctionTemplate> intercept = FunctionTemplate::New(); |
+ AddInterceptor(intercept, EmptyInterceptorGetter, EmptyInterceptorSetter); |
+ LocalContext env; |
+ env->Global()->Set(v8_str("Intercept"), intercept->GetFunction()); |
+ CompileRun("var a = new Object();" |
+ "var b = new Intercept();" |
+ "var c = new Object();" |
+ "c.__proto__ = b;" |
+ "b.__proto__ = a;" |
+ "a.x = 23;" |
+ "for (var i = 0; i < 3; i++) c.x;"); |
+ ExpectBoolean("c.hasOwnProperty('x')", false); |
+ ExpectInt32("c.x", 23); |
+ CompileRun("a.y = 42;" |
+ "for (var i = 0; i < 3; i++) c.x;"); |
+ ExpectBoolean("c.hasOwnProperty('x')", false); |
+ ExpectInt32("c.x", 23); |
+ ExpectBoolean("c.hasOwnProperty('y')", false); |
+ ExpectInt32("c.y", 42); |
+} |
+ |
+ |
static void TestReceiver(Local<Value> expected_result, |
Local<Value> expected_receiver, |
const char* code) { |