Title: [159634] trunk/Source/WebKit2
- Revision
- 159634
- Author
- [email protected]
- Date
- 2013-11-21 10:21:02 -0800 (Thu, 21 Nov 2013)
Log Message
Clean up WebKit2 initialization
https://bugs.webkit.org/show_bug.cgi?id=124696
Reviewed by Sam Weinig.
Call InitializeWebKit2() everywhere we need to do one-time
initialization in WebKit2, rather than having a hotch-potch
of init code.
* Shared/APIObject.cpp:
(API::Object::Object):
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm: Removed an unused #include.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::create):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (159633 => 159634)
--- trunk/Source/WebKit2/ChangeLog 2013-11-21 17:44:19 UTC (rev 159633)
+++ trunk/Source/WebKit2/ChangeLog 2013-11-21 18:21:02 UTC (rev 159634)
@@ -1,3 +1,22 @@
+2013-11-20 Simon Fraser <[email protected]>
+
+ Clean up WebKit2 initialization
+ https://bugs.webkit.org/show_bug.cgi?id=124696
+
+ Reviewed by Sam Weinig.
+
+ Call InitializeWebKit2() everywhere we need to do one-time
+ initialization in WebKit2, rather than having a hotch-potch
+ of init code.
+
+ * Shared/APIObject.cpp:
+ (API::Object::Object):
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
+ * UIProcess/Launcher/mac/ProcessLauncherMac.mm: Removed an unused #include.
+ * UIProcess/WebContext.cpp:
+ (WebKit::WebContext::create):
+
2013-11-21 Dan Bernstein <[email protected]>
Reverted r159603, as it appears to have caused Safari’s Web processes to crash on launch.
Modified: trunk/Source/WebKit2/Shared/APIObject.cpp (159633 => 159634)
--- trunk/Source/WebKit2/Shared/APIObject.cpp 2013-11-21 17:44:19 UTC (rev 159633)
+++ trunk/Source/WebKit2/Shared/APIObject.cpp 2013-11-21 18:21:02 UTC (rev 159634)
@@ -31,16 +31,13 @@
#include "config.h"
#include "APIObject.h"
-#include <runtime/InitializeThreading.h>
-#include <runtime/Operations.h>
-#include <wtf/MainThread.h>
+#include "WebKit2Initialize.h"
namespace API {
Object::Object()
{
- JSC::initializeThreading();
- WTF::initializeMainThread();
+ WebKit::InitializeWebKit2();
}
} // namespace WebKit
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (159633 => 159634)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2013-11-21 17:44:19 UTC (rev 159633)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2013-11-21 18:21:02 UTC (rev 159634)
@@ -59,6 +59,7 @@
#import "WebContext.h"
#import "WebEventFactory.h"
#import "WebFullScreenManagerProxy.h"
+#import "WebKit2Initialize.h"
#import "WebPage.h"
#import "WebPageGroup.h"
#import "WebPageProxy.h"
@@ -2885,8 +2886,7 @@
[NSApp registerServicesMenuSendTypes:PasteboardTypes::forSelection() returnTypes:PasteboardTypes::forEditing()];
- InitWebCoreSystemInterface();
- RunLoop::initializeMainRunLoop();
+ InitializeWebKit2();
// Legacy style scrollbars have design details that rely on tracking the mouse all the time.
NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect;
Modified: trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm (159633 => 159634)
--- trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm 2013-11-21 17:44:19 UTC (rev 159633)
+++ trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm 2013-11-21 18:21:02 UTC (rev 159634)
@@ -32,7 +32,6 @@
#import <crt_externs.h>
#import <mach-o/dyld.h>
#import <mach/machine.h>
-#import <runtime/InitializeThreading.h>
#import <servers/bootstrap.h>
#import <spawn.h>
#import <sys/param.h>
Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (159633 => 159634)
--- trunk/Source/WebKit2/UIProcess/WebContext.cpp 2013-11-21 17:44:19 UTC (rev 159633)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp 2013-11-21 18:21:02 UTC (rev 159634)
@@ -46,6 +46,7 @@
#include "WebGeolocationManagerProxy.h"
#include "WebIconDatabase.h"
#include "WebKeyValueStorageManager.h"
+#include "WebKit2Initialize.h"
#include "WebMediaCacheManagerProxy.h"
#include "WebNotificationManagerProxy.h"
#include "WebPluginSiteDataManager.h"
@@ -60,7 +61,6 @@
#include <WebCore/LinkHash.h>
#include <WebCore/Logging.h>
#include <WebCore/ResourceRequest.h>
-#include <runtime/InitializeThreading.h>
#include <runtime/Operations.h>
#include <wtf/CurrentTime.h>
#include <wtf/MainThread.h>
@@ -102,9 +102,7 @@
PassRefPtr<WebContext> WebContext::create(const String& injectedBundlePath)
{
- JSC::initializeThreading();
- WTF::initializeMainThread();
- RunLoop::initializeMainRunLoop();
+ InitializeWebKit2();
return adoptRef(new WebContext(ProcessModelSharedSecondaryProcess, injectedBundlePath));
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes