@@ -310,6 +310,7 @@ RUNTIME_FUNCTION(Runtime_DebugGetPropertyDetails) {
310
310
311
311
DCHECK (args.length () == 2 );
312
312
313
+ if (args[0 ]->IsJSProxy ()) return isolate->heap ()->undefined_value ();
313
314
CONVERT_ARG_HANDLE_CHECKED (JSObject, obj, 0 );
314
315
CONVERT_ARG_HANDLE_CHECKED (Name, name, 1 );
315
316
@@ -382,6 +383,7 @@ RUNTIME_FUNCTION(Runtime_DebugGetProperty) {
382
383
383
384
DCHECK (args.length () == 2 );
384
385
386
+ if (args[0 ]->IsJSProxy ()) return isolate->heap ()->undefined_value ();
385
387
CONVERT_ARG_HANDLE_CHECKED (JSObject, obj, 0 );
386
388
CONVERT_ARG_HANDLE_CHECKED (Name, name, 1 );
387
389
@@ -1318,6 +1320,7 @@ static bool HasInPrototypeChainIgnoringProxies(Isolate* isolate,
1318
1320
RUNTIME_FUNCTION (Runtime_DebugReferencedBy) {
1319
1321
HandleScope scope (isolate);
1320
1322
DCHECK (args.length () == 3 );
1323
+ if (!args[0 ]->IsJSObject ()) return *isolate->factory ()->NewJSArray (0 );
1321
1324
CONVERT_ARG_HANDLE_CHECKED (JSObject, target, 0 );
1322
1325
CONVERT_ARG_HANDLE_CHECKED (Object, filter, 1 );
1323
1326
RUNTIME_ASSERT (filter->IsUndefined () || filter->IsJSObject ());
@@ -1408,6 +1411,7 @@ RUNTIME_FUNCTION(Runtime_DebugConstructedBy) {
1408
1411
RUNTIME_FUNCTION (Runtime_DebugGetPrototype) {
1409
1412
HandleScope shs (isolate);
1410
1413
DCHECK (args.length () == 1 );
1414
+ if (args[0 ]->IsJSProxy ()) return isolate->heap ()->undefined_value ();
1411
1415
CONVERT_ARG_HANDLE_CHECKED (JSObject, obj, 0 );
1412
1416
Handle<Object> prototype;
1413
1417
// TODO(1543): Come up with a solution for clients to handle potential errors
0 commit comments