initialize v8 early in unittests
authordcarney@chromium.org <dcarney@chromium.org>
Fri, 26 Sep 2014 14:17:03 +0000 (14:17 +0000)
committerdcarney@chromium.org <dcarney@chromium.org>
Fri, 26 Sep 2014 14:17:03 +0000 (14:17 +0000)
BUG=
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/608773002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24256 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/test/run-all-unittests.cc

index 8c361dd..de56365 100644 (file)
@@ -5,6 +5,7 @@
 #include "include/libplatform/libplatform.h"
 #include "include/v8.h"
 #include "src/base/compiler-specific.h"
+#include "src/v8.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
 namespace {
@@ -38,6 +39,9 @@ class DefaultPlatformEnvironment FINAL : public ::testing::Environment {
 
 
 int main(int argc, char** argv) {
+  // This forces some thread local key initialization that may be needed to
+  // print out the names of the unit tests.
+  i::V8::Initialize();
   testing::InitGoogleMock(&argc, argv);
   testing::AddGlobalTestEnvironment(new DefaultPlatformEnvironment);
   v8::V8::SetFlagsFromCommandLine(&argc, argv, true);