Changeset 254254 in webkit
- Timestamp:
- Jan 9, 2020, 3:47:31 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/UIProcess/mac/WebPreferencesMac.mm (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/WebKitTestRunner/ios/mainIOS.mm (modified) (1 diff)
-
Tools/WebKitTestRunner/mac/main.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r254241 r254254 1 2020-01-09 David Kilzer <ddkilzer@apple.com> 2 3 WebKitTestRunner leaks objects in a top-level autoreleasePool that's never cleared 4 <https://webkit.org/b/205950> 5 <rdar://problem/50987831> 6 7 Reviewed by Joseph Pecoraro. 8 9 * UIProcess/mac/WebPreferencesMac.mm: 10 (WebKit::WebPreferences::platformInitializeStore): 11 - Add an @autoreleasepool block around the contents of 12 this method since it generates numerous autoreleased 13 objects when run. 14 1 15 2020-01-08 Yusuke Suzuki <ysuzuki@apple.com> 2 16 -
trunk/Source/WebKit/UIProcess/mac/WebPreferencesMac.mm
r247043 r254254 139 139 void WebPreferences::platformInitializeStore() 140 140 { 141 @autoreleasepool { 141 142 #define INITIALIZE_DEBUG_PREFERENCE_FROM_NSUSERDEFAULTS(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) \ 142 setDebug##TypeName##ValueIfInUserDefaults(m_identifier, m_keyPrefix, m_globalDebugKeyPrefix, WebPreferencesKey::KeyLower##Key(), m_store);143 144 FOR_EACH_WEBKIT_DEBUG_PREFERENCE(INITIALIZE_DEBUG_PREFERENCE_FROM_NSUSERDEFAULTS)143 setDebug##TypeName##ValueIfInUserDefaults(m_identifier, m_keyPrefix, m_globalDebugKeyPrefix, WebPreferencesKey::KeyLower##Key(), m_store); 144 145 FOR_EACH_WEBKIT_DEBUG_PREFERENCE(INITIALIZE_DEBUG_PREFERENCE_FROM_NSUSERDEFAULTS) 145 146 146 147 #undef INITIALIZE_DEBUG_PREFERENCE_FROM_NSUSERDEFAULTS 147 148 148 if (!m_identifier)149 return;149 if (!m_identifier) 150 return; 150 151 151 152 #define INITIALIZE_PREFERENCE_FROM_NSUSERDEFAULTS(KeyUpper, KeyLower, TypeName, Type, DefaultValue, HumanReadableName, HumanReadableDescription) \ 152 Type user##KeyUpper##Value; \153 if (platformGet##TypeName##UserValueForKey(WebPreferencesKey::KeyLower##Key(), user##KeyUpper##Value)) \154 m_store.set##TypeName##ValueForKey(WebPreferencesKey::KeyLower##Key(), user##KeyUpper##Value);155 156 FOR_EACH_WEBKIT_PREFERENCE(INITIALIZE_PREFERENCE_FROM_NSUSERDEFAULTS)153 Type user##KeyUpper##Value; \ 154 if (platformGet##TypeName##UserValueForKey(WebPreferencesKey::KeyLower##Key(), user##KeyUpper##Value)) \ 155 m_store.set##TypeName##ValueForKey(WebPreferencesKey::KeyLower##Key(), user##KeyUpper##Value); 156 157 FOR_EACH_WEBKIT_PREFERENCE(INITIALIZE_PREFERENCE_FROM_NSUSERDEFAULTS) 157 158 158 159 #undef INITIALIZE_PREFERENCE_FROM_NSUSERDEFAULTS 160 } 159 161 } 160 162 -
trunk/Tools/ChangeLog
r254251 r254254 1 2020-01-09 David Kilzer <ddkilzer@apple.com> 2 3 WebKitTestRunner leaks objects in a top-level autoreleasePool that's never cleared 4 <https://webkit.org/b/205950> 5 <rdar://problem/50987831> 6 7 Reviewed by Joseph Pecoraro. 8 9 * WebKitTestRunner/ios/mainIOS.mm: 10 (main): 11 - Add an @autoreleasepool block around a line of code 12 that generates autoreleased objects. These objects 13 would never be released for the life of the process 14 prior to this change. 15 * WebKitTestRunner/mac/main.mm: 16 (main): 17 - Move instantiation of WTR::TestController outside of 18 @autoreleasepool block so the pool can be drained 19 while running tests. Prior to this change, this 20 autoreleasePool would never be drained. 21 1 22 2020-01-08 Saam Barati <sbarati@apple.com> 2 23 -
trunk/Tools/WebKitTestRunner/ios/mainIOS.mm
r244955 r254254 67 67 _argv = argv; 68 68 69 [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"WebKitLinkedOnOrAfterEverything"]; 69 @autoreleasepool { 70 [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"WebKitLinkedOnOrAfterEverything"]; 71 } 70 72 71 73 UIApplicationMain(argc, (char**)argv, @"WebKitTestRunnerApp", @"WebKitTestRunnerApp"); -
trunk/Tools/WebKitTestRunner/mac/main.mm
r235837 r254254 65 65 setDefaultsToConsistentValuesForTesting(); 66 66 disableAppNapInUIProcess(); // For secondary processes, app nap is disabled using WKPreferencesSetPageVisibilityBasedProcessSuppressionEnabled(). 67 WTR::TestController controller(argc, argv);68 67 } 68 WTR::TestController controller(argc, argv); 69 69 return 0; 70 70 }
Note:
See TracChangeset
for help on using the changeset viewer.