WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-112254-20130313144519.patch (text/plain), 6.38 KB, created by
Jocelyn Turcotte
on 2013-03-13 06:49:22 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jocelyn Turcotte
Created:
2013-03-13 06:49:22 PDT
Size:
6.38 KB
patch
obsolete
>Subversion Revision: 145524 >diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog >index e7d97a56d67f0ff20bc1e51b47d99bff06ae8927..320ae4a5502c53e2d610c0e9fd973aa746aeb37f 100644 >--- a/Source/WebKit2/ChangeLog >+++ b/Source/WebKit2/ChangeLog >@@ -1,5 +1,24 @@ > 2013-03-13 Jocelyn Turcotte <jocelyn.turcotte@digia.com> > >+ [Qt][WK2] Move the inspector server initialization under WebContext platform code >+ https://bugs.webkit.org/show_bug.cgi?id=112254 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ To allow QtWebContext not to know about WK2 internals, move the inspector server >+ initialization in WebContext::platformInitializeWebProcess. >+ This is also consistent with EFL and GTK. >+ >+ * UIProcess/qt/QtWebContext.cpp: >+ (WebKit): >+ (WebKit::QtWebContext::create): >+ * UIProcess/qt/WebContextQt.cpp: >+ (WebKit::initInspectorServer): >+ (WebKit): >+ (WebKit::WebContext::platformInitializeWebProcess): >+ >+2013-03-13 Jocelyn Turcotte <jocelyn.turcotte@digia.com> >+ > [WK2][Qt] Regression(145517) WebProcess asserts in debug build on WebKitTestRunner start > https://bugs.webkit.org/show_bug.cgi?id=112223 > >diff --git a/Source/WebKit2/UIProcess/qt/QtWebContext.cpp b/Source/WebKit2/UIProcess/qt/QtWebContext.cpp >index 4489d74c8a66db3f2c6d2160f4acaa72ce051e2f..1fa77068ee542b00990798a83c34842a471181ad 100644 >--- a/Source/WebKit2/UIProcess/qt/QtWebContext.cpp >+++ b/Source/WebKit2/UIProcess/qt/QtWebContext.cpp >@@ -45,48 +45,6 @@ namespace WebKit { > // - The IconDatabase wasn't designed to have more than one instance, or to be quickly opened/closed. > static QtWebContext* s_defaultQtWebContext = 0; > >-static void initInspectorServer() >-{ >-#if ENABLE(INSPECTOR_SERVER) >- QString inspectorEnv = QString::fromUtf8(qgetenv("QTWEBKIT_INSPECTOR_SERVER")); >- if (!inspectorEnv.isEmpty()) { >- QString bindAddress = QLatin1String("127.0.0.1"); >- QString portStr = inspectorEnv; >- int port = 0; >- >- int portColonPos = inspectorEnv.lastIndexOf(':'); >- if (portColonPos != -1) { >- portStr = inspectorEnv.mid(portColonPos + 1); >- bindAddress = inspectorEnv.mid(0, portColonPos); >- } >- >- bool ok = false; >- port = portStr.toInt(&ok); >- if (!ok) { >- qWarning("Non numeric port for the inspector server \"%s\". Examples of valid input: \"12345\" or \"192.168.2.14:12345\" (with the address of one of this host's interface).", qPrintable(portStr)); >- return; >- } >- >- bool success = WebInspectorServer::shared().listen(bindAddress, port); >- if (success) { >- QString inspectorServerUrl = QString::fromLatin1("http://%1:%2").arg(bindAddress).arg(port); >- qWarning("Inspector server started successfully. Try pointing a WebKit browser to %s", qPrintable(inspectorServerUrl)); >- } else >- qWarning("Couldn't start the inspector server on bind address \"%s\" and port \"%d\". In case of invalid input, try something like: \"12345\" or \"192.168.2.14:12345\" (with the address of one of this host's interface).", qPrintable(bindAddress), port); >- } >-#endif >-} >- >-static void globalInitialization() >-{ >- static bool initialized = false; >- if (initialized) >- return; >- >- initInspectorServer(); >- initialized = true; >-} >- > static void didReceiveMessageFromInjectedBundle(WKContextRef, WKStringRef messageName, WKTypeRef messageBody, const void*) > { > if (!WKStringIsEqualToUTF8CString(messageName, "MessageFromNavigatorQtObject")) >@@ -129,7 +87,6 @@ QtWebContext::~QtWebContext() > // Used directly only by WebKitTestRunner. > QtWebContext* QtWebContext::create(WKContextRef context) > { >- globalInitialization(); > return new QtWebContext(context); > } > >diff --git a/Source/WebKit2/UIProcess/qt/WebContextQt.cpp b/Source/WebKit2/UIProcess/qt/WebContextQt.cpp >index 595edcb7a281da77e09bcc0273873c5f2acfad9d..0ae36b1267573a337d3517f0631528137a9839ef 100644 >--- a/Source/WebKit2/UIProcess/qt/WebContextQt.cpp >+++ b/Source/WebKit2/UIProcess/qt/WebContextQt.cpp >@@ -29,6 +29,7 @@ > > #include "ApplicationCacheStorage.h" > #include "WKSharedAPICast.h" >+#include "WebInspectorServer.h" > #include "WebProcessCreationParameters.h" > #include <QProcess> > >@@ -39,6 +40,43 @@ > > namespace WebKit { > >+static void initInspectorServer() >+{ >+#if ENABLE(INSPECTOR_SERVER) >+ static bool initialized = false; >+ if (initialized) >+ return; >+ initialized = true; >+ >+ QString inspectorEnv = QString::fromUtf8(qgetenv("QTWEBKIT_INSPECTOR_SERVER")); >+ if (!inspectorEnv.isEmpty()) { >+ QString bindAddress = QLatin1String("127.0.0.1"); >+ QString portStr = inspectorEnv; >+ int port = 0; >+ >+ int portColonPos = inspectorEnv.lastIndexOf(':'); >+ if (portColonPos != -1) { >+ portStr = inspectorEnv.mid(portColonPos + 1); >+ bindAddress = inspectorEnv.mid(0, portColonPos); >+ } >+ >+ bool ok = false; >+ port = portStr.toInt(&ok); >+ if (!ok) { >+ qWarning("Non numeric port for the inspector server \"%s\". Examples of valid input: \"12345\" or \"192.168.2.14:12345\" (with the address of one of this host's interface).", qPrintable(portStr)); >+ return; >+ } >+ >+ bool success = WebInspectorServer::shared().listen(bindAddress, port); >+ if (success) { >+ QString inspectorServerUrl = QString::fromLatin1("http://%1:%2").arg(bindAddress).arg(port); >+ qWarning("Inspector server started successfully. Try pointing a WebKit browser to %s", qPrintable(inspectorServerUrl)); >+ } else >+ qWarning("Couldn't start the inspector server on bind address \"%s\" and port \"%d\". In case of invalid input, try something like: \"12345\" or \"192.168.2.14:12345\" (with the address of one of this host's interface).", qPrintable(bindAddress), port); >+ } >+#endif >+} >+ > String WebContext::applicationCacheDirectory() > { > const String cacheDirectory = WebCore::cacheStorage().cacheDirectory(); >@@ -51,6 +89,8 @@ String WebContext::applicationCacheDirectory() > > void WebContext::platformInitializeWebProcess(WebProcessCreationParameters& parameters) > { >+ initInspectorServer(); >+ > qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus"); > #if ENABLE(GEOLOCATION) > static WebGeolocationProviderQt* location = WebGeolocationProviderQt::create(toAPI(supplement<WebGeolocationManagerProxy>()));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 112254
:
192915
|
192916