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

Unified Diff: src/accessors.cc

Issue 23280004: Handlify Accessors::FunctionSetPrototype method. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
« no previous file with comments | « src/accessors.h ('k') | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index a43eb78b8702d57ca504e734a38e1bc635582bec..45869ea63097fbdfee192f76d4f2f0cfc6581ccf 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -440,10 +440,21 @@ const AccessorDescriptor Accessors::ScriptEvalFromFunctionName = {
//
-Handle<Object> Accessors::FunctionGetPrototype(Handle<Object> object) {
- Isolate* isolate = Isolate::Current();
- CALL_HEAP_FUNCTION(
- isolate, Accessors::FunctionGetPrototype(*object, 0), Object);
+Handle<Object> Accessors::FunctionGetPrototype(Handle<JSFunction> function) {
+ CALL_HEAP_FUNCTION(function->GetIsolate(),
+ Accessors::FunctionGetPrototype(*function, NULL),
+ Object);
+}
+
+
+Handle<Object> Accessors::FunctionSetPrototype(Handle<JSFunction> function,
+ Handle<Object> prototype) {
+ ASSERT(function->should_have_prototype());
+ CALL_HEAP_FUNCTION(function->GetIsolate(),
+ Accessors::FunctionSetPrototype(*function,
+ *prototype,
+ NULL),
+ Object);
}
@@ -575,10 +586,10 @@ const AccessorDescriptor Accessors::FunctionName = {
//
-Handle<Object> Accessors::FunctionGetArguments(Handle<Object> object) {
- Isolate* isolate = Isolate::Current();
- CALL_HEAP_FUNCTION(
- isolate, Accessors::FunctionGetArguments(*object, 0), Object);
+Handle<Object> Accessors::FunctionGetArguments(Handle<JSFunction> function) {
+ CALL_HEAP_FUNCTION(function->GetIsolate(),
+ Accessors::FunctionGetArguments(*function, NULL),
+ Object);
}
« no previous file with comments | « src/accessors.h ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698