Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index f8edb2b5a444304a99c35224a6e859442d9c039f..7d544251a4911ab1268fc3014961ca58302ebb7a 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -8727,10 +8727,12 @@ TEST(AccessControlES5) { |
CompileRun("other.accessible_prop = 42"); |
CHECK_EQ(42, g_echo_value); |
- v8::Handle<Value> value; |
- CompileRun("Object.defineProperty(other, 'accessible_prop', {value: -1})"); |
- value = CompileRun("other.accessible_prop == 42"); |
- CHECK(value->IsTrue()); |
+ // [[DefineOwnProperty]] always throws for access-checked objects. |
+ CHECK( |
+ CompileRun("Object.defineProperty(other, 'accessible_prop', {value: 43})") |
+ .IsEmpty()); |
+ CHECK(CompileRun("other.accessible_prop == 42")->IsTrue()); |
+ CHECK_EQ(42, g_echo_value); // Make sure we didn't call the setter. |
} |