The code change in https://commits.webkit.org/268711@main works if both ENABLE(MEDIA_SOURCE) && ENABLE(MANAGED_MEDIA_SOURCE), but a compiling error can be caused by the generated code.
The following code is a part of WebCore/DerivedSources/JSVideoTrack.cpp. It accesses "managedMediaSourceEnabled" without "#if ENABLE(ManagedMediaSourceEnabled)" block and causes a build failure if ENABLE(MEDIA_SOURCE) && !ENABLE(ManagedMediaSourceEnabled). #if ENABLE(MEDIA_SOURCE) if (!(downcast<Document>(jsCast<JSDOMGlobalObject*>(globalObject())->scriptExecutionContext())->settingsValues().mediaSourceEnabled || downcast<Document>(jsCast<JSDOMGlobalObject*>(globalObject())->scriptExecutionContext())->settingsValues().managedMediaSourceEnabled)) { hasDisabledRuntimeProperties = true; auto propertyName = Identifier::fromString(vm, "sourceBuffer"_s); VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable); DeletePropertySlot slot; JSObject::deleteProperty(this, globalObject(), propertyName, slot); } #endif
In WebCore/DerivedSources/Settings.h, "managedMediaSourceEnabled" is blocked by " ENABLE(MANAGED_MEDIA_SOURCE)". class Settings : public SettingsBase, public RefCounted<Settings> { struct Values { ... #if ENABLE(MANAGED_MEDIA_SOURCE) bool managedMediaSourceEnabled : 1; #endif
<rdar://problem/116707041>