Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d725750b6bcdd01d5502c7385c892bb064d9ae44
https://github.com/WebKit/WebKit/commit/d725750b6bcdd01d5502c7385c892bb064d9ae44
Author: Elijah Sawyers <[email protected]>
Date: 2026-03-09 (Mon, 09 Mar 2026)
Changed paths:
M Source/WTF/wtf/JSONValues.cpp
M Source/WTF/wtf/JSONValues.h
M Source/WebKit/UIProcess/Extensions/WebExtension.cpp
M Tools/TestWebKitAPI/Tests/WTF/JSONValue.cpp
Log Message:
-----------
Extensions with a trailing common in manifest.json don't show in Safari
https://bugs.webkit.org/show_bug.cgi?id=309203
rdar://171749937
Reviewed by Timothy Hatcher.
This patch makes it so that we can optionally loosen the requirement of
no trailing commas in JSON that's parsed with the WTF JSON parser.
We need this because previously this wasn't an error when parsing
extension manifest files; however, after 550807bc4946, that was no
longer the case. To avoid breaking older extensions that were unaware
of this being invalid JSON, we shouldn't error on trailing commas when
parsing extension manifest files.
See: https://bugs.webkit.org/show_bug.cgi?id=283935 for more information
about the caused-by.
Added new tests to validate the change.
Test: Tools/TestWebKitAPI/Tests/WTF/JSONValue.cpp
* Source/WTF/wtf/JSONValues.cpp:
(WTF::JSONImpl::Value::parseJSON):
* Source/WTF/wtf/JSONValues.h:
* Source/WebKit/UIProcess/Extensions/WebExtension.cpp:
(WebKit::WebExtension::parseManifest):
* Tools/TestWebKitAPI/Tests/WTF/JSONValue.cpp:
(TestWebKitAPI::TEST(JSONValue, ParseJSONAllowTrailingCommas)):
Canonical link: https://commits.webkit.org/308935@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications