From 963ea2dbd0bda0a926001f205dc04600d9eaaafd Mon Sep 17 00:00:00 2001 From: "beidson@apple.com" Date: Tue, 17 Apr 2012 00:21:10 +0000 Subject: [PATCH] Leak in Plugin Process when launched 32-bit Reviewed by Jessie Berlin. * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): alloc/init an NSDictionary then release it, instead of leaking an autoreleased one. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114323 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebKit2/ChangeLog | 9 +++++++++ Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 877c306..48542dd 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,12 @@ +2012-04-16 Brady Eidson + + Leak in Plugin Process when launched 32-bit + + Reviewed by Jessie Berlin. + + * PluginProcess/mac/PluginProcessMainMac.mm: + (WebKit::PluginProcessMain): alloc/init an NSDictionary then release it, instead of leaking an autoreleased one. + 2012-04-16 Anders Carlsson Nightly Back/Forward no longer calls plug-in's NPP_NewStream diff --git a/Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm b/Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm index e6b394c..eee5644 100644 --- a/Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm +++ b/Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm @@ -89,8 +89,9 @@ int PluginProcessMain(const CommandLine& commandLine) WKSetDefaultLocalization(cfLocalization.get()); #if defined(__i386__) - NSDictionary *defaults = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:@"AppleMagnifiedMode"]; + NSDictionary *defaults = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"AppleMagnifiedMode", nil]; [[NSUserDefaults standardUserDefaults] registerDefaults:defaults]; + [defaults release]; #endif #if !SHOW_CRASH_REPORTER -- 2.7.4