Title: [295677] trunk/Source/_javascript_Core/runtime/Options.cpp
- Revision
- 295677
- Author
- [email protected]
- Date
- 2022-06-20 17:02:18 -0700 (Mon, 20 Jun 2022)
Log Message
Fix broken --useOSLog option.
https://bugs.webkit.org/show_bug.cgi?id=241790
Reviewed by Alexey Shvayka.
Internally, --useOSLog=0 is represented as OSLogType::None. Options::dumpAllOptionsInALine()
dumps this value as "none". When "none" is later passed back to Options::setOption(), it is
rejected because useOSLog's parse function wasn't expecting "none" as an input string. The
fix is simply to add "none" to the list of allowed input strings.
Also, since OSLogType::None is a thing, it makes sense that the option should allow value
"none". This issue was manifesting as a failure when running testapi.
* Source/_javascript_Core/runtime/Options.cpp:
(JSC::parse):
Canonical link: https://commits.webkit.org/251682@main
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/runtime/Options.cpp (295676 => 295677)
--- trunk/Source/_javascript_Core/runtime/Options.cpp 2022-06-20 18:47:37 UTC (rev 295676)
+++ trunk/Source/_javascript_Core/runtime/Options.cpp 2022-06-21 00:02:18 UTC (rev 295677)
@@ -153,7 +153,7 @@
{
std::optional<OptionsStorage::OSLogType> result;
- if (equalLettersIgnoringASCIICase(string, "false"_s) || !strcmp(string, "0"))
+ if (equalLettersIgnoringASCIICase(string, "none"_s) || equalLettersIgnoringASCIICase(string, "false"_s) || !strcmp(string, "0"))
result = OSLogType::None;
else if (equalLettersIgnoringASCIICase(string, "true"_s) || !strcmp(string, "1"))
result = OSLogType::Error;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes