Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index e06062b2ed4c46d4a6f8e23b64a09be49f6eccd2..9b9f469f60a7a4d434eed5ca7c5003487f0a4fad 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -5373,37 +5373,45 @@ THREADED_TEST(AccessControl) { |
v8::Handle<Value> value; |
// Access blocked property |
- value = v8_compile("other.blocked_prop = 1")->Run(); |
- value = v8_compile("other.blocked_prop")->Run(); |
+ value = CompileRun("other.blocked_prop = 1"); |
+ value = CompileRun("other.blocked_prop"); |
CHECK(value->IsUndefined()); |
- value = v8_compile("propertyIsEnumerable.call(other, 'blocked_prop')")->Run(); |
+ value = CompileRun( |
+ "Object.getOwnPropertyDescriptor(other, 'blocked_prop').value"); |
+ CHECK(value->IsUndefined()); |
+ |
+ value = CompileRun("propertyIsEnumerable.call(other, 'blocked_prop')"); |
CHECK(value->IsFalse()); |
// Access accessible property |
- value = v8_compile("other.accessible_prop = 3")->Run(); |
+ value = CompileRun("other.accessible_prop = 3"); |
CHECK(value->IsNumber()); |
CHECK_EQ(3, value->Int32Value()); |
CHECK_EQ(3, g_echo_value); |
- value = v8_compile("other.accessible_prop")->Run(); |
+ value = CompileRun("other.accessible_prop"); |
CHECK(value->IsNumber()); |
CHECK_EQ(3, value->Int32Value()); |
- value = |
- v8_compile("propertyIsEnumerable.call(other, 'accessible_prop')")->Run(); |
+ value = CompileRun( |
+ "Object.getOwnPropertyDescriptor(other, 'accessible_prop').value"); |
+ CHECK(value->IsNumber()); |
+ CHECK_EQ(3, value->Int32Value()); |
+ |
+ value = CompileRun("propertyIsEnumerable.call(other, 'accessible_prop')"); |
CHECK(value->IsTrue()); |
// Enumeration doesn't enumerate accessors from inaccessible objects in |
// the prototype chain even if the accessors are in themselves accessible. |
- Local<Value> result = |
+ value = |
CompileRun("(function(){var obj = {'__proto__':other};" |
"for (var p in obj)" |
" if (p == 'accessible_prop' || p == 'blocked_prop') {" |
" return false;" |
" }" |
"return true;})()"); |
- CHECK(result->IsTrue()); |
+ CHECK(value->IsTrue()); |
context1->Exit(); |
context0->Exit(); |