Added grv@ and dvh@ as owners of developer private API.
[chromium-blink-merge.git] / gin / test / v8_test.cc
blob95f4e74c79efd92bdacc91d7ef5d1c3882738ee5
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "gin/test/v8_test.h"
7 #include "gin/public/isolate_holder.h"
9 using v8::Context;
10 using v8::Local;
11 using v8::HandleScope;
13 namespace gin {
15 V8Test::V8Test() {
18 V8Test::~V8Test() {
21 void V8Test::SetUp() {
22 instance_.reset(new gin::IsolateHolder);
23 instance_->isolate()->Enter();
24 HandleScope handle_scope(instance_->isolate());
25 context_.Reset(instance_->isolate(), Context::New(instance_->isolate()));
26 Local<Context>::New(instance_->isolate(), context_)->Enter();
29 void V8Test::TearDown() {
31 HandleScope handle_scope(instance_->isolate());
32 Local<Context>::New(instance_->isolate(), context_)->Exit();
33 context_.Reset();
35 instance_->isolate()->Exit();
36 instance_.reset();
39 } // namespace gin