RESOLVED DUPLICATE of bug 178419177681
[Settings] Replace SettingsMacros.h with a generated base class for Settings
https://bugs.webkit.org/show_bug.cgi?id=177681
Summary [Settings] Replace SettingsMacros.h with a generated base class for Settings
Sam Weinig
Reported 2017-09-29 13:42:20 PDT
[Settings] Replace SettingsMacros.h with a generated base class for Settings
Attachments
Patch (119.99 KB, patch)
2017-09-29 13:59 PDT, Sam Weinig
no flags
Patch (120.09 KB, patch)
2017-09-29 14:15 PDT, Sam Weinig
no flags
Patch (119.93 KB, patch)
2017-09-29 15:14 PDT, Sam Weinig
no flags
Patch (119.97 KB, patch)
2017-09-29 16:53 PDT, Sam Weinig
no flags
Patch (121.13 KB, patch)
2017-09-29 17:26 PDT, Sam Weinig
no flags
Patch (121.15 KB, patch)
2017-09-29 20:18 PDT, Sam Weinig
no flags
Patch (120.98 KB, patch)
2017-09-29 20:26 PDT, Sam Weinig
no flags
Patch (120.95 KB, patch)
2017-09-29 20:53 PDT, Sam Weinig
no flags
Patch (121.07 KB, patch)
2017-09-29 21:12 PDT, Sam Weinig
no flags
Patch (121.27 KB, patch)
2017-09-29 21:36 PDT, Sam Weinig
no flags
Patch (122.16 KB, patch)
2017-09-30 02:18 PDT, Sam Weinig
no flags
Patch (122.18 KB, patch)
2017-09-30 06:22 PDT, Sam Weinig
no flags
Patch (121.36 KB, patch)
2017-09-30 14:38 PDT, Sam Weinig
darin: review+
Patch (121.24 KB, patch)
2017-09-30 17:33 PDT, Sam Weinig
no flags
Sam Weinig
Comment 1 2017-09-29 13:59:54 PDT Comment hidden (obsolete)
Build Bot
Comment 2 2017-09-29 14:02:17 PDT Comment hidden (obsolete)
Sam Weinig
Comment 3 2017-09-29 14:15:05 PDT
Sam Weinig
Comment 4 2017-09-29 14:16:27 PDT
This replaces all the macros used in Settings with a generated base class. Since we are already generating code, it does not really make sense to generate macros.
Build Bot
Comment 5 2017-09-29 14:17:57 PDT Comment hidden (obsolete)
Sam Weinig
Comment 6 2017-09-29 15:14:00 PDT Comment hidden (obsolete)
Build Bot
Comment 7 2017-09-29 15:18:29 PDT Comment hidden (obsolete)
Sam Weinig
Comment 8 2017-09-29 16:53:30 PDT Comment hidden (obsolete)
Build Bot
Comment 9 2017-09-29 16:56:39 PDT Comment hidden (obsolete)
Sam Weinig
Comment 10 2017-09-29 17:26:53 PDT Comment hidden (obsolete)
Build Bot
Comment 11 2017-09-29 17:28:49 PDT Comment hidden (obsolete)
Sam Weinig
Comment 12 2017-09-29 20:18:51 PDT Comment hidden (obsolete)
Build Bot
Comment 13 2017-09-29 20:21:11 PDT Comment hidden (obsolete)
Sam Weinig
Comment 14 2017-09-29 20:22:22 PDT
There were two ways I could see removing SettingsMacros.h: 1) Generate a base class for Settings with the contents of SettingsMacros (like we do for InternalSettings with InternalSettingsGenerated) 2) Rename the existing Settings to SettingsBase, and generate Settings it self. This might have the upside of making additional includes easy, as you could always put them in the hand rolled SettingsBase. I went with option 1 for consistency with InternalSettings, but it may be something to reconsider going forward.
Sam Weinig
Comment 15 2017-09-29 20:26:25 PDT Comment hidden (obsolete)
Build Bot
Comment 16 2017-09-29 20:28:33 PDT Comment hidden (obsolete)
Sam Weinig
Comment 17 2017-09-29 20:53:30 PDT Comment hidden (obsolete)
Build Bot
Comment 18 2017-09-29 20:55:59 PDT Comment hidden (obsolete)
Sam Weinig
Comment 19 2017-09-29 21:12:21 PDT Comment hidden (obsolete)
Build Bot
Comment 20 2017-09-29 21:13:46 PDT Comment hidden (obsolete)
Sam Weinig
Comment 21 2017-09-29 21:36:18 PDT Comment hidden (obsolete)
Build Bot
Comment 22 2017-09-29 21:39:22 PDT Comment hidden (obsolete)
Sam Weinig
Comment 23 2017-09-30 02:18:16 PDT Comment hidden (obsolete)
Build Bot
Comment 24 2017-09-30 02:20:59 PDT Comment hidden (obsolete)
Sam Weinig
Comment 25 2017-09-30 06:22:44 PDT Comment hidden (obsolete)
Build Bot
Comment 26 2017-09-30 06:24:25 PDT Comment hidden (obsolete)
Sam Weinig
Comment 27 2017-09-30 14:38:56 PDT
Build Bot
Comment 28 2017-09-30 14:40:58 PDT Comment hidden (obsolete)
Darin Adler
Comment 29 2017-09-30 17:16:43 PDT
Comment on attachment 322301 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=322301&action=review I am not sure about the build failure on Windows. > Source/WebCore/ChangeLog:16 > + exists for the IDL generator, and expect and enum to be in a header of the typo: "and" -> "an" > Source/WebCore/Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:106 > + if setting.type == 'IntSize': > + return "\"IntSize.h\"" > + > + # Default to using the type name for the include > + return "\"" + setting.type + ".h\"" Looks like the IntSize special case is not needed. > Source/WebCore/Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:148 > + # FIXME: When webcoreExport is "", line has extra space. I don’t understand. That does not seem to be true.
Sam Weinig
Comment 30 2017-09-30 17:25:48 PDT
(In reply to Darin Adler from comment #29) > Comment on attachment 322301 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=322301&action=review > > I am not sure about the build failure on Windows. Yeah, me either. I'll let it run again, and check the bots. A few of the older patches worked on windows, and I was mostly just fixing Mac / iOS specific issues since then, so I have feeling it is not me, but I will figure it out. > > > Source/WebCore/ChangeLog:16 > > + exists for the IDL generator, and expect and enum to be in a header of the > > typo: "and" -> "an" Will fix. > > > Source/WebCore/Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:106 > > + if setting.type == 'IntSize': > > + return "\"IntSize.h\"" > > + > > + # Default to using the type name for the include > > + return "\"" + setting.type + ".h\"" > > Looks like the IntSize special case is not needed. Oh, indeed! > > > Source/WebCore/Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:148 > > + # FIXME: When webcoreExport is "", line has extra space. > > I don’t understand. That does not seem to be true. Ha. That's a bug from the old SettingsMacro code that had that comment and I must have copied it over. I was so happy to fix this bug. Thanks for the review.
Sam Weinig
Comment 31 2017-09-30 17:33:36 PDT
Build Bot
Comment 32 2017-09-30 17:36:47 PDT
Attachment 322304 [details] did not pass style-queue: ERROR: Source/WebCore/platform/text/TextDirection.h:30: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] ERROR: Source/WebCore/Scripts/GenerateSettings/GenerateSettingsImplementationFile.py:123: whitespace before '}' [pep8/E202] [5] ERROR: Source/WebCore/testing/InternalSettings.h:32: Bad include order. Mixing system and custom headers. [build/include_order] [4] Total errors found: 3 in 33 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 33 2017-09-30 18:13:39 PDT
Comment on attachment 322304 [details] Patch Clearing flags on attachment: 322304 Committed r222686: <http://trac.webkit.org/changeset/222686>
Ryan Haddad
Comment 34 2017-10-02 11:21:03 PDT
This change seems to have introduced a crash, seen here with http/tests/security/frameNavigation/xss-DENIED-targeted-link-navigation.html Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 com.apple.WebCore 0x0000000108e6959a WebCore::TimerBase::setNextFireTime(WTF::MonotonicTime) + 106 (Timer.cpp:379) 1 com.apple.WebCore 0x0000000108e602f7 WebCore::ThreadTimers::sharedTimerFiredInternal() + 167 (ThreadTimers.cpp:118) 2 com.apple.WebCore 0x000000010886629f WebCore::timerFired(__CFRunLoopTimer*, void*) + 31 (MainThreadSharedTimerCF.cpp:75) 3 com.apple.CoreFoundation 0x00007fffa4d34e04 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20 4 com.apple.CoreFoundation 0x00007fffa4d34a93 __CFRunLoopDoTimer + 1075 5 com.apple.CoreFoundation 0x00007fffa4d345ea __CFRunLoopDoTimers + 298 6 com.apple.CoreFoundation 0x00007fffa4d2bfc1 __CFRunLoopRun + 2081 7 com.apple.CoreFoundation 0x00007fffa4d2b544 CFRunLoopRunSpecific + 420 8 DumpRenderTree 0x000000010506fc09 runTest(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 2557 (DumpRenderTree.mm:2026) 9 DumpRenderTree 0x000000010506efcc dumpRenderTree(int, char const**) + 3219 (DumpRenderTree.mm:1290) 10 DumpRenderTree 0x000000010507071c DumpRenderTreeMain(int, char const**) + 1528 (DumpRenderTree.mm:1406) 11 libdyld.dylib 0x00007fffba8d9235 start + 1 https://build.webkit.org/results/Apple%20Sierra%20Release%20WK1%20(Tests)/r222711%20(4978)/http/tests/security/frameNavigation/xss-DENIED-targeted-link-navigation-crash-log.txt
Ryan Haddad
Comment 35 2017-10-03 13:20:01 PDT
(In reply to Ryan Haddad from comment #34) > This change seems to have introduced a crash, seen here with > http/tests/security/frameNavigation/xss-DENIED-targeted-link-navigation.html Testing a build with r222686, I can reproduce the crash with this command: run-webkit-tests --leaks -1 http/tests/security/frameNavigation I cannot reproduce with a build of r222685.
Ryan Haddad
Comment 36 2017-10-03 13:57:57 PDT
Rolled out this change (and dependent changes) in https://trac.webkit.org/changeset/222806/webkit because of the impact to EWS.
Sam Sneddon [:gsnedders]
Comment 37 2022-07-02 05:49:55 PDT
Relanded at r223607. *** This bug has been marked as a duplicate of bug 178419 ***
Note You need to log in before you can comment on or make changes to this bug.