зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1348168 - Disable Mozilla custom ImageBitmap extensions that didn't go through proper API review; r=bzbarsky
This commit is contained in:
Родитель
b00f1b075f
Коммит
3c91e7a4b7
|
@ -14691,6 +14691,10 @@ nsGlobalWindow::CreateImageBitmap(const ImageBitmapSource& aImage,
|
|||
const Sequence<ChannelPixelLayout>& aLayout,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
if (!ImageBitmap::ExtensionsEnabled(nullptr, nullptr)) {
|
||||
aRv.Throw(NS_ERROR_TYPE_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
if (aImage.IsArrayBuffer() || aImage.IsArrayBufferView()) {
|
||||
return ImageBitmap::Create(this, aImage, aOffset, aLength, aFormat, aLayout,
|
||||
aRv);
|
||||
|
|
|
@ -472,6 +472,14 @@ WorkerGlobalScope::CreateImageBitmap(const ImageBitmapSource& aImage,
|
|||
const Sequence<ChannelPixelLayout>& aLayout,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
JSContext* cx = GetCurrentThreadJSContext();
|
||||
MOZ_ASSERT(cx);
|
||||
|
||||
if (!ImageBitmap::ExtensionsEnabled(cx, nullptr)) {
|
||||
aRv.Throw(NS_ERROR_TYPE_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (aImage.IsArrayBuffer() || aImage.IsArrayBufferView()) {
|
||||
return ImageBitmap::Create(this, aImage, aOffset, aLength, aFormat, aLayout,
|
||||
aRv);
|
||||
|
|
|
@ -858,12 +858,8 @@ pref("canvas.filters.enabled", true);
|
|||
pref("canvas.path.enabled", true);
|
||||
pref("canvas.capturestream.enabled", true);
|
||||
|
||||
// Disable the ImageBitmap-extensions in the release build.
|
||||
#ifdef RELEASE_OR_BETA
|
||||
// Disable the ImageBitmap-extensions for now.
|
||||
pref("canvas.imagebitmap_extensions.enabled", false);
|
||||
#else
|
||||
pref("canvas.imagebitmap_extensions.enabled", true);
|
||||
#endif
|
||||
|
||||
// We want the ability to forcibly disable platform a11y, because
|
||||
// some non-a11y-related components attempt to bring it up. See bug
|
||||
|
|
Загрузка…
Ссылка в новой задаче