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

Unified Diff: src/runtime.cc

Issue 418143007: FYI Implementing 'super' keyword (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: one more test Created 6 years, 4 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
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 55db916751f3c3e8e18f263f5976752c82562811..5d3442c34f4131d7f21668022c332ae7d87a9e87 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -2024,6 +2024,18 @@ RUNTIME_FUNCTION(Runtime_PreventExtensions) {
}
+RUNTIME_FUNCTION(Runtime_ToMethod) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 2);
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
+ Handle<JSFunction> clone(Handle<JSFunction>::cast(
+ isolate->factory()->CopyJSObject(fun)));
+ clone->set_home_object(*home_object);
+ return *clone;
+}
+
+
RUNTIME_FUNCTION(Runtime_IsExtensible) {
SealHandleScope shs(isolate);
DCHECK(args.length() == 1);

Powered by Google App Engine
This is Rietveld 408576698