Commit bf3efa1c authored by olehougaard's avatar olehougaard

Fixing propertyIsEnumerable for properties that are *both* enumerable and read-only.

Review URL: http://codereview.chromium.org/8962

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2da0c255
...@@ -1934,7 +1934,7 @@ static Object* Runtime_IsPropertyEnumerable(Arguments args) { ...@@ -1934,7 +1934,7 @@ static Object* Runtime_IsPropertyEnumerable(Arguments args) {
} }
PropertyAttributes att = object->GetLocalPropertyAttribute(key); PropertyAttributes att = object->GetLocalPropertyAttribute(key);
return Heap::ToBoolean(att != ABSENT && att != DONT_ENUM); return Heap::ToBoolean(att != ABSENT && (att & DONT_ENUM) == 0);
} }
......
...@@ -1027,6 +1027,15 @@ THREADED_TEST(PrePropertyHandler) { ...@@ -1027,6 +1027,15 @@ THREADED_TEST(PrePropertyHandler) {
} }
THREADED_TEST(UndefinedIsNotEnumerable) {
v8::HandleScope scope;
LocalContext env;
v8::Handle<Value> result = Script::Compile(v8_str(
"this.propertyIsEnumerable(undefined)"))->Run();
CHECK(result->IsFalse());
}
v8::Handle<Script> call_recursively_script; v8::Handle<Script> call_recursively_script;
static const int kTargetRecursionDepth = 300; // near maximum static const int kTargetRecursionDepth = 300; // near maximum
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment