Revision: 23235
Author:   [email protected]
Date:     Wed Aug 20 13:52:49 2014 UTC
Log:      Return empty handle if GetPropertyByLookup has no result.

BUG=
[email protected]

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

Modified:
 /branches/bleeding_edge/src/api.cc

=======================================
--- /branches/bleeding_edge/src/api.cc  Wed Aug 20 11:04:05 2014 UTC
+++ /branches/bleeding_edge/src/api.cc  Wed Aug 20 13:52:49 2014 UTC
@@ -3571,7 +3571,8 @@
   has_pending_exception = !i::Object::GetProperty(it).ToHandle(&result);
   EXCEPTION_BAILOUT_CHECK(it->isolate(), Local<Value>());

-  return Utils::ToLocal(result);
+  if (it->IsFound()) return Utils::ToLocal(result);
+  return Local<Value>();
 }


@@ -3599,8 +3600,7 @@
   ENTER_V8(isolate);
   i::Handle<i::JSObject> self_obj = Utils::OpenHandle(this);
   i::Handle<i::String> key_obj = Utils::OpenHandle(*key);
-  i::LookupIterator it(self_obj, key_obj,
-                       i::LookupIterator::CHECK_DERIVED_PROPERTY);
+ i::LookupIterator it(self_obj, key_obj, i::LookupIterator::CHECK_PROPERTY);
   return GetPropertyByLookup(&it);
 }

--
--
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