Bug 262515
| Summary: | Fix build break for ENABLE(MEDIA_SOURCE) && !ENABLE(MANAGED_MEDIA_SOURCE) after https://commits.webkit.org/268711@main | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jigen Zhou <jigen.zhou> |
| Component: | Media | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | eric.carlson, jean-yves.avenard, tomoki.imai, webkit-bug-importer, Yousuke.Kimoto |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=262438 | ||
Jigen Zhou
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Tomoki Imai
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
Tomoki Imai
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
Radar WebKit Bug Importer
<rdar://problem/116707041>