Commit 215375d8 authored by simon.fraser@apple.com's avatar simon.fraser@apple.com
Browse files

Log an error for a common cause of WebProcess early launch crashing in...

Log an error for a common cause of WebProcess early launch crashing in misconfigured development builds
https://bugs.webkit.org/show_bug.cgi?id=127121

Reviewed by Anders Carlsson.

A common cause of early WebProcess crashes during development is a null return
from CFBundleGetValueForInfoDictionaryKey(), so log and return an error in
this case rather than passing a null C string to dlsym().

* Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
(WebKit::BootstrapMain):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 598ec7e4
2014-01-16 Simon Fraser <simon.fraser@apple.com>
Log an error for a common cause of WebProcess early launch crashing in misconfigured development builds
https://bugs.webkit.org/show_bug.cgi?id=127121
Reviewed by Anders Carlsson.
A common cause of early WebProcess crashes during development is a null return
from CFBundleGetValueForInfoDictionaryKey(), so log and return an error in
this case rather than passing a null C string to dlsym().
* Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
(WebKit::BootstrapMain):
2014-01-21 Tim Horton <timothy_horton@apple.com>
 
Sort headers after the rename that happened in r162454.
......
......@@ -66,6 +66,11 @@ static int BootstrapMain(int argc, char** argv)
BootstrapMainFunction bootstrapMainFunction;
@autoreleasepool {
NSString *entryPointFunctionName = (NSString *)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), CFSTR("WebKitEntryPoint"));
if (![entryPointFunctionName length]) {
NSLog(@"Failed to get value for \"WebKitEntryPoint\" from bundle dictionary %@", CFBundleGetLocalInfoDictionary(CFBundleGetMainBundle()));
return EXIT_FAILURE;
}
bootstrapMainFunction = reinterpret_cast<BootstrapMainFunction>(dlsym(frameworkLibrary, [entryPointFunctionName UTF8String]));
if (!bootstrapMainFunction) {
NSLog(@"Unable to find entry point '%s' in WebKit2.framework: %s\n", [entryPointFunctionName UTF8String], dlerror());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment