Comment #4 on issue 4026 by [email protected]: Exception is not properly propagated if enumerate interceptor throws an exception
https://code.google.com/p/v8/issues/detail?id=4026

This bug is still present in V8 4.2.77.20 (used in iojs 2.1.0), and a similar fix is still necessary and effective:

diff --git a/deps/v8/src/objects.cc b/deps/v8/src/objects.cc
index 0eda491..ae5df02 100644
--- a/deps/v8/src/objects.cc
+++ b/deps/v8/src/objects.cc
@@ -6309,13 +6309,12 @@ MaybeHandle<FixedArray> JSReceiver::GetKeys(Handle<JSReceiver> object,
     // Add the element keys from the interceptor.
     if (current->HasIndexedInterceptor()) {
       Handle<JSObject> result;
-      if (JSObject::GetKeysForIndexedInterceptor(
-              current, object).ToHandle(&result)) {
-        ASSIGN_RETURN_ON_EXCEPTION(
-            isolate, content,
-            FixedArray::AddKeysFromArrayLike(content, result),
-            FixedArray);
-      }
+      ASSIGN_RETURN_ON_EXCEPTION(isolate, result,
+ JSObject::GetKeysForIndexedInterceptor(current, object),
+                                 FixedArray);
+      ASSIGN_RETURN_ON_EXCEPTION(isolate, content,
+ FixedArray::AddKeysFromArrayLike(content, result),
+                                 FixedArray);
       DCHECK(ContainsOnlyValidKeys(content));
     }

@@ -6346,13 +6345,12 @@ MaybeHandle<FixedArray> JSReceiver::GetKeys(Handle<JSReceiver> object,
     // Add the non-symbol property keys from the interceptor.
     if (current->HasNamedInterceptor()) {
       Handle<JSObject> result;
-      if (JSObject::GetKeysForNamedInterceptor(
-              current, object).ToHandle(&result)) {
-        ASSIGN_RETURN_ON_EXCEPTION(
-            isolate, content, FixedArray::AddKeysFromArrayLike(
- content, result, FixedArray::NON_SYMBOL_KEYS),
-            FixedArray);
-      }
+      ASSIGN_RETURN_ON_EXCEPTION(isolate, result,
+ JSObject::GetKeysForNamedInterceptor(current, object),
+                                 FixedArray);
+      ASSIGN_RETURN_ON_EXCEPTION(isolate, content,
+ FixedArray::AddKeysFromArrayLike(content, result, FixedArray::NON_SYMBOL_KEYS),
+                                 FixedArray);
       DCHECK(ContainsOnlyValidKeys(content));
     }


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

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