summaryrefslogtreecommitdiffstats
path: root/gin/shell_runner_unittest.cc
diff options
context:
space:
mode:
authorjochen <jochen@chromium.org>2014-09-10 16:47:31 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-11 00:01:37 +0000
commit2f43f2c92879b36d1262d02fba4e32890912b0b5 (patch)
tree49da9698dcedc41856e97072fa694feb375c50cc /gin/shell_runner_unittest.cc
parent2ab903f7671ca80c798088c9d41ae5597257b450 (diff)
downloadchromium_src-2f43f2c92879b36d1262d02fba4e32890912b0b5.zip
chromium_src-2f43f2c92879b36d1262d02fba4e32890912b0b5.tar.gz
chromium_src-2f43f2c92879b36d1262d02fba4e32890912b0b5.tar.bz2
Refactor IsolateHolder to be able to always create the isolate
Currently, blink creates its own isolates. We want to always use an IsolateHolder to create the isolates. To be able to do this, I introduce an Initialize method that setups V8. The new IsolateHolder ctor now doesn't take any parameters but just creates new isolates according to the configuration. All non-blink gin users are cut over to the new API BUG=none R=abarth@chromium.org,andrewhayden@chromium.org,eroman@chromium.org Review URL: https://codereview.chromium.org/553903003 Cr-Commit-Position: refs/heads/master@{#294262}
Diffstat (limited to 'gin/shell_runner_unittest.cc')
-rw-r--r--gin/shell_runner_unittest.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gin/shell_runner_unittest.cc b/gin/shell_runner_unittest.cc
index 95403ec..07ab678 100644
--- a/gin/shell_runner_unittest.cc
+++ b/gin/shell_runner_unittest.cc
@@ -5,6 +5,7 @@
#include "gin/shell_runner.h"
#include "base/compiler_specific.h"
+#include "gin/array_buffer.h"
#include "gin/converter.h"
#include "gin/public/isolate_holder.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -19,7 +20,9 @@ namespace gin {
TEST(RunnerTest, Run) {
std::string source = "this.result = 'PASS';\n";
- gin::IsolateHolder instance(gin::IsolateHolder::kStrictMode);
+ gin::IsolateHolder::Initialize(gin::IsolateHolder::kStrictMode,
+ gin::ArrayBufferAllocator::SharedInstance());
+ gin::IsolateHolder instance;
ShellRunnerDelegate delegate;
Isolate* isolate = instance.isolate();