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

Unified Diff: src/runtime.cc

Issue 12385082: Make sure builtin functions don't rely on __proto__. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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
« no previous file with comments | « src/runtime.h ('k') | src/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 53b5ce1c4eeb8ea71eb74f4cf235ce5efd3a3ac0..e914a3ae3291ee411b2c3a80122b2725c507fd90 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -967,6 +967,15 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetPrototype) {
}
+RUNTIME_FUNCTION(MaybeObject*, Runtime_SetPrototype) {
+ NoHandleAllocation ha(isolate);
+ ASSERT(args.length() == 2);
+ CONVERT_ARG_CHECKED(JSReceiver, input_obj, 0);
+ CONVERT_ARG_CHECKED(Object, prototype, 1);
+ return input_obj->SetPrototype(prototype, true);
+}
+
+
RUNTIME_FUNCTION(MaybeObject*, Runtime_IsInPrototypeChain) {
NoHandleAllocation ha(isolate);
ASSERT(args.length() == 2);
« no previous file with comments | « src/runtime.h ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698