Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(908)

Unified Diff: src/runtime.cc

Issue 6932068: A first skeleton for introducing Harmony proxies (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/proxy.js ('K') | « src/runtime.h ('k') | src/runtime.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
« src/proxy.js ('K') | « src/runtime.h ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698