WebKit Bugzilla
Attachment 342175 Details for
Bug 186398
: [Cocoa] Turn on ARC for the single Objective-C++ source file in bmalloc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186398-20180607092351.patch (text/plain), 2.90 KB, created by
Darin Adler
on 2018-06-07 09:23:51 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Darin Adler
Created:
2018-06-07 09:23:51 PDT
Size:
2.90 KB
patch
obsolete
>Subversion Revision: 232581 >diff --git a/Source/bmalloc/ChangeLog b/Source/bmalloc/ChangeLog >index 2e9c829be29bbb19a22d33be55dc867c0b5bbf8c..c9ac5feac220141b84a8bbf7722283ef2e75f12d 100644 >--- a/Source/bmalloc/ChangeLog >+++ b/Source/bmalloc/ChangeLog >@@ -1,3 +1,16 @@ >+2018-06-07 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Turn on ARC for the single Objective-C++ source file in bmalloc >+ https://bugs.webkit.org/show_bug.cgi?id=186398 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Configurations/Base.xcconfig: Turn on ARC. >+ * bmalloc/ProcessCheck.mm: >+ (bmalloc::gigacageEnabledForProcess): Removed the globals from this function, >+ since it's only called once. If it was called more than once, we could optimize >+ that with a single boolean global rather than two strings and two booleans. >+ > 2018-05-29 Saam Barati <sbarati@apple.com> > > JSC should put bmalloc's scavenger into mini mode >diff --git a/Source/bmalloc/Configurations/Base.xcconfig b/Source/bmalloc/Configurations/Base.xcconfig >index 9f572893580da6a493d1b4522d804f3f95a86012..f6a3bb63278f421947bd19daa7553931870ffe0d 100644 >--- a/Source/bmalloc/Configurations/Base.xcconfig >+++ b/Source/bmalloc/Configurations/Base.xcconfig >@@ -32,6 +32,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; > > CLANG_CXX_LANGUAGE_STANDARD = gnu++14; > CLANG_CXX_LIBRARY = libc++; >+CLANG_ENABLE_OBJC_ARC = YES; > CLANG_ENABLE_OBJC_WEAK = YES; > CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; > CLANG_WARN_BOOL_CONVERSION = YES; >diff --git a/Source/bmalloc/bmalloc/ProcessCheck.mm b/Source/bmalloc/bmalloc/ProcessCheck.mm >index 5c7519c865edc57cc5b38b3ed5eb60a3202a73e9..45a9b249ce3f061627ba0035daa690f489277c69 100644 >--- a/Source/bmalloc/bmalloc/ProcessCheck.mm >+++ b/Source/bmalloc/bmalloc/ProcessCheck.mm >@@ -33,16 +33,19 @@ namespace bmalloc { > > bool gigacageEnabledForProcess() > { >- static NSString *appName = [[NSBundle mainBundle] bundleIdentifier]; >+ // Note that this function is only called once. >+ // If we wanted to make it efficient to call mroe than once, we could memoize the result in a global boolean. >+ >+ NSString *appName = [[NSBundle mainBundle] bundleIdentifier]; > if (appName) { >- static bool isWebProcess = [appName isEqualToString:@"com.apple.WebKit.WebContent.Development"] >+ bool isWebProcess = [appName isEqualToString:@"com.apple.WebKit.WebContent.Development"] > || [appName isEqualToString:@"com.apple.WebKit.WebContent"] > || [appName isEqualToString:@"com.apple.WebProcess"]; > return isWebProcess; > } > >- static NSString *processName = [[NSProcessInfo processInfo] processName]; >- static bool isOptInBinary = [processName isEqualToString:@"jsc"] >+ NSString *processName = [[NSProcessInfo processInfo] processName]; >+ bool isOptInBinary = [processName isEqualToString:@"jsc"] > || [processName isEqualToString:@"wasm"] > || [processName hasPrefix:@"test"]; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
saam
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186398
: 342175