Fix 15.2.3.4 es5conform test

TBR=mnaganov,sgjesse
Review URL: http://codereview.chromium.org/2832029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yurys@chromium.org 2010-06-28 09:25:09 +00:00
parent 8896e45dec
commit 7832dd1b97
2 changed files with 5 additions and 2 deletions

View File

@ -682,7 +682,10 @@ function ObjectGetOwnPropertyNames(obj) {
var j = 0;
for (var i = 0; i < propertyNames.length; ++i) {
var name = ToString(propertyNames[i]);
if (name in propertySet)
// We need to check for the exact property value since for intrinsic
// properties like toString if(propertySet["toString"]) will always
// succeed.
if (propertySet[name] === true)
continue;
propertySet[name] = true;
propertyNames[j++] = name;

View File

@ -5049,7 +5049,7 @@ THREADED_TEST(GetOwnPropertyNamesWithInterceptor) {
obj_template->Set(v8_str("x"), v8::Integer::New(42));
obj_template->SetNamedPropertyHandler(NULL, NULL, NULL, NULL,
NamedPropertyEnumerator);
LocalContext context;
v8::Handle<v8::Object> global = context->Global();
global->Set(v8_str("object"), obj_template->NewInstance());