summaryrefslogtreecommitdiffstats
path: root/gin/shell_runner_unittest.cc
diff options
context:
space:
mode:
authorbaixo <baixo@chromium.org>2014-10-28 04:52:21 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-28 11:52:42 +0000
commit3a3c88a61fc3fc5b001e7bae70e6335d3cf7c997 (patch)
tree0840a2647c5c2eda9a92ad9ffd2a45adbed9379e /gin/shell_runner_unittest.cc
parentfb8875c804337e452e7f799bc3960b912100e5a9 (diff)
downloadchromium_src-3a3c88a61fc3fc5b001e7bae70e6335d3cf7c997.zip
chromium_src-3a3c88a61fc3fc5b001e7bae70e6335d3cf7c997.tar.gz
chromium_src-3a3c88a61fc3fc5b001e7bae70e6335d3cf7c997.tar.bz2
Infrastructure for enabling V8's initial snapshot to be loaded from external files as opposed to being statically linked to the binary.
This is not currently supported on any architecture. BUG=421063 Review URL: https://codereview.chromium.org/594603003 Cr-Commit-Position: refs/heads/master@{#301595}
Diffstat (limited to 'gin/shell_runner_unittest.cc')
-rw-r--r--gin/shell_runner_unittest.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gin/shell_runner_unittest.cc b/gin/shell_runner_unittest.cc
index 07ab678..7134de1 100644
--- a/gin/shell_runner_unittest.cc
+++ b/gin/shell_runner_unittest.cc
@@ -10,6 +10,10 @@
#include "gin/public/isolate_holder.h"
#include "testing/gtest/include/gtest/gtest.h"
+#ifdef V8_USE_EXTERNAL_STARTUP_DATA
+#include "gin/public/isolate_holder.h"
+#endif
+
using v8::Isolate;
using v8::Object;
using v8::Script;
@@ -20,6 +24,10 @@ namespace gin {
TEST(RunnerTest, Run) {
std::string source = "this.result = 'PASS';\n";
+#ifdef V8_USE_EXTERNAL_STARTUP_DATA
+ gin::IsolateHolder::LoadV8Snapshot();
+#endif
+
gin::IsolateHolder::Initialize(gin::IsolateHolder::kStrictMode,
gin::ArrayBufferAllocator::SharedInstance());
gin::IsolateHolder instance;