Skip to content
Permalink
Browse files
Reviewed by Tim Hatcher.
        - fix <rdar://problem/5725996> crash every time you open the Xcode documentation window

        * WebView/WebView.mm:
        (-[WebView _userAgentWithApplicationName:andWebKitVersion:]): Work around a bug in the
        garbage collector's Objective C++ support by not initializing a static to an object
        that needs to be marked when running under GC.



Canonical link: https://commits.webkit.org/23930@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
darinadler committed Feb 10, 2008
1 parent d7481aa commit b96e62770eabbd708c2c72c19c784213722ea79d
Showing with 16 additions and 1 deletion.
  1. +11 −0 WebKit/mac/ChangeLog
  2. +5 −1 WebKit/mac/WebView/WebView.mm
@@ -1,3 +1,14 @@
2008-02-09 Darin Adler <darin@apple.com>

Reviewed by Tim Hatcher.

- fix <rdar://problem/5725996> crash every time you open the Xcode documentation window

* WebView/WebView.mm:
(-[WebView _userAgentWithApplicationName:andWebKitVersion:]): Work around a bug in the
garbage collector's Objective C++ support by not initializing a static to an object
that needs to be marked when running under GC.

2008-02-05 Dan Bernstein <mitz@apple.com>

Reviewed by Darin Adler.
@@ -4103,7 +4103,11 @@ static inline int callGestalt(OSType selector)

- (NSString *)_userAgentWithApplicationName:(NSString *)applicationName andWebKitVersion:(NSString *)version
{
static NSString *osVersion = createMacOSXVersionString();
// Note: Do *not* move the initialization of osVersion into the declaration.
// Garbage collection won't correctly mark the global variable in that case <rdar://problem/5733674>.
static NSString *osVersion;
if (!osVersion)
version = createMacOSXVersionString();
NSString *language = [NSUserDefaults _webkit_preferredLanguageCode];
if ([applicationName length])
return [NSString stringWithFormat:@"Mozilla/5.0 (Macintosh; U; " PROCESSOR " Mac OS X %@; %@) AppleWebKit/%@ (KHTML, like Gecko) %@",

0 comments on commit b96e627

Please sign in to comment.