Revision: 21814
Author:   [email protected]
Date:     Thu Jun 12 15:08:33 2014 UTC
Log:      Rewrite GetPropertyAttribute to use the LookupIterator

BUG=
[email protected]

Review URL: https://codereview.chromium.org/321543004
http://code.google.com/p/v8/source/detail?r=21814

Modified:
 /branches/bleeding_edge/src/api.cc
 /branches/bleeding_edge/src/contexts.cc
 /branches/bleeding_edge/src/lookup.cc
 /branches/bleeding_edge/src/lookup.h
 /branches/bleeding_edge/src/objects-inl.h
 /branches/bleeding_edge/src/objects.cc
 /branches/bleeding_edge/src/objects.h
 /branches/bleeding_edge/src/runtime.cc

=======================================
--- /branches/bleeding_edge/src/api.cc  Thu Jun 12 13:25:03 2014 UTC
+++ /branches/bleeding_edge/src/api.cc  Thu Jun 12 15:08:33 2014 UTC
@@ -3128,7 +3128,7 @@

PropertyAttribute v8::Object::GetPropertyAttributes(v8::Handle<Value> key) {
   i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
-  ON_BAILOUT(isolate, "v8::Object::GetPropertyAttribute()",
+  ON_BAILOUT(isolate, "v8::Object::GetPropertyAttributes()",
              return static_cast<PropertyAttribute>(NONE));
   ENTER_V8(isolate);
   i::HandleScope scope(isolate);
@@ -3142,7 +3142,7 @@
   }
   i::Handle<i::Name> key_name = i::Handle<i::Name>::cast(key_obj);
   PropertyAttributes result =
-      i::JSReceiver::GetPropertyAttribute(self, key_name);
+      i::JSReceiver::GetPropertyAttributes(self, key_name);
   if (result == ABSENT) return static_cast<PropertyAttribute>(NONE);
   return static_cast<PropertyAttribute>(result);
 }
=======================================
--- /branches/bleeding_edge/src/contexts.cc     Tue Jun  3 08:12:43 2014 UTC
+++ /branches/bleeding_edge/src/contexts.cc     Thu Jun 12 15:08:33 2014 UTC
@@ -108,9 +108,9 @@
       // to only do a local lookup for context extension objects.
       if ((flags & FOLLOW_PROTOTYPE_CHAIN) == 0 ||
           object->IsJSContextExtensionObject()) {
-        *attributes = JSReceiver::GetOwnPropertyAttribute(object, name);
+        *attributes = JSReceiver::GetOwnPropertyAttributes(object, name);
       } else {
-        *attributes = JSReceiver::GetPropertyAttribute(object, name);
+        *attributes = JSReceiver::GetPropertyAttributes(object, name);
       }
       if (isolate->has_pending_exception()) return Handle<Object>();

=======================================
--- /branches/bleeding_edge/src/lookup.cc       Wed Jun 11 18:02:38 2014 UTC
+++ /branches/bleeding_edge/src/lookup.cc       Thu Jun 12 15:08:33 2014 UTC
@@ -53,11 +53,12 @@
   Handle<JSReceiver> next(JSReceiver::cast(holder_map_->prototype()));

   if (!check_derived() &&
- // TODO(verwaest): Check if this is actually necessary currently. If it
-      // is, this should be handled by setting is_hidden_prototype on the
-      // global object behind the proxy.
-      !holder_map_->IsJSGlobalProxyMap() &&
-      !next->map()->is_hidden_prototype()) {
+      !(check_hidden() &&
+ // TODO(verwaest): Check if this is actually necessary currently. If it + // is, this should be handled by setting is_hidden_prototype on the
+         // global object behind the proxy.
+        (holder_map_->IsJSGlobalProxyMap() ||
+         next->map()->is_hidden_prototype()))) {
     return false;
   }

@@ -189,8 +190,6 @@
   ASSERT_EQ(DATA, property_kind_);
   Handle<Object> value = FetchValue();
   if (value->IsTheHole()) {
-    ASSERT_EQ(DICTIONARY, property_encoding_);
-    ASSERT(GetHolder()->IsGlobalObject());
     ASSERT(property_details_.IsReadOnly());
     return factory()->undefined_value();
   }
=======================================
--- /branches/bleeding_edge/src/lookup.h        Wed Jun 11 18:02:38 2014 UTC
+++ /branches/bleeding_edge/src/lookup.h        Thu Jun 12 15:08:33 2014 UTC
@@ -15,12 +15,15 @@
 class LookupIterator V8_FINAL BASE_EMBEDDED {
  public:
   enum Configuration {
-    CHECK_DERIVED      = 1 << 0,
-    CHECK_INTERCEPTOR  = 1 << 1,
-    CHECK_ACCESS_CHECK = 1 << 2,
     CHECK_OWN_REAL     = 0,
- CHECK_ALL = CHECK_DERIVED | CHECK_INTERCEPTOR | CHECK_ACCESS_CHECK,
-    SKIP_INTERCEPTOR   = CHECK_ALL ^ CHECK_INTERCEPTOR
+    CHECK_HIDDEN       = 1 << 0,
+    CHECK_DERIVED      = 1 << 1,
+    CHECK_INTERCEPTOR  = 1 << 2,
+    CHECK_ACCESS_CHECK = 1 << 3,
+    CHECK_ALL          = CHECK_HIDDEN | CHECK_DERIVED |
+                         CHECK_INTERCEPTOR | CHECK_ACCESS_CHECK,
+    SKIP_INTERCEPTOR   = CHECK_ALL ^ CHECK_INTERCEPTOR,
+    CHECK_OWN          = CHECK_ALL ^ CHECK_DERIVED
   };

   enum State {
@@ -53,9 +56,9 @@
         name_(name),
         maybe_receiver_(receiver),
         number_(DescriptorArray::kNotFound) {
-    Handle<JSReceiver> origin = GetRoot();
-    holder_map_ = handle(origin->map());
-    maybe_holder_ = origin;
+    Handle<JSReceiver> root = GetRoot();
+    holder_map_ = handle(root->map());
+    maybe_holder_ = root;
     Next();
   }

@@ -94,6 +97,16 @@
     return Handle<JSObject>::cast(maybe_holder_.ToHandleChecked());
   }
   Handle<JSReceiver> GetRoot() const;
+
+  /* Dynamically reduce the trapped types. */
+  void skip_interceptor() {
+    configuration_ = static_cast<Configuration>(
+        configuration_ & ~CHECK_INTERCEPTOR);
+  }
+  void skip_access_check() {
+    configuration_ = static_cast<Configuration>(
+        configuration_ & ~CHECK_ACCESS_CHECK);
+  }

   /* ACCESS_CHECK */
   bool HasAccess(v8::AccessType access_type) const;
@@ -142,6 +155,9 @@
   bool check_derived() const {
     return (configuration_ & CHECK_DERIVED) != 0;
   }
+  bool check_hidden() const {
+    return (configuration_ & CHECK_HIDDEN) != 0;
+  }
   bool check_access_check() const {
     return (configuration_ & CHECK_ACCESS_CHECK) != 0;
   }
=======================================
--- /branches/bleeding_edge/src/objects-inl.h   Wed Jun 11 09:59:14 2014 UTC
+++ /branches/bleeding_edge/src/objects-inl.h   Thu Jun 12 15:08:33 2014 UTC
@@ -6418,7 +6418,7 @@
     Handle<JSProxy> proxy = Handle<JSProxy>::cast(object);
     return JSProxy::HasPropertyWithHandler(proxy, name);
   }
-  return GetPropertyAttribute(object, name) != ABSENT;
+  return GetPropertyAttributes(object, name) != ABSENT;
 }


@@ -6427,17 +6427,18 @@
     Handle<JSProxy> proxy = Handle<JSProxy>::cast(object);
     return JSProxy::HasPropertyWithHandler(proxy, name);
   }
-  return GetOwnPropertyAttribute(object, name) != ABSENT;
+  return GetOwnPropertyAttributes(object, name) != ABSENT;
 }


-PropertyAttributes JSReceiver::GetPropertyAttribute(Handle<JSReceiver> object,
-                                                    Handle<Name> key) {
+PropertyAttributes JSReceiver::GetPropertyAttributes(Handle<JSReceiver> object,
+                                                     Handle<Name> key) {
   uint32_t index;
   if (object->IsJSObject() && key->AsArrayIndex(&index)) {
     return GetElementAttribute(object, index);
   }
-  return GetPropertyAttributeWithReceiver(object, object, key);
+  LookupIterator it(object, key);
+  return GetPropertyAttributes(&it);
 }


=======================================
--- /branches/bleeding_edge/src/objects.cc      Thu Jun 12 09:56:54 2014 UTC
+++ /branches/bleeding_edge/src/objects.cc      Thu Jun 12 15:08:33 2014 UTC
@@ -143,10 +143,9 @@
         if (it->isolate()->has_pending_exception()) return maybe_result;
         break;
       }
-      case LookupIterator::ACCESS_CHECK: {
+      case LookupIterator::ACCESS_CHECK:
         if (it->HasAccess(v8::ACCESS_GET)) break;
         return JSObject::GetPropertyWithFailedAccessCheck(it);
-      }
       case LookupIterator::PROPERTY:
         if (it->HasProperty()) {
           switch (it->property_kind()) {
@@ -567,6 +566,8 @@


 static bool FindAllCanReadHolder(LookupIterator* it) {
+  it->skip_interceptor();
+  it->skip_access_check();
   for (; it->IsFound(); it->Next()) {
     if (it->state() == LookupIterator::PROPERTY &&
         it->HasProperty() &&
@@ -596,17 +597,11 @@
 }


-PropertyAttributes JSObject::GetPropertyAttributeWithFailedAccessCheck(
-    Handle<JSObject> object,
-    LookupResult* result,
-    Handle<Name> name,
-    bool check_prototype) {
-  LookupIterator::Configuration configuration = check_prototype
-      ? LookupIterator::CHECK_DERIVED
-      : LookupIterator::CHECK_OWN_REAL;
-  LookupIterator it(object, name, object, configuration);
-  if (FindAllCanReadHolder(&it)) return it.property_details().attributes();
-  it.isolate()->ReportFailedAccessCheck(object, v8::ACCESS_HAS);
+PropertyAttributes JSObject::GetPropertyAttributesWithFailedAccessCheck(
+    LookupIterator* it) {
+  Handle<JSObject> checked = Handle<JSObject>::cast(it->GetHolder());
+  if (FindAllCanReadHolder(it)) return it->property_details().attributes();
+  it->isolate()->ReportFailedAccessCheck(checked, v8::ACCESS_HAS);
   // TODO(yangguo): Issue 3269, check for scheduled exception missing?
   return ABSENT;
 }
@@ -3055,8 +3050,8 @@
         *done = result.IsReadOnly();
         break;
       case INTERCEPTOR: {
-        PropertyAttributes attr = GetPropertyAttributeWithInterceptor(
-            handle(result.holder()), object, name, true);
+        LookupIterator it(object, name, handle(result.holder()));
+        PropertyAttributes attr = GetPropertyAttributes(&it);
         *done = !!(attr & READ_ONLY);
         break;
       }
@@ -3713,9 +3708,9 @@
 }


-PropertyAttributes JSProxy::GetPropertyAttributeWithHandler(
+PropertyAttributes JSProxy::GetPropertyAttributesWithHandler(
     Handle<JSProxy> proxy,
-    Handle<JSReceiver> receiver,
+    Handle<Object> receiver,
     Handle<Name> name) {
   Isolate* isolate = proxy->GetIsolate();
   HandleScope scope(isolate);
@@ -3797,7 +3792,7 @@
     uint32_t index) {
   Isolate* isolate = proxy->GetIsolate();
   Handle<String> name = isolate->factory()->Uint32ToString(index);
-  return GetPropertyAttributeWithHandler(proxy, receiver, name);
+  return GetPropertyAttributesWithHandler(proxy, receiver, name);
 }


@@ -4339,140 +4334,85 @@
 }


-PropertyAttributes JSObject::GetPropertyAttributePostInterceptor(
-    Handle<JSObject> object,
-    Handle<JSObject> receiver,
-    Handle<Name> name,
-    bool check_prototype) {
-  // Check own property, ignore interceptor.
-  Isolate* isolate = object->GetIsolate();
-  LookupResult result(isolate);
-  object->LookupOwnRealNamedProperty(name, &result);
-  if (result.IsFound()) return result.GetAttributes();
-
-  if (check_prototype) {
-    // Continue searching via the prototype chain.
-    Handle<Object> proto(object->GetPrototype(), isolate);
-    if (!proto->IsNull()) {
-      return JSReceiver::GetPropertyAttributeWithReceiver(
-          Handle<JSObject>::cast(proto), receiver, name);
-    }
-  }
-  return ABSENT;
-}
-
-
-PropertyAttributes JSObject::GetPropertyAttributeWithInterceptor(
-    Handle<JSObject> object,
-    Handle<JSObject> receiver,
-    Handle<Name> name,
-    bool check_prototype) {
+Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithInterceptor(
+    Handle<JSObject> holder,
+    Handle<Object> receiver,
+    Handle<Name> name) {
   // TODO(rossberg): Support symbols in the API.
-  if (name->IsSymbol()) return ABSENT;
+  if (name->IsSymbol()) return Maybe<PropertyAttributes>(ABSENT);

-  Isolate* isolate = object->GetIsolate();
+  Isolate* isolate = holder->GetIsolate();
   HandleScope scope(isolate);

   // Make sure that the top context does not change when doing
   // callbacks or interceptor calls.
   AssertNoContextChange ncc(isolate);

-  Handle<InterceptorInfo> interceptor(object->GetNamedInterceptor());
+  Handle<InterceptorInfo> interceptor(holder->GetNamedInterceptor());
   PropertyCallbackArguments args(
-      isolate, interceptor->data(), *receiver, *object);
+      isolate, interceptor->data(), *receiver, *holder);
   if (!interceptor->query()->IsUndefined()) {
     v8::NamedPropertyQueryCallback query =
         v8::ToCData<v8::NamedPropertyQueryCallback>(interceptor->query());
     LOG(isolate,
-        ApiNamedPropertyAccess("interceptor-named-has", *object, *name));
+        ApiNamedPropertyAccess("interceptor-named-has", *holder, *name));
     v8::Handle<v8::Integer> result =
         args.Call(query, v8::Utils::ToLocal(Handle<String>::cast(name)));
     if (!result.IsEmpty()) {
       ASSERT(result->IsInt32());
-      return static_cast<PropertyAttributes>(result->Int32Value());
+      return Maybe<PropertyAttributes>(
+          static_cast<PropertyAttributes>(result->Int32Value()));
     }
   } else if (!interceptor->getter()->IsUndefined()) {
     v8::NamedPropertyGetterCallback getter =
v8::ToCData<v8::NamedPropertyGetterCallback>(interceptor->getter());
     LOG(isolate,
- ApiNamedPropertyAccess("interceptor-named-get-has", *object, *name)); + ApiNamedPropertyAccess("interceptor-named-get-has", *holder, *name));
     v8::Handle<v8::Value> result =
         args.Call(getter, v8::Utils::ToLocal(Handle<String>::cast(name)));
-    if (!result.IsEmpty()) return DONT_ENUM;
+    if (!result.IsEmpty()) return Maybe<PropertyAttributes>(DONT_ENUM);
   }
-  return GetPropertyAttributePostInterceptor(
-      object, receiver, name, check_prototype);
+  return Maybe<PropertyAttributes>();
 }


-PropertyAttributes JSReceiver::GetPropertyAttributeWithReceiver(
-    Handle<JSReceiver> object,
-    Handle<JSReceiver> receiver,
-    Handle<Name> key) {
+PropertyAttributes JSReceiver::GetOwnPropertyAttributes(
+    Handle<JSReceiver> object, Handle<Name> name) {
+  // Check whether the name is an array index.
   uint32_t index = 0;
-  if (object->IsJSObject() && key->AsArrayIndex(&index)) {
-    return JSObject::GetElementAttributeWithReceiver(
-        Handle<JSObject>::cast(object), receiver, index, true);
+  if (object->IsJSObject() && name->AsArrayIndex(&index)) {
+    return GetOwnElementAttribute(object, index);
   }
-  // Named property.
-  LookupResult lookup(object->GetIsolate());
-  object->Lookup(key, &lookup);
- return GetPropertyAttributeForResult(object, receiver, &lookup, key, true);
+  LookupIterator it(object, name, LookupIterator::CHECK_OWN);
+  return GetPropertyAttributes(&it);
 }


-PropertyAttributes JSReceiver::GetPropertyAttributeForResult(
-    Handle<JSReceiver> object,
-    Handle<JSReceiver> receiver,
-    LookupResult* lookup,
-    Handle<Name> name,
-    bool check_prototype) {
-  // Check access rights if needed.
-  if (object->IsAccessCheckNeeded()) {
-    Heap* heap = object->GetHeap();
-    Handle<JSObject> obj = Handle<JSObject>::cast(object);
-    if (!heap->isolate()->MayNamedAccess(obj, name, v8::ACCESS_HAS)) {
-      return JSObject::GetPropertyAttributeWithFailedAccessCheck(
-          obj, lookup, name, check_prototype);
-    }
-  }
-  if (lookup->IsFound()) {
-    switch (lookup->type()) {
-      case NORMAL:  // fall through
-      case FIELD:
-      case CONSTANT:
-      case CALLBACKS:
-        return lookup->GetAttributes();
-      case HANDLER: {
-        return JSProxy::GetPropertyAttributeWithHandler(
-            handle(lookup->proxy()), receiver, name);
+PropertyAttributes JSReceiver::GetPropertyAttributes(LookupIterator* it) {
+  for (; it->IsFound(); it->Next()) {
+    switch (it->state()) {
+      case LookupIterator::NOT_FOUND:
+        UNREACHABLE();
+      case LookupIterator::JSPROXY:
+        return JSProxy::GetPropertyAttributesWithHandler(
+            it->GetJSProxy(), it->GetReceiver(), it->name());
+      case LookupIterator::INTERCEPTOR: {
+        Maybe<PropertyAttributes> result =
+            JSObject::GetPropertyAttributesWithInterceptor(
+                it->GetHolder(), it->GetReceiver(), it->name());
+        if (result.has_value) return result.value;
+        break;
       }
-      case INTERCEPTOR:
-        return JSObject::GetPropertyAttributeWithInterceptor(
-            handle(lookup->holder()),
-            Handle<JSObject>::cast(receiver),
-            name,
-            check_prototype);
-      case NONEXISTENT:
-        UNREACHABLE();
+      case LookupIterator::ACCESS_CHECK:
+        if (it->HasAccess(v8::ACCESS_HAS)) break;
+        return JSObject::GetPropertyAttributesWithFailedAccessCheck(it);
+      case LookupIterator::PROPERTY:
+        if (it->HasProperty()) return it->property_details().attributes();
+        break;
     }
   }
   return ABSENT;
 }
-
-
-PropertyAttributes JSReceiver::GetOwnPropertyAttribute(
-    Handle<JSReceiver> object, Handle<Name> name) {
-  // Check whether the name is an array index.
-  uint32_t index = 0;
-  if (object->IsJSObject() && name->AsArrayIndex(&index)) {
-    return GetOwnElementAttribute(object, index);
-  }
-  // Named property.
-  LookupResult lookup(object->GetIsolate());
-  object->LookupOwn(name, &lookup, true);
- return GetPropertyAttributeForResult(object, object, &lookup, name, false);
-}


 PropertyAttributes JSObject::GetElementAttributeWithReceiver(
@@ -5148,8 +5088,8 @@

 bool JSObject::HasHiddenProperties(Handle<JSObject> object) {
   Handle<Name> hidden = object->GetIsolate()->factory()->hidden_string();
-  return GetPropertyAttributePostInterceptor(
-      object, object, hidden, false) != ABSENT;
+  LookupIterator it(object, hidden, LookupIterator::CHECK_OWN_REAL);
+  return GetPropertyAttributes(&it) != ABSENT;
 }


@@ -5964,7 +5904,7 @@
         ASSERT(names->get(i)->IsString());
         Handle<String> key_string(String::cast(names->get(i)));
         PropertyAttributes attributes =
-            JSReceiver::GetOwnPropertyAttribute(copy, key_string);
+            JSReceiver::GetOwnPropertyAttributes(copy, key_string);
         // Only deep copy fields from the object literal expression.
         // In particular, don't try to copy the length attribute of
         // an array.
=======================================
--- /branches/bleeding_edge/src/objects.h       Thu Jun 12 09:58:10 2014 UTC
+++ /branches/bleeding_edge/src/objects.h       Thu Jun 12 15:08:33 2014 UTC
@@ -1954,16 +1954,13 @@
   // function that was used to instantiate the object).
   String* constructor_name();

-  static inline PropertyAttributes GetPropertyAttribute(
+  static inline PropertyAttributes GetPropertyAttributes(
       Handle<JSReceiver> object,
       Handle<Name> name);
-  static PropertyAttributes GetPropertyAttributeWithReceiver(
+  static PropertyAttributes GetPropertyAttributes(LookupIterator* it);
+  static PropertyAttributes GetOwnPropertyAttributes(
       Handle<JSReceiver> object,
-      Handle<JSReceiver> receiver,
       Handle<Name> name);
-  static PropertyAttributes GetOwnPropertyAttribute(
-      Handle<JSReceiver> object,
-      Handle<Name> name);

   static inline PropertyAttributes GetElementAttribute(
       Handle<JSReceiver> object,
@@ -2002,13 +1999,6 @@
       KeyCollectionType type);

  private:
-  static PropertyAttributes GetPropertyAttributeForResult(
-      Handle<JSReceiver> object,
-      Handle<JSReceiver> receiver,
-      LookupResult* result,
-      Handle<Name> name,
-      bool continue_search);
-
   MUST_USE_RESULT static MaybeHandle<Object> SetProperty(
       Handle<JSReceiver> receiver,
       LookupResult* result,
@@ -2209,21 +2199,12 @@
   InterceptorInfo* GetIndexedInterceptor();

   // Used from JSReceiver.
-  static PropertyAttributes GetPropertyAttributePostInterceptor(
-      Handle<JSObject> object,
-      Handle<JSObject> receiver,
-      Handle<Name> name,
-      bool check_prototype);
-  static PropertyAttributes GetPropertyAttributeWithInterceptor(
-      Handle<JSObject> object,
-      Handle<JSObject> receiver,
-      Handle<Name> name,
-      bool check_prototype);
-  static PropertyAttributes GetPropertyAttributeWithFailedAccessCheck(
-      Handle<JSObject> object,
-      LookupResult* result,
-      Handle<Name> name,
-      bool check_prototype);
+  static Maybe<PropertyAttributes> GetPropertyAttributesWithInterceptor(
+      Handle<JSObject> holder,
+      Handle<Object> receiver,
+      Handle<Name> name);
+  static PropertyAttributes GetPropertyAttributesWithFailedAccessCheck(
+      LookupIterator* it);
   static PropertyAttributes GetElementAttributeWithReceiver(
       Handle<JSObject> object,
       Handle<JSReceiver> receiver,
@@ -9998,9 +9979,9 @@
       StrictMode strict_mode,
       bool* done);

-  static PropertyAttributes GetPropertyAttributeWithHandler(
+  static PropertyAttributes GetPropertyAttributesWithHandler(
       Handle<JSProxy> proxy,
-      Handle<JSReceiver> receiver,
+      Handle<Object> receiver,
       Handle<Name> name);
   static PropertyAttributes GetElementAttributeWithHandler(
       Handle<JSProxy> proxy,
=======================================
--- /branches/bleeding_edge/src/runtime.cc      Thu Jun 12 09:58:10 2014 UTC
+++ /branches/bleeding_edge/src/runtime.cc      Thu Jun 12 15:08:33 2014 UTC
@@ -2022,7 +2022,7 @@
     case ACCESS_ABSENT: return factory->undefined_value();
   }

- PropertyAttributes attrs = JSReceiver::GetOwnPropertyAttribute(obj, name); + PropertyAttributes attrs = JSReceiver::GetOwnPropertyAttributes(obj, name);
   if (attrs == ABSENT) {
     RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object);
     return factory->undefined_value();
@@ -2279,7 +2279,7 @@
         // We found an existing property. Unless it was an interceptor
         // that claims the property is absent, skip this declaration.
         if (!lookup.IsInterceptor()) continue;
- if (JSReceiver::GetPropertyAttribute(global, name) != ABSENT) continue; + if (JSReceiver::GetPropertyAttributes(global, name) != ABSENT) continue;
         // Fall-through and introduce the absent property by using
         // SetProperty.
       }
@@ -2470,7 +2470,7 @@
   if (lookup.IsInterceptor()) {
     Handle<JSObject> holder(lookup.holder());
     PropertyAttributes intercepted =
-        JSReceiver::GetPropertyAttribute(holder, name);
+        JSReceiver::GetPropertyAttributes(holder, name);
     if (intercepted != ABSENT && (intercepted & READ_ONLY) == 0) {
       // Found an interceptor that's not read only.
       if (assign) {
@@ -5767,7 +5767,7 @@
   CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
   CONVERT_ARG_HANDLE_CHECKED(Name, key, 1);

- PropertyAttributes att = JSReceiver::GetOwnPropertyAttribute(object, key); + PropertyAttributes att = JSReceiver::GetOwnPropertyAttributes(object, key);
   if (att == ABSENT || (att & DONT_ENUM) != 0) {
     RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate);
     return isolate->heap()->false_value();
@@ -9454,7 +9454,7 @@

   // Set the property if it's not read only or doesn't yet exist.
   if ((attributes & READ_ONLY) == 0 ||
-      (JSReceiver::GetOwnPropertyAttribute(object, name) == ABSENT)) {
+      (JSReceiver::GetOwnPropertyAttributes(object, name) == ABSENT)) {
     RETURN_FAILURE_ON_EXCEPTION(
         isolate,
         JSReceiver::SetProperty(object, name, value, NONE, strict_mode));

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to