Title: [103879] trunk/Source/WebKit2
Revision
103879
Author
[email protected]
Date
2012-01-01 11:24:00 -0800 (Sun, 01 Jan 2012)

Log Message

Improved reproting of kernel return codes.

Reviewed by Anders Carlsson.

* Platform/CoreIPC/mac/ConnectionMac.cpp:
(CoreIPC::Connection::exceptionSourceEventHandler): Added the error string to the log message.
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::create): Ditto.
* PluginProcess/mac/PluginProcessMainMac.mm:
(WebKit::PluginProcessMain): Ditto. Also changed to log to stderr.
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain): Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (103878 => 103879)


--- trunk/Source/WebKit2/ChangeLog	2012-01-01 19:03:46 UTC (rev 103878)
+++ trunk/Source/WebKit2/ChangeLog	2012-01-01 19:24:00 UTC (rev 103879)
@@ -1,3 +1,18 @@
+2012-01-01  Dan Bernstein  <[email protected]>
+
+        Improved reproting of kernel return codes.
+
+        Reviewed by Anders Carlsson.
+
+        * Platform/CoreIPC/mac/ConnectionMac.cpp:
+        (CoreIPC::Connection::exceptionSourceEventHandler): Added the error string to the log message.
+        * Platform/mac/SharedMemoryMac.cpp:
+        (WebKit::SharedMemory::create): Ditto.
+        * PluginProcess/mac/PluginProcessMainMac.mm:
+        (WebKit::PluginProcessMain): Ditto. Also changed to log to stderr.
+        * WebProcess/mac/WebProcessMainMac.mm:
+        (WebKit::WebProcessMain): Ditto.
+
 2011-12-31  Dan Bernstein  <[email protected]>
 
         Continue trying to fix the ASSERT-enabled Windows build after r103858.

Modified: trunk/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp (103878 => 103879)


--- trunk/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp	2012-01-01 19:03:46 UTC (rev 103878)
+++ trunk/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp	2012-01-01 19:24:00 UTC (rev 103879)
@@ -404,7 +404,7 @@
     // Now send along the message.
     kern_return_t kr = mach_msg(header, MACH_SEND_MSG, header->msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
     if (kr != KERN_SUCCESS) {
-        LOG_ERROR("Failed to send message to real exception port, error %x", kr);
+        LOG_ERROR("Failed to send message to real exception port. %s (%x)", mach_error_string(kr), kr);
         ASSERT_NOT_REACHED();
     }
 

Modified: trunk/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp (103878 => 103879)


--- trunk/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp	2012-01-01 19:03:46 UTC (rev 103878)
+++ trunk/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp	2012-01-01 19:24:00 UTC (rev 103879)
@@ -96,7 +96,7 @@
     mach_vm_address_t address;
     kern_return_t kr = mach_vm_allocate(mach_task_self(), &address, round_page(size), VM_FLAGS_ANYWHERE);
     if (kr != KERN_SUCCESS) {
-        LOG_ERROR("Failed to allocate mach_vm_allocate shared memory (%zu bytes) [error code: %x]", size, kr); 
+        LOG_ERROR("Failed to allocate mach_vm_allocate shared memory (%zu bytes). %s (%x)", size, mach_error_string(kr), kr); 
         return 0;
     }
 
@@ -106,7 +106,7 @@
     kr = mach_make_memory_entry_64(mach_task_self(), &memoryObjectSize, address, VM_PROT_DEFAULT, &port, MACH_PORT_NULL);
 
     if (kr != KERN_SUCCESS) {
-        LOG_ERROR("Failed to create a mach port for shared memory [error code: %x]", kr);
+        LOG_ERROR("Failed to create a mach port for shared memory. %s (%x)", mach_error_string(kr), kr);
         mach_vm_deallocate(mach_task_self(), address, round_page(size));
         return 0;
     }

Modified: trunk/Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm (103878 => 103879)


--- trunk/Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm	2012-01-01 19:03:46 UTC (rev 103878)
+++ trunk/Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm	2012-01-01 19:24:00 UTC (rev 103879)
@@ -75,7 +75,7 @@
     mach_port_t serverPort;
     kern_return_t kr = bootstrap_look_up(bootstrap_port, serviceName.utf8().data(), &serverPort);
     if (kr) {
-        printf("bootstrap_look_up result: %x", kr);
+        fprintf(stderr, "bootstrap_look_up result: %s (%x)", mach_error_string(kr), kr);
         return EXIT_FAILURE;
     }
 

Modified: trunk/Source/WebKit2/WebProcess/mac/WebProcessMainMac.mm (103878 => 103879)


--- trunk/Source/WebKit2/WebProcess/mac/WebProcessMainMac.mm	2012-01-01 19:03:46 UTC (rev 103878)
+++ trunk/Source/WebKit2/WebProcess/mac/WebProcessMainMac.mm	2012-01-01 19:24:00 UTC (rev 103879)
@@ -73,7 +73,7 @@
     mach_port_t serverPort;
     kern_return_t kr = bootstrap_look_up(bootstrap_port, serviceName.utf8().data(), &serverPort);
     if (kr) {
-        printf("bootstrap_look_up result: %x", kr);
+        fprintf(stderr, "bootstrap_look_up result: %s (%x)", mach_error_string(kr), kr);
         return 2;
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to