We should use NeverDestroyed everywhere instead of DEPRECATED_DEFINE_STATIC_LOCAL, to ameliorate heap fragmentation from lazily instantiated statics.
Yes please
Created attachment 268554 [details] Patch Almost all done with regex, let's see what EWS thinks..
Attachment 268554 [details] did not pass style-queue: ERROR: Source/WebCore/platform/network/HTTPParsers.cpp:39: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp:44: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/page/ContentSecurityPolicy.cpp:49: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/platform/graphics/GraphicsLayer.cpp:38: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/rendering/style/RenderStyle.h:72: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 5 in 174 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 268563 [details] Patch
Created attachment 268567 [details] Patch
Created attachment 268570 [details] Patch
Created attachment 268573 [details] Patch
Created attachment 268576 [details] Patch
Created attachment 268581 [details] Patch
Created attachment 268608 [details] Patch
Comment on attachment 268608 [details] Patch Clearing flags on attachment: 268608 Committed r194819: <http://trac.webkit.org/changeset/194819>
All reviewed patches have been landed. Closing bug.
Reopening to attach more patch.
Created attachment 268628 [details] Patch 2 (convert some more code)
Attachment 268628 [details] did not pass style-queue: ERROR: Source/WebCore/svg/properties/SVGAnimatedPropertyMacros.h:98: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm:68: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 2 in 20 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 268634 [details] Patch 2 (convert some more code)
Attachment 268634 [details] did not pass style-queue: ERROR: Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h:33: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/svg/properties/SVGAnimatedPropertyMacros.h:98: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 2 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 268634 [details] Patch 2 (convert some more code) View in context: https://bugs.webkit.org/attachment.cgi?id=268634&action=review > Source/WebCore/svg/properties/SVGAnimatedPropertyMacros.h:92 > + static NeverDestroyed<const SVGPropertyInfo> s_propertyInfo = SVGPropertyInfo \ Why the " = SVGPropertyInfo"? > Source/WebKit/mac/Misc/WebNSPasteboardExtras.mm:71 > - DEPRECATED_DEFINE_STATIC_LOCAL(RetainPtr<NSArray>, types, ([[NSArray alloc] initWithObjects: > + static NeverDestroyed<RetainPtr<NSArray>> types([[NSArray alloc] initWithObjects: > WebURLsWithTitlesPboardType, > NSURLPboardType, > WebURLPboardType, > WebURLNamePboardType, > NSStringPboardType, > - nil])); > - return types.get(); > + nil]); > + return types.get().get(); Even better here would be a plain old static NSArray * storing a leaked value. > Source/WebKit/mac/Misc/WebNSPasteboardExtras.mm:84 > - DEPRECATED_DEFINE_STATIC_LOCAL(RetainPtr<NSArray>, types, (_createWritableTypesForImageWithoutArchive())); > - return types.get(); > + static NeverDestroyed<RetainPtr<NSArray>> types(_createWritableTypesForImageWithoutArchive()); > + return types.get().get(); Ditto. > Source/WebKit/mac/Misc/WebNSPasteboardExtras.mm:98 > - DEPRECATED_DEFINE_STATIC_LOCAL(RetainPtr<NSArray>, types, (_createWritableTypesForImageWithArchive())); > - return types.get(); > + static NeverDestroyed<RetainPtr<NSArray>> types(_createWritableTypesForImageWithArchive()); > + return types.get().get(); Ditto.
Created attachment 268644 [details] Patch 2 for landing
Attachment 268644 [details] did not pass style-queue: ERROR: Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h:33: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/WebCore/svg/properties/SVGAnimatedPropertyMacros.h:98: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 2 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 268644 [details] Patch 2 for landing Clearing flags on attachment: 268644 Committed r194826: <http://trac.webkit.org/changeset/194826>
Looks like this was a decent PLT regression: <rdar://problem/24150482>
Re-opened since this is blocked by bug 153020
Rolled back in: https://trac.webkit.org/r194987.