Bug 262515 - Fix build break for ENABLE(MEDIA_SOURCE) && !ENABLE(MANAGED_MEDIA_SOURCE) after https://commits.webkit.org/268711@main
Summary: Fix build break for ENABLE(MEDIA_SOURCE) && !ENABLE(MANAGED_MEDIA_SOURCE) aft...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-10-02 16:56 PDT by Jigen Zhou
Modified: 2023-10-09 16:57 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jigen Zhou 2023-10-02 16:56:41 PDT
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.
Comment 1 Tomoki Imai 2023-10-05 01:25:10 PDT
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
Comment 2 Tomoki Imai 2023-10-05 01:35:45 PDT
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
Comment 3 Radar WebKit Bug Importer 2023-10-09 16:57:19 PDT
<rdar://problem/116707041>