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

Unified Diff: src/arguments.cc

Issue 1224623004: Make v8::Handle as "deprecated soon" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/arguments.h ('k') | src/bootstrapper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arguments.cc
diff --git a/src/arguments.cc b/src/arguments.cc
index 4b478d71982717703fd64bc3b602b63f5ef01fd5..e7e51fed1f69af42aa0cc764e5c2554c50549a50 100644
--- a/src/arguments.cc
+++ b/src/arguments.cc
@@ -11,18 +11,18 @@ namespace v8 {
namespace internal {
-template<typename T>
-template<typename V>
-v8::Handle<V> CustomArguments<T>::GetReturnValue(Isolate* isolate) {
+template <typename T>
+template <typename V>
+v8::Local<V> CustomArguments<T>::GetReturnValue(Isolate* isolate) {
// Check the ReturnValue.
Object** handle = &this->begin()[kReturnValueOffset];
// Nothing was set, return empty handle as per previous behaviour.
- if ((*handle)->IsTheHole()) return v8::Handle<V>();
+ if ((*handle)->IsTheHole()) return v8::Local<V>();
return Utils::Convert<Object, V>(Handle<Object>(handle));
}
-v8::Handle<v8::Value> FunctionCallbackArguments::Call(FunctionCallback f) {
+v8::Local<v8::Value> FunctionCallbackArguments::Call(FunctionCallback f) {
Isolate* isolate = this->isolate();
VMState<EXTERNAL> state(isolate);
ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f));
@@ -35,40 +35,39 @@ v8::Handle<v8::Value> FunctionCallbackArguments::Call(FunctionCallback f) {
}
-#define WRITE_CALL_0(Function, ReturnValue) \
-v8::Handle<ReturnValue> PropertyCallbackArguments::Call(Function f) { \
- Isolate* isolate = this->isolate(); \
- VMState<EXTERNAL> state(isolate); \
- ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \
- PropertyCallbackInfo<ReturnValue> info(begin()); \
- f(info); \
- return GetReturnValue<ReturnValue>(isolate); \
-}
-
-
-#define WRITE_CALL_1(Function, ReturnValue, Arg1) \
-v8::Handle<ReturnValue> PropertyCallbackArguments::Call(Function f, \
- Arg1 arg1) { \
- Isolate* isolate = this->isolate(); \
- VMState<EXTERNAL> state(isolate); \
- ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \
- PropertyCallbackInfo<ReturnValue> info(begin()); \
- f(arg1, info); \
- return GetReturnValue<ReturnValue>(isolate); \
-}
-
-
-#define WRITE_CALL_2(Function, ReturnValue, Arg1, Arg2) \
-v8::Handle<ReturnValue> PropertyCallbackArguments::Call(Function f, \
- Arg1 arg1, \
- Arg2 arg2) { \
- Isolate* isolate = this->isolate(); \
- VMState<EXTERNAL> state(isolate); \
- ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \
- PropertyCallbackInfo<ReturnValue> info(begin()); \
- f(arg1, arg2, info); \
- return GetReturnValue<ReturnValue>(isolate); \
-}
+#define WRITE_CALL_0(Function, ReturnValue) \
+ v8::Local<ReturnValue> PropertyCallbackArguments::Call(Function f) { \
+ Isolate* isolate = this->isolate(); \
+ VMState<EXTERNAL> state(isolate); \
+ ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \
+ PropertyCallbackInfo<ReturnValue> info(begin()); \
+ f(info); \
+ return GetReturnValue<ReturnValue>(isolate); \
+ }
+
+
+#define WRITE_CALL_1(Function, ReturnValue, Arg1) \
+ v8::Local<ReturnValue> PropertyCallbackArguments::Call(Function f, \
+ Arg1 arg1) { \
+ Isolate* isolate = this->isolate(); \
+ VMState<EXTERNAL> state(isolate); \
+ ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \
+ PropertyCallbackInfo<ReturnValue> info(begin()); \
+ f(arg1, info); \
+ return GetReturnValue<ReturnValue>(isolate); \
+ }
+
+
+#define WRITE_CALL_2(Function, ReturnValue, Arg1, Arg2) \
+ v8::Local<ReturnValue> PropertyCallbackArguments::Call( \
+ Function f, Arg1 arg1, Arg2 arg2) { \
+ Isolate* isolate = this->isolate(); \
+ VMState<EXTERNAL> state(isolate); \
+ ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \
+ PropertyCallbackInfo<ReturnValue> info(begin()); \
+ f(arg1, arg2, info); \
+ return GetReturnValue<ReturnValue>(isolate); \
+ }
#define WRITE_CALL_2_VOID(Function, ReturnValue, Arg1, Arg2) \
« no previous file with comments | « src/arguments.h ('k') | src/bootstrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698