Index: src/api-natives.cc |
diff --git a/src/api-natives.cc b/src/api-natives.cc |
index 3fe59e293d3ff2d1d8d3b3fd688897334e6e95c8..a8808236bccae935ad4384e4ab1f44b25ce42d22 100644 |
--- a/src/api-natives.cc |
+++ b/src/api-natives.cc |
@@ -656,6 +656,12 @@ Handle<JSFunction> ApiNatives::CreateApiFunction( |
// Mark as undetectable if needed. |
if (obj->undetectable()) { |
+ // We only allow callable undetectable receivers here, since this whole |
+ // undetectable business is only to support document.all, which is both |
+ // undetectable and callable. If we ever see the need to have an object |
+ // that is undetectable but not callable, we need to update the types.h |
+ // to allow encoding this. |
+ CHECK(!obj->instance_call_handler()->IsUndefined(isolate)); |
map->set_is_undetectable(); |
} |