Index: src/runtime.cc |
=================================================================== |
--- src/runtime.cc (revision 7800) |
+++ src/runtime.cc (working copy) |
@@ -588,6 +588,18 @@ |
} |
+RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateJSProxy) { |
+ HandleScope scope(isolate); |
Kevin Millikin (Chromium)
2011/05/13 08:08:30
We can remove this HandleScope and call the Heap::
rossberg
2011/05/13 09:21:53
Done.
|
+ ASSERT(args.length() == 2); |
+ Handle<Object> handler = args.at<Object>(0); |
+ Handle<Object> prototype = args.at<Object>(1); |
+ Handle<Object> used_prototype = |
+ (prototype->IsJSObject() || prototype->IsJSProxy()) ? prototype |
+ : Handle<Object>(isolate->heap()->null_value()); |
+ return *isolate->factory()->NewJSProxy(handler, used_prototype); |
+} |
+ |
+ |
RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateCatchExtensionObject) { |
ASSERT(args.length() == 2); |
CONVERT_CHECKED(String, key, args[0]); |