| Index: test/cctest/test-decls.cc
|
| diff --git a/test/cctest/test-decls.cc b/test/cctest/test-decls.cc
|
| index c3bd5c4494f396f30d2b809a16e4373ca297843c..6ae23f29286a16e88e47e283dffb4e988371a8f8 100644
|
| --- a/test/cctest/test-decls.cc
|
| +++ b/test/cctest/test-decls.cc
|
| @@ -118,7 +118,7 @@ void DeclarationContext::InitializeIfNeeded() {
|
| if (is_initialized_) return;
|
| Isolate* isolate = CcTest::isolate();
|
| HandleScope scope(isolate);
|
| - Local<FunctionTemplate> function = FunctionTemplate::New();
|
| + Local<FunctionTemplate> function = FunctionTemplate::New(isolate);
|
| Local<Value> data = External::New(CcTest::isolate(), this);
|
| GetHolder(function)->SetNamedPropertyHandler(&HandleGet,
|
| &HandleSet,
|
| @@ -634,7 +634,7 @@ TEST(AbsentInPrototype) {
|
| class ExistsInHiddenPrototypeContext: public DeclarationContext {
|
| public:
|
| ExistsInHiddenPrototypeContext() {
|
| - hidden_proto_ = FunctionTemplate::New();
|
| + hidden_proto_ = FunctionTemplate::New(CcTest::isolate());
|
| hidden_proto_->SetHiddenPrototype(true);
|
| }
|
|
|
| @@ -648,9 +648,9 @@ class ExistsInHiddenPrototypeContext: public DeclarationContext {
|
| virtual void PostInitializeContext(Handle<Context> context) {
|
| Local<Object> global_object = context->Global();
|
| Local<Object> hidden_proto = hidden_proto_->GetFunction()->NewInstance();
|
| - context->DetachGlobal();
|
| - context->Global()->SetPrototype(hidden_proto);
|
| - context->ReattachGlobal(global_object);
|
| + Local<Object> inner_global =
|
| + Local<Object>::Cast(global_object->GetPrototype());
|
| + inner_global->SetPrototype(hidden_proto);
|
| }
|
|
|
| // Use the hidden prototype as the holder for the interceptors.
|
|
|