Skip to content

Web Inspector: Replace MessageSource::AppCache in WebCore #47122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

rcaliman-apple
Copy link
Contributor

@rcaliman-apple rcaliman-apple commented Jun 24, 2025

b3fe8b7

Web Inspector: Replace MessageSource::AppCache in WebCore
https://bugs.webkit.org/show_bug.cgi?id=294907
rdar://154202768

Reviewed by Devin Rousso.

ApplicationCache (aka AppCache) is a deprecated feature:
https://bugs.webkit.org/show_bug.cgi?id=181764

Support for inspecting AppCache was removed from WebInspector:
https://commits.webkit.org/289820@main

With the feature is still technically available in WebCore,
it can emit some console messages on an AppCache-specific message channel.

WebInspector frontend doesn't explicitly handle them anymore.

This patch replaces the `MessageSource::AppCache` with `MessageSource::Other`
to ensure that any potential messages still get handled.

* Source/JavaScriptCore/inspector/ConsoleMessage.cpp:
(Inspector::messageSourceValue):
* Source/JavaScriptCore/inspector/protocol/Console.json:
* Source/JavaScriptCore/runtime/ConsoleClient.cpp:
(JSC::appendMessagePrefix):
* Source/JavaScriptCore/runtime/ConsoleTypes.h:
* Source/WebCore/inspector/agents/page/PageConsoleAgent.cpp:
(WebCore::PageConsoleAgent::getLoggingChannels):
* Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::abort):
(WebCore::ApplicationCacheGroup::didFinishLoadingEntry):
(WebCore::ApplicationCacheGroup::didFailLoadingEntry):
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
(WebCore::ApplicationCacheGroup::didFailLoadingManifest):
(WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
* Source/WebKit/Shared/JavaScriptCore.serialization.in:
* Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm:
(stringForMessageSource):
* Source/WebKitLegacy/mac/WebKit.exp:
* Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h:

Canonical link: https://commits.webkit.org/296659@main

e1b61af

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp ✅ 🛠 jsc-armv7
✅ 🛠 tv-sim ✅ 🧪 jsc-armv7-tests
✅ 🛠 watch
✅ 🛠 watch-sim

@rcaliman-apple rcaliman-apple self-assigned this Jun 24, 2025
@rcaliman-apple rcaliman-apple added the Web Inspector Bugs related to the WebKit Web Inspector. label Jun 24, 2025
@@ -144,7 +144,6 @@ extern NSString *WebConsoleMessageJSMessageSource;
extern NSString *WebConsoleMessageNetworkMessageSource;
extern NSString *WebConsoleMessageConsoleAPIMessageSource;
extern NSString *WebConsoleMessageStorageMessageSource;
extern NSString *WebConsoleMessageAppCacheMessageSource;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may need to keep this if there's a client elsewhere at Apple that still uses it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hesitated making changes under Source/WebKitLegacy/.
@cdumez, do we still touch that or should I leave it unchanged in this patch?

Copy link
Contributor Author

@rcaliman-apple rcaliman-apple Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may need to keep this if there's a client elsewhere at Apple that still uses it

Nobody seems to be using this anymore.

If they somehow are and hit a crash, it will be a good way to identify themselves by filing a bug so we can ask them to migrate (or revert this change if needed).

@rcaliman-apple rcaliman-apple added the merge-queue Applied to send a pull request to merge-queue label Jun 26, 2025
https://bugs.webkit.org/show_bug.cgi?id=294907
rdar://154202768

Reviewed by Devin Rousso.

ApplicationCache (aka AppCache) is a deprecated feature:
https://bugs.webkit.org/show_bug.cgi?id=181764

Support for inspecting AppCache was removed from WebInspector:
https://commits.webkit.org/289820@main

With the feature is still technically available in WebCore,
it can emit some console messages on an AppCache-specific message channel.

WebInspector frontend doesn't explicitly handle them anymore.

This patch replaces the `MessageSource::AppCache` with `MessageSource::Other`
to ensure that any potential messages still get handled.

* Source/JavaScriptCore/inspector/ConsoleMessage.cpp:
(Inspector::messageSourceValue):
* Source/JavaScriptCore/inspector/protocol/Console.json:
* Source/JavaScriptCore/runtime/ConsoleClient.cpp:
(JSC::appendMessagePrefix):
* Source/JavaScriptCore/runtime/ConsoleTypes.h:
* Source/WebCore/inspector/agents/page/PageConsoleAgent.cpp:
(WebCore::PageConsoleAgent::getLoggingChannels):
* Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::abort):
(WebCore::ApplicationCacheGroup::didFinishLoadingEntry):
(WebCore::ApplicationCacheGroup::didFailLoadingEntry):
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
(WebCore::ApplicationCacheGroup::didFailLoadingManifest):
(WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
* Source/WebKit/Shared/JavaScriptCore.serialization.in:
* Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm:
(stringForMessageSource):
* Source/WebKitLegacy/mac/WebKit.exp:
* Source/WebKitLegacy/mac/WebView/WebUIDelegatePrivate.h:

Canonical link: https://commits.webkit.org/296659@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Web-Inspector-Replace-MessageSource-AppCache-in-WebCore branch from e1b61af to b3fe8b7 Compare June 26, 2025 11:21
@webkit-commit-queue
Copy link
Collaborator

Committed 296659@main (b3fe8b7): https://commits.webkit.org/296659@main

Reviewed commits have been landed. Closing PR #47122 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit b3fe8b7 into WebKit:main Jun 26, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Web Inspector Bugs related to the WebKit Web Inspector.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants