summaryrefslogtreecommitdiffstats
path: root/webkit/support
diff options
context:
space:
mode:
authorjnd@chromium.org <jnd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-27 00:35:24 +0000
committerjnd@chromium.org <jnd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-27 00:35:24 +0000
commit9622ca6ce8a2a21a803c5f97600735a6bc2e47da (patch)
treee8c2063c1475a61002373ca86cbd96832a1e11de /webkit/support
parent08bd43bd401695273f19468cec628710ffe13354 (diff)
downloadchromium_src-9622ca6ce8a2a21a803c5f97600735a6bc2e47da.zip
chromium_src-9622ca6ce8a2a21a803c5f97600735a6bc2e47da.tar.gz
chromium_src-9622ca6ce8a2a21a803c5f97600735a6bc2e47da.tar.bz2
Explicitly Initialize GURL library before spawning any threads in webkit test support in order to fix DRT chromium port crash
BUG=90503 TEST=None Review URL: http://codereview.chromium.org/7461079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94216 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support')
-rw-r--r--webkit/support/webkit_support.cc5
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);