Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index b32ae8a1b4b81a85c4d8e0d1737eea1b367d61b3..95724e89c119d7e945c4868cc9ff32b593b9e1da 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -588,6 +588,17 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateArrayLiteralShallow) { |
} |
+RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateJSProxy) { |
+ ASSERT(args.length() == 2); |
+ Object* handler = args[0]; |
+ Object* prototype = args[1]; |
+ Object* used_prototype = |
+ (prototype->IsJSObject() || prototype->IsJSProxy()) ? prototype |
+ : isolate->heap()->null_value(); |
+ return isolate->heap()->AllocateJSProxy(handler, used_prototype); |
+} |
+ |
+ |
RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateCatchExtensionObject) { |
ASSERT(args.length() == 2); |
CONVERT_CHECKED(String, key, args[0]); |