| Index: test/cctest/test-decls.cc
|
| diff --git a/test/cctest/test-decls.cc b/test/cctest/test-decls.cc
|
| index de45cbcdb884a0061e01bffe51ed93ee8a36fa71..0f6bb8fff7063ce2da00ab79f32ba3c557b819fa 100644
|
| --- a/test/cctest/test-decls.cc
|
| +++ b/test/cctest/test-decls.cc
|
| @@ -88,13 +88,13 @@ class DeclarationContext {
|
|
|
| // The handlers are called as static functions that forward
|
| // to the instance specific virtual methods.
|
| - static v8::Handle<Value> HandleGet(Local<String> key,
|
| - const AccessorInfo& info);
|
| - static v8::Handle<Value> HandleSet(Local<String> key,
|
| - Local<Value> value,
|
| - const AccessorInfo& info);
|
| - static v8::Handle<Integer> HandleQuery(Local<String> key,
|
| - const AccessorInfo& info);
|
| + static void HandleGet(Local<String> key,
|
| + const v8::PropertyCallbackInfo<v8::Value>& info);
|
| + static void HandleSet(Local<String> key,
|
| + Local<Value> value,
|
| + const v8::PropertyCallbackInfo<v8::Value>& info);
|
| + static void HandleQuery(Local<String> key,
|
| + const v8::PropertyCallbackInfo<v8::Integer>& info);
|
|
|
| private:
|
| bool is_initialized_;
|
| @@ -104,7 +104,7 @@ class DeclarationContext {
|
| int set_count_;
|
| int query_count_;
|
|
|
| - static DeclarationContext* GetInstance(const AccessorInfo& info);
|
| + static DeclarationContext* GetInstance(Local<Value> data);
|
| };
|
|
|
|
|
| @@ -173,33 +173,36 @@ void DeclarationContext::Check(const char* source,
|
| }
|
|
|
|
|
| -v8::Handle<Value> DeclarationContext::HandleGet(Local<String> key,
|
| - const AccessorInfo& info) {
|
| - DeclarationContext* context = GetInstance(info);
|
| +void DeclarationContext::HandleGet(
|
| + Local<String> key,
|
| + const v8::PropertyCallbackInfo<v8::Value>& info) {
|
| + DeclarationContext* context = GetInstance(info.Data());
|
| context->get_count_++;
|
| - return context->Get(key);
|
| + info.GetReturnValue().Set(context->Get(key));
|
| }
|
|
|
|
|
| -v8::Handle<Value> DeclarationContext::HandleSet(Local<String> key,
|
| - Local<Value> value,
|
| - const AccessorInfo& info) {
|
| - DeclarationContext* context = GetInstance(info);
|
| +void DeclarationContext::HandleSet(
|
| + Local<String> key,
|
| + Local<Value> value,
|
| + const v8::PropertyCallbackInfo<v8::Value>& info) {
|
| + DeclarationContext* context = GetInstance(info.Data());
|
| context->set_count_++;
|
| - return context->Set(key, value);
|
| + info.GetReturnValue().Set(context->Set(key, value));
|
| }
|
|
|
|
|
| -v8::Handle<Integer> DeclarationContext::HandleQuery(Local<String> key,
|
| - const AccessorInfo& info) {
|
| - DeclarationContext* context = GetInstance(info);
|
| +void DeclarationContext::HandleQuery(
|
| + Local<String> key,
|
| + const v8::PropertyCallbackInfo<v8::Integer>& info) {
|
| + DeclarationContext* context = GetInstance(info.Data());
|
| context->query_count_++;
|
| - return context->Query(key);
|
| + info.GetReturnValue().Set(context->Query(key));
|
| }
|
|
|
|
|
| -DeclarationContext* DeclarationContext::GetInstance(const AccessorInfo& info) {
|
| - void* value = External::Cast(*info.Data())->Value();
|
| +DeclarationContext* DeclarationContext::GetInstance(Local<Value> data) {
|
| + void* value = Local<External>::Cast(data)->Value();
|
| return static_cast<DeclarationContext*>(value);
|
| }
|
|
|
|
|