Changeset 127967 in webkit
- Timestamp:
- Sep 8, 2012 3:50:37 AM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r127966 r127967 1 2012-09-08 Simon Hausmann <simon.hausmann@nokia.com> 2 3 [Qt] Fix CoreIPC setup between ProcessLauncher and WebProcessMain on Windows 4 https://bugs.webkit.org/show_bug.cgi?id=96179 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: 9 (WebKit::ProcessLauncher::launchProcess): Hide Unixy platform specific code 10 and includes behind appropriate platform #ifdefs and use 11 CoreIPC::Connection::createServerAndClientIdentifiers to set up the IPC pipes. 12 We also need to tell Windows about our intent of using the client handle in 13 the child web process. 14 * WebProcess/qt/WebProcessMainQt.cpp: 15 (WebKit::WebProcessMainQt): After retrieving the IPC identifier we call 16 WebKit::WebProcess::shared().initialize with it. That function actually 17 cares a CIPC::Connection::Identifier as argument, which happens to be an 18 int on Unix, but it's actually a HANDLE on Windows. Change the parameter 19 type according to and a reinterpret_cast from the converted unsigned integer, 20 similar to WebProcessMainWin.cpp. 21 1 22 2012-09-08 Christophe Dumez <christophe.dumez@intel.com> 2 23 -
trunk/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
r127253 r127967 39 39 #include <WebCore/NotImplemented.h> 40 40 #include <WebCore/RunLoop.h> 41 #include <wtf/HashSet.h> 42 #include <wtf/PassRefPtr.h> 43 #include <wtf/Threading.h> 44 #include <wtf/text/WTFString.h> 45 46 #if defined(Q_OS_UNIX) 41 47 #include <errno.h> 42 48 #include <fcntl.h> … … 46 52 #include <sys/socket.h> 47 53 #include <unistd.h> 48 #include <wtf/HashSet.h> 49 #include <wtf/PassRefPtr.h> 50 #include <wtf/Threading.h> 51 #include <wtf/text/WTFString.h> 54 #endif 52 55 53 56 #if defined(Q_OS_LINUX) 54 57 #include <sys/prctl.h> 55 58 #include <signal.h> 59 #endif 60 61 #if OS(WINDOWS) 62 #include <windows.h> 56 63 #endif 57 64 … … 128 135 129 136 commandLine = commandLine.arg(serviceName); 137 #elif OS(WINDOWS) 138 CoreIPC::Connection::Identifier connector, clientIdentifier; 139 if (!CoreIPC::Connection::createServerAndClientIdentifiers(connector, clientIdentifier)) { 140 // FIXME: What should we do here? 141 ASSERT_NOT_REACHED(); 142 } 143 commandLine = commandLine.arg(qulonglong(clientIdentifier)); 144 // Ensure that the child process inherits the client identifier. 145 ::SetHandleInformation(clientIdentifier, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT); 130 146 #else 131 147 int sockets[2]; … … 154 170 webProcess->start(commandLine); 155 171 156 #if !OS(DARWIN)172 #if OS(UNIX) && !OS(DARWIN) 157 173 // Don't expose the web socket to possible future web processes 158 174 while (fcntl(sockets[0], F_SETFD, FD_CLOEXEC) == -1) { … … 176 192 } 177 193 194 #if OS(UNIX) 178 195 setpriority(PRIO_PROCESS, webProcess->pid(), 10); 196 #endif 179 197 180 198 RunLoop::main()->dispatch(bind(&WebKit::ProcessLauncher::didFinishLaunchingProcess, this, webProcess, connector)); -
trunk/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp
r127726 r127967 173 173 #else 174 174 bool wasNumber = false; 175 int identifier = app->arguments().at(1).toInt(&wasNumber, 10);175 qulonglong id = app->arguments().at(1).toULongLong(&wasNumber, 10); 176 176 if (!wasNumber) { 177 177 qDebug() << "Error: connection identifier wrong."; 178 178 return 1; 179 179 } 180 CoreIPC::Connection::Identifier identifier; 181 #if OS(WINDOWS) 182 // Convert to HANDLE 183 identifier = reinterpret_cast<CoreIPC::Connection::Identifier>(id); 184 #else 185 // Convert to int 186 identifier = static_cast<CoreIPC::Connection::Identifier>(id); 187 #endif 180 188 #endif 181 189 #if USE(ACCELERATED_COMPOSITING)
Note: See TracChangeset
for help on using the changeset viewer.