Index: Source/core/Init.cpp |
diff --git a/Source/core/Init.cpp b/Source/core/Init.cpp |
index 178dbde9bf0d2f4f3ba93379fd18cd9d930335db..bacf2b37b672a319b04b04ee85b109b0cf88b797 100644 |
--- a/Source/core/Init.cpp |
+++ b/Source/core/Init.cpp |
@@ -46,6 +46,8 @@ |
#include "XLinkNames.h" |
#include "XMLNSNames.h" |
#include "XMLNames.h" |
+#include "core/dom/Document.h" |
+#include "core/events/EventFactory.h" |
#include "core/html/parser/HTMLParserThread.h" |
#include "platform/EventTracer.h" |
#include "platform/Partitions.h" |
@@ -65,6 +67,16 @@ void CoreInitializer::initEventTargetNames() |
EventTargetNames::init(); |
} |
+void CoreInitializer::registerEventFactory() |
+{ |
+ static bool isRegistered = false; |
+ if (isRegistered) |
+ return; |
+ isRegistered = true; |
+ |
+ Document::registerEventFactory(new EventFactory()); |
+} |
+ |
void CoreInitializer::init() |
{ |
if (m_isInited) |
@@ -96,6 +108,8 @@ void CoreInitializer::init() |
Partitions::init(); |
EventTracer::initialize(); |
+ registerEventFactory(); |
+ |
// Ensure that the main thread's thread-local data is initialized before |
// starting any worker threads. |
PlatformThreadData::current(); |