MSE-in-Workers: Avoid StringImpl refcount race in isTypeSupported
HTMLMediaElement::GetSupportsType is used from MediaSource::isTypeSupported(). Historically, MediaSource.isTypeSupported() was allowed only on the main "window" thread, but this is changing with MSE-in-Workers. Tests of experimental MSE-in-Workers revealed a refcount race on a DEFINE_STATIC_LOCAL String in GetSupportsType. This change instead uses a String built on the stack to continue to support simultaneous queries without racing a shared StringImpl's refcount. This should also help at least prevent further regression tracked previously in bug 809912. BUG=878133,809912 Change-Id: I35f6aff46d0a65dfc591a271d470dae24c75089c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2469453Reviewed-by:Philip Jägenstedt <foolip@chromium.org> Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org> Cr-Commit-Position: refs/heads/master@{#817578}
Showing
Please register or sign in to comment