BindingFlags binding_flags;
Handle<Object> holder =
context->Lookup(name, flags, &index, &attributes, &binding_flags);
+ if (holder.is_null()) {
+ // In case of JSProxy, an exception might have been thrown.
+ if (isolate->has_pending_exception()) return isolate->heap()->exception();
+ }
Handle<JSObject> object;
Handle<Object> value =
BindingFlags binding_flags;
Handle<Object> holder =
context->Lookup(name, flags, &index, &attributes, &binding_flags);
+ if (holder.is_null()) {
+ // In case of JSProxy, an exception might have been thrown.
+ if (isolate->has_pending_exception()) return isolate->heap()->exception();
+ }
if (index >= 0) {
DCHECK(holder->IsContext());
// If the slot was not found the result is true.
if (holder.is_null()) {
+ // In case of JSProxy, an exception might have been thrown.
+ if (isolate->has_pending_exception()) return isolate->heap()->exception();
return isolate->heap()->true_value();
}
BindingFlags binding_flags;
Handle<Object> holder =
context->Lookup(name, flags, &index, &attributes, &binding_flags);
- // In case of JSProxy, an exception might have been thrown.
- if (isolate->has_pending_exception()) return isolate->heap()->exception();
+ if (holder.is_null()) {
+ // In case of JSProxy, an exception might have been thrown.
+ if (isolate->has_pending_exception()) return isolate->heap()->exception();
+ }
// The property was found in a context slot.
if (index >= 0) {
--- /dev/null
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-proxies
+
+try {
+ var p = Proxy.create({ getPropertyDescriptor: function() { return [] } });
+ var o = Object.create(p);
+ with (o) { unresolved_name() }
+} catch(e) {
+}
--- /dev/null
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-proxies
+
+try {
+ var p = Proxy.create({ getPropertyDescriptor: function() { throw "boom"; } });
+ var o = Object.create(p);
+ with (o) { delete unresolved_name; }
+} catch(e) {
+}