| Index: gin/test/v8_test.cc
|
| diff --git a/gin/test/v8_test.cc b/gin/test/v8_test.cc
|
| index b2c1d5d5161490481663d5dda128a2107fc8039b..b09930edfab6c43b49b3118be42f677bb71b033e 100644
|
| --- a/gin/test/v8_test.cc
|
| +++ b/gin/test/v8_test.cc
|
| @@ -4,10 +4,11 @@
|
|
|
| #include "gin/test/v8_test.h"
|
|
|
| +#include "gin/gin.h"
|
| +
|
| using v8::Context;
|
| using v8::Local;
|
| using v8::HandleScope;
|
| -using v8::Isolate;
|
|
|
| namespace gin {
|
|
|
| @@ -18,16 +19,21 @@ V8Test::~V8Test() {
|
| }
|
|
|
| void V8Test::SetUp() {
|
| - isolate_ = Isolate::GetCurrent();
|
| - HandleScope handle_scope(isolate_);
|
| - context_.Reset(isolate_, Context::New(isolate_));
|
| - Local<Context>::New(isolate_, context_)->Enter();
|
| + instance_.reset(new gin::Gin);
|
| + instance_->isolate()->Enter();
|
| + HandleScope handle_scope(instance_->isolate());
|
| + context_.Reset(instance_->isolate(), Context::New(instance_->isolate()));
|
| + Local<Context>::New(instance_->isolate(), context_)->Enter();
|
| }
|
|
|
| void V8Test::TearDown() {
|
| - HandleScope handle_scope(isolate_);
|
| - Local<Context>::New(isolate_, context_)->Exit();
|
| - context_.Reset();
|
| + {
|
| + HandleScope handle_scope(instance_->isolate());
|
| + Local<Context>::New(instance_->isolate(), context_)->Exit();
|
| + context_.Reset();
|
| + }
|
| + instance_->isolate()->Exit();
|
| + instance_.reset();
|
| }
|
|
|
| } // namespace gin
|
|
|