icecat: add release icecat-140.9.0-1gnu1 for ecne
This commit is contained in:
parent
8eb1f1732f
commit
a5f93cb214
1197 changed files with 30593 additions and 15344 deletions
|
|
@ -13,6 +13,7 @@
|
|||
#include "mozilla/layers/SharedSurfacesChild.h"
|
||||
#include "mozilla/layers/SharedSurfacesParent.h"
|
||||
#include "nsDebug.h" // for NS_ABORT_OOM
|
||||
#include "mozilla/image/SurfaceCache.h"
|
||||
|
||||
#include "base/process_util.h"
|
||||
|
||||
|
|
@ -46,7 +47,7 @@ void SourceSurfaceSharedDataWrapper::Init(
|
|||
MOZ_CRASH("Invalid shared memory handle!");
|
||||
}
|
||||
|
||||
bool mapped = EnsureMapped(len);
|
||||
bool mapped = EnsureMapped();
|
||||
if ((sizeof(uintptr_t) <= 4 ||
|
||||
StaticPrefs::image_mem_shared_unmap_force_enabled_AtStartup()) &&
|
||||
len / 1024 >
|
||||
|
|
@ -77,10 +78,15 @@ void SourceSurfaceSharedDataWrapper::Init(SourceSurfaceSharedData* aSurface) {
|
|||
mBuf = aSurface->mBuf;
|
||||
}
|
||||
|
||||
bool SourceSurfaceSharedDataWrapper::EnsureMapped(size_t aLength) {
|
||||
bool SourceSurfaceSharedDataWrapper::EnsureMapped() {
|
||||
MOZ_ASSERT(!GetData());
|
||||
|
||||
if (mBufHandle.Size() < aLength) {
|
||||
auto computedStride =
|
||||
CheckedInt<int32_t>(mSize.width) * BytesPerPixel(mFormat);
|
||||
if (mSize.width < 0 || mSize.height < 0 || mStride < 0 ||
|
||||
!computedStride.isValid() || mStride < computedStride.value() ||
|
||||
!image::SurfaceCache::IsLegalSize(mSize) ||
|
||||
mBufHandle.Size() < GetAlignedDataLength()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -118,9 +124,8 @@ bool SourceSurfaceSharedDataWrapper::Map(MapType aMapType,
|
|||
SharedSurfacesParent::RemoveTracking(this);
|
||||
}
|
||||
if (!dataPtr) {
|
||||
size_t len = GetAlignedDataLength();
|
||||
if (!EnsureMapped(len)) {
|
||||
NS_ABORT_OOM(len);
|
||||
if (!EnsureMapped()) {
|
||||
NS_ABORT_OOM(GetAlignedDataLength());
|
||||
}
|
||||
dataPtr = GetData();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue