Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: Source/WebKit/chromium/src/WebKit.cpp

Issue 15861022: Build WTF as dll in component build (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix AutoDrainedPool ctor and ThreadSpecificThreadExit exports Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/WebKit/chromium/src/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebKit.cpp
diff --git a/Source/WebKit/chromium/src/WebKit.cpp b/Source/WebKit/chromium/src/WebKit.cpp
index 3eda4cac07ca81eb4a62ed24365ac6d66df1de93..00b8889fd3d1eb077ba3126a4aa126308cce68b1 100644
--- a/Source/WebKit/chromium/src/WebKit.cpp
+++ b/Source/WebKit/chromium/src/WebKit.cpp
@@ -49,6 +49,8 @@
#include "core/platform/graphics/chromium/MediaPlayerPrivateChromium.h"
#include "core/workers/WorkerContextProxy.h"
#include "wtf/Assertions.h"
+#include "wtf/CryptographicallyRandomNumber.h"
+#include "wtf/CurrentTime.h"
#include "wtf/MainThread.h"
#include "wtf/Threading.h"
#include "wtf/UnusedParam.h"
@@ -116,6 +118,26 @@ void initialize(Platform* platform)
}
}
+static double currentTimeFunction()
+{
+ return Platform::current()->currentTime();
+}
+
+static double monotonicallyIncreasingTimeFunction()
+{
+ return Platform::current()->monotonicallyIncreasingTime();
+}
+
+static void cryptographicallyRandomValues(unsigned char* buffer, size_t length)
+{
+ Platform::current()->cryptographicallyRandomValues(buffer, length);
+}
+
+static void callOnMainThreadFunction(WTF::MainThreadFunction function, void* context)
+{
+ Platform::current()->callOnMainThread(function, context);
+}
+
void initializeWithoutV8(Platform* platform)
{
ASSERT(!s_webKitInitialized);
@@ -124,8 +146,9 @@ void initializeWithoutV8(Platform* platform)
ASSERT(platform);
Platform::initialize(platform);
- WTF::initializeThreading();
- WTF::initializeMainThread();
+ WTF::setRandomSource(cryptographicallyRandomValues);
+ WTF::initialize(currentTimeFunction, monotonicallyIncreasingTimeFunction);
+ WTF::initializeMainThread(callOnMainThreadFunction);
WebCore::init();
WebCore::ImageDecodingStore::initializeOnce();
« no previous file with comments | « no previous file | Source/WebKit/chromium/src/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698