зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1348453 - Make the second argument to ImageBitmap::ExtensionsEnabled() optional; r=baku
This commit is contained in:
Родитель
e392d6436e
Коммит
e67d3e5c18
|
@ -14832,7 +14832,7 @@ nsGlobalWindow::CreateImageBitmap(JSContext* aCx,
|
|||
const Sequence<ChannelPixelLayout>& aLayout,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
if (!ImageBitmap::ExtensionsEnabled(aCx, nullptr)) {
|
||||
if (!ImageBitmap::ExtensionsEnabled(aCx)) {
|
||||
aRv.Throw(NS_ERROR_TYPE_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -152,7 +152,10 @@ public:
|
|||
ImageBitmap* aImageBitmap);
|
||||
|
||||
// Mozilla Extensions
|
||||
static bool ExtensionsEnabled(JSContext* aCx, JSObject* aObj);
|
||||
// aObj is an optional argument that isn't used by ExtensionsEnabled() and
|
||||
// only exists because the bindings layer insists on passing it to us. All
|
||||
// other consumers of this function should only call it passing one argument.
|
||||
static bool ExtensionsEnabled(JSContext* aCx, JSObject* aObj = nullptr);
|
||||
|
||||
friend CreateImageBitmapFromBlob;
|
||||
friend CreateImageBitmapFromBlobTask;
|
||||
|
|
|
@ -475,7 +475,7 @@ WorkerGlobalScope::CreateImageBitmap(JSContext* aCx,
|
|||
const Sequence<ChannelPixelLayout>& aLayout,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
if (!ImageBitmap::ExtensionsEnabled(aCx, nullptr)) {
|
||||
if (!ImageBitmap::ExtensionsEnabled(aCx)) {
|
||||
aRv.Throw(NS_ERROR_TYPE_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче