Changeset 63917 in webkit
- Timestamp:
- Jul 22, 2010 3:18:50 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r63916 r63917 1 2010-07-22 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Adam Roben. 4 5 It should be possible to attach to the WebProcess in gdb during startup 6 https://bugs.webkit.org/show_bug.cgi?id=42853 7 8 Create an unique bootstrap service name and pass it to the web process, instead of registering a per process 9 name (which was incorrect anyway). This lets us get rid of the requirement that the UI process always should be 10 the parent process of the web process, something which is false when running under the debugger. 11 12 * UIProcess/Launcher/mac/ProcessLauncherMac.mm: 13 (WebKit::ProcessLauncher::launchProcess): 14 * WebProcess/mac/WebProcessMainMac.mm: 15 (WebKit::WebProcessMain): 16 1 17 2010-07-22 Anders Carlsson <andersca@apple.com> 2 18 -
trunk/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
r62471 r63917 29 29 #include "WebProcess.h" 30 30 #include "WebSystemInterface.h" 31 31 #include <WebCore/PlatformString.h> 32 32 #include <crt_externs.h> 33 33 #include <runtime/InitializeThreading.h> … … 36 36 #include <wtf/PassRefPtr.h> 37 37 #include <wtf/Threading.h> 38 #include <wtf/text/CString.h> 39 40 using namespace WebCore; 38 41 39 42 // FIXME: We should be doing this another way. … … 54 57 NSString *webProcessAppExecutablePath = [[NSBundle bundleWithPath:webProcessAppPath] executablePath]; 55 58 59 // Make a unique, per pid, per process launcher web process service name. 60 CString serviceName = String::format("com.apple.WebKit.WebProcess-%d-%p", getpid(), this).utf8(); 61 56 62 const char* path = [webProcessAppExecutablePath fileSystemRepresentation]; 57 const char* args[] = { path, "-mode", "legacywebprocess", 0 };63 const char* args[] = { path, "-mode", "legacywebprocess", "-servicename", serviceName.data(), 0 }; 58 64 59 65 // Register ourselves. 60 kern_return_t kr = bootstrap_register2(bootstrap_port, (char*)"com.apple.WebKit.WebProcess", listeningPort, /* BOOTSTRAP_PER_PID_SERVICE */ 1);66 kern_return_t kr = bootstrap_register2(bootstrap_port, const_cast<char*>(serviceName.data()), listeningPort, 0); 61 67 if (kr) 62 68 NSLog(@"bootstrap_register2 result: %x", kr); -
trunk/WebKit2/WebProcess/mac/WebProcessMainMac.mm
r63825 r63917 39 39 #import <unistd.h> 40 40 #import <wtf/Threading.h> 41 #import <wtf/text/CString.h> 41 42 42 43 #if ENABLE(WEB_PROCESS_SANDBOX) … … 53 54 namespace WebKit { 54 55 55 int WebProcessMain(CommandLine* )56 int WebProcessMain(CommandLine* commandLine) 56 57 { 57 58 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; … … 69 70 #endif 70 71 72 String serviceName = (*commandLine)["servicename"]; 73 if (serviceName.isEmpty()) 74 return EXIT_FAILURE; 75 76 // Get the server port. 71 77 mach_port_t serverPort; 72 kern_return_t kr = bootstrap_look_up2(bootstrap_port, "com.apple.WebKit.WebProcess", &serverPort, getppid(), /* BOOTSTRAP_PER_PID_SERVICE */ 1);78 kern_return_t kr = bootstrap_look_up2(bootstrap_port, serviceName.utf8().data(), &serverPort, 0, 0); 73 79 if (kr) { 74 80 printf("bootstrap_look_up2 result: %x", kr);
Note: See TracChangeset
for help on using the changeset viewer.