[webkit-changes] [WebKit/WebKit] 7cfbb0: Remove JSC VM usage from LegacyCDMSessionClearKey
Yusuke Suzuki
noreply at github.com
Mon Jul 24 21:13:11 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7cfbb042f9c0cca987611f667c6e0968756b1241
https://github.com/WebKit/WebKit/commit/7cfbb042f9c0cca987611f667c6e0968756b1241
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-07-24 (Mon, 24 Jul 2023)
Changed paths:
M Source/WebCore/Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp
Log Message:
-----------
Remove JSC VM usage from LegacyCDMSessionClearKey
https://bugs.webkit.org/show_bug.cgi?id=259386
rdar://112642265
Reviewed by Darin Adler.
LegacyCDMSessionClearKey is creating JSC VM and JSGlobalObject just to parse JSON!!
This is significantly costly. JSC::VM and JSGlobalObject are large JS environments.
Instantiation takes some time & it takes memory. They should not be required just to parse JSON.
Furthermore, this code runs on GPUProcess, and this part is the sole reason why GPUProcess still
creates JSC VM.
We should just use WTF::JSON::Value.
* Source/WebCore/Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
(WebCore::CDMSessionClearKey::update):
(WebCore::CDMSessionClearKey::cachedKeyForKeyID const):
(WebCore::clearKeyVM): Deleted.
Canonical link: https://commits.webkit.org/266282@main
More information about the webkit-changes
mailing list