diff options
Diffstat (limited to 'webkit/support')
-rw-r--r-- | webkit/support/webkit_support.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc index 18d5c8a..87381b8 100644 --- a/webkit/support/webkit_support.cc +++ b/webkit/support/webkit_support.cc @@ -24,6 +24,7 @@ #include "base/sys_string_conversions.h" #include "base/time.h" #include "base/utf_string_conversions.h" +#include "googleurl/src/url_util.h" #include "grit/webkit_chromium_resources.h" #include "media/base/filter_collection.h" #include "media/base/message_loop_factory_impl.h" @@ -237,6 +238,10 @@ static void SetUpTestEnvironmentImpl(bool unit_test_mode) { const char* kFixedArguments[] = {"DumpRenderTree"}; CommandLine::Init(arraysize(kFixedArguments), kFixedArguments); + // Explicitly initialize the GURL library before spawning any threads. + // Otherwise crash may happend when different threads try to create a GURL + // at same time. + url_util::Initialize(); webkit_support::BeforeInitialize(unit_test_mode); webkit_support::test_environment = new TestEnvironment(unit_test_mode); webkit_support::AfterInitialize(unit_test_mode); |