REOPENED180211
Move DateComponents into WTF
https://bugs.webkit.org/show_bug.cgi?id=180211
Summary Move DateComponents into WTF
Christopher Reid
Reported 2017-11-30 11:47:52 PST
It is currently in platform and used by platform/text for localization
Attachments
Patch (24.45 KB, patch)
2017-11-30 17:49 PST, Christopher Reid
no flags
Patch (25.26 KB, patch)
2017-11-30 18:04 PST, Christopher Reid
no flags
Patch for landing (82.59 KB, patch)
2017-12-01 13:13 PST, Christopher Reid
no flags
Christopher Reid
Comment 1 2017-11-30 17:49:44 PST
EWS Watchlist
Comment 2 2017-11-30 17:52:31 PST
Attachment 328061 [details] did not pass style-queue: ERROR: Source/WTF/wtf/DateComponents.h:88: The parameter name "format" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WTF/wtf/DateComponents.h:123: The parameter name "ms" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WTF/wtf/DateComponents.h:125: The parameter name "ms" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WTF/wtf/DateComponents.h:127: The parameter name "ms" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WTF/wtf/DateComponents.h:129: The parameter name "ms" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WTF/wtf/DateComponents.h:131: The parameter name "ms" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WTF/wtf/DateComponents.h:134: The parameter name "ms" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WTF/wtf/DateComponents.h:137: The parameter name "months" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WTF/wtf/DateComponents.h:181: The parameter name "ms" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WTF/wtf/DateComponents.h:182: The parameter name "ms" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WTF/wtf/DateComponents.cpp:187: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/html/DateTimeInputType.h:42: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] Total errors found: 12 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Christopher Reid
Comment 3 2017-11-30 18:04:18 PST
Myles C. Maxfield
Comment 4 2017-11-30 19:02:52 PST
Comment on attachment 328062 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=328062&action=review > Source/WTF/wtf/DateComponents.hSource/WebCore/platform/DateComponents.h:70 > + WTF_EXPORT_PRIVATE int millisecond() const { return m_millisecond; } Aren't these inlined? What is the EXPORT for?
Christopher Reid
Comment 5 2017-12-01 13:00:48 PST
(In reply to Myles C. Maxfield from comment #4) > Comment on attachment 328062 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=328062&action=review > > > Source/WTF/wtf/DateComponents.hSource/WebCore/platform/DateComponents.h:70 > > + WTF_EXPORT_PRIVATE int millisecond() const { return m_millisecond; } > > Aren't these inlined? What is the EXPORT for? I thought I remembered seeing linker errors with those inlined functions, but I tried it again and it looks like I was just overzealous with what I was exporting. I'll take those out. Thanks!
Christopher Reid
Comment 6 2017-12-01 13:13:00 PST
Created attachment 328143 [details] Patch for landing
WebKit Commit Bot
Comment 7 2017-12-01 16:21:01 PST
Comment on attachment 328143 [details] Patch for landing Clearing flags on attachment: 328143 Committed r225430: <https://trac.webkit.org/changeset/225430>
WebKit Commit Bot
Comment 8 2017-12-01 16:21:02 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9 2017-12-01 16:26:49 PST
Matt Lewis
Comment 10 2017-12-05 15:51:48 PST
This caused and API failure on all Release Testers Example failure: https://build.webkit.org/builders/Apple%20High%20Sierra%20Release%20WK2%20(Tests)/builds/1556 https://build.webkit.org/builders/Apple%20High%20Sierra%20Release%20WK2%20(Tests)/builds/1556/steps/run-api-tests/logs/stdio failure: FAIL WTF.StringOperators /Volumes/Data/slave/highsierra-release/build/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp:52 Value of: wtfStringCopyCount Actual: 0 Expected: 2 string + string /Volumes/Data/slave/highsierra-release/build/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp:54 Value of: wtfStringCopyCount Actual: 0 Expected: 2 atomicString + string
Alex Christensen
Comment 11 2017-12-05 15:58:40 PST
(In reply to Matt Lewis from comment #10) > This caused and API failure on all Release Testers This is a crazy linker issue caused by WTFString.h being included in different places making the same linker symbol in different translation units with different code being generated because WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING is defined to different things. I've fixed this before, but I don't remember how. It's quite tricky.
Matt Lewis
Comment 12 2017-12-05 15:59:36 PST
Reverted r225430 for reason: This caused an API failure on release. Committed r225555: <https://trac.webkit.org/changeset/225555>
Alex Christensen
Comment 13 2017-12-05 16:00:59 PST
(In reply to Alex Christensen from comment #11) > (In reply to Matt Lewis from comment #10) > > This caused and API failure on all Release Testers > This is a crazy linker issue caused by WTFString.h being included in > different places making the same linker symbol in different translation > units with different code being generated because > WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING is defined to different things. > I've fixed this before, but I don't remember how. It's quite tricky. Actually, it might be a different issue. Either way, quite tricky.
Note You need to log in before you can comment on or make changes to this bug.