mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 16:17:29 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
b03f6dd26e
5 changed files with 30 additions and 13 deletions
|
|
@ -84,8 +84,9 @@ DataAtOffset(DataSourceSurface* aSurface,
|
||||||
MOZ_ASSERT(Factory::CheckSurfaceSize(aSurface->GetSize()),
|
MOZ_ASSERT(Factory::CheckSurfaceSize(aSurface->GetSize()),
|
||||||
"surface size overflows - this should have been prevented when the surface was created");
|
"surface size overflows - this should have been prevented when the surface was created");
|
||||||
|
|
||||||
uint8_t* data = aMap->mData + aPoint.y * aMap->mStride +
|
uint8_t* data = aMap->mData +
|
||||||
aPoint.x * BytesPerPixel(aSurface->GetFormat());
|
size_t(aPoint.y) * size_t(aMap->mStride) +
|
||||||
|
size_t(aPoint.x) * size_t(BytesPerPixel(aSurface->GetFormat()));
|
||||||
|
|
||||||
if (data < aMap->mData) {
|
if (data < aMap->mData) {
|
||||||
MOZ_CRASH("GFX: out-of-range data access");
|
MOZ_CRASH("GFX: out-of-range data access");
|
||||||
|
|
@ -124,22 +125,29 @@ void
|
||||||
CopySurfaceDataToPackedArray(uint8_t* aSrc, uint8_t* aDst, IntSize aSrcSize,
|
CopySurfaceDataToPackedArray(uint8_t* aSrc, uint8_t* aDst, IntSize aSrcSize,
|
||||||
int32_t aSrcStride, int32_t aBytesPerPixel)
|
int32_t aSrcStride, int32_t aBytesPerPixel)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aBytesPerPixel > 0,
|
CheckedInt<size_t> packedStride(aBytesPerPixel);
|
||||||
"Negative stride for aDst not currently supported");
|
packedStride *= aSrcSize.width;
|
||||||
MOZ_ASSERT(BufferSizeFromStrideAndHeight(aSrcStride, aSrcSize.height) > 0,
|
if (!packedStride.isValid()) {
|
||||||
"How did we end up with a surface with such a big buffer?");
|
MOZ_ASSERT(false, "Invalid stride");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int packedStride = aSrcSize.width * aBytesPerPixel;
|
CheckedInt<size_t> totalSize(aSrcStride);
|
||||||
|
totalSize *= aSrcSize.height;
|
||||||
|
if (!totalSize.isValid()) {
|
||||||
|
MOZ_ASSERT(false, "Invalid surface size");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (aSrcStride == packedStride) {
|
if (size_t(aSrcStride) == packedStride.value()) {
|
||||||
// aSrc is already packed, so we can copy with a single memcpy.
|
// aSrc is already packed, so we can copy with a single memcpy.
|
||||||
memcpy(aDst, aSrc, packedStride * aSrcSize.height);
|
memcpy(aDst, aSrc, totalSize.value());
|
||||||
} else {
|
} else {
|
||||||
// memcpy one row at a time.
|
// memcpy one row at a time.
|
||||||
for (int row = 0; row < aSrcSize.height; ++row) {
|
for (int row = 0; row < aSrcSize.height; ++row) {
|
||||||
memcpy(aDst, aSrc, packedStride);
|
memcpy(aDst, aSrc, packedStride.value());
|
||||||
aSrc += aSrcStride;
|
aSrc += aSrcStride;
|
||||||
aDst += packedStride;
|
aDst += packedStride.value();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3757,6 +3757,7 @@ CodeGenerator::visitCallNative(LCallNative* call)
|
||||||
if (jitInfo && jitInfo->type() == JSJitInfo::IgnoresReturnValueNative)
|
if (jitInfo && jitInfo->type() == JSJitInfo::IgnoresReturnValueNative)
|
||||||
native = jitInfo->ignoresReturnValueMethod;
|
native = jitInfo->ignoresReturnValueMethod;
|
||||||
}
|
}
|
||||||
|
ensureOsiSpace();
|
||||||
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, native));
|
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, native));
|
||||||
|
|
||||||
emitTracelogStopEvent(TraceLogger_Call);
|
emitTracelogStopEvent(TraceLogger_Call);
|
||||||
|
|
@ -3881,6 +3882,7 @@ CodeGenerator::visitCallDOMNative(LCallDOMNative* call)
|
||||||
masm.passABIArg(argObj);
|
masm.passABIArg(argObj);
|
||||||
masm.passABIArg(argPrivate);
|
masm.passABIArg(argPrivate);
|
||||||
masm.passABIArg(argArgs);
|
masm.passABIArg(argArgs);
|
||||||
|
ensureOsiSpace();
|
||||||
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, target->jitInfo()->method));
|
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, target->jitInfo()->method));
|
||||||
|
|
||||||
if (target->jitInfo()->isInfallible) {
|
if (target->jitInfo()->isInfallible) {
|
||||||
|
|
@ -4006,6 +4008,7 @@ CodeGenerator::visitCallGeneric(LCallGeneric* call)
|
||||||
|
|
||||||
// Finally call the function in objreg.
|
// Finally call the function in objreg.
|
||||||
masm.bind(&makeCall);
|
masm.bind(&makeCall);
|
||||||
|
ensureOsiSpace();
|
||||||
uint32_t callOffset = masm.callJit(objreg);
|
uint32_t callOffset = masm.callJit(objreg);
|
||||||
markSafepointAt(callOffset, call);
|
markSafepointAt(callOffset, call);
|
||||||
|
|
||||||
|
|
@ -4104,6 +4107,7 @@ CodeGenerator::visitCallKnown(LCallKnown* call)
|
||||||
masm.Push(Imm32(descriptor));
|
masm.Push(Imm32(descriptor));
|
||||||
|
|
||||||
// Finally call the function in objreg.
|
// Finally call the function in objreg.
|
||||||
|
ensureOsiSpace();
|
||||||
uint32_t callOffset = masm.callJit(objreg);
|
uint32_t callOffset = masm.callJit(objreg);
|
||||||
markSafepointAt(callOffset, call);
|
markSafepointAt(callOffset, call);
|
||||||
|
|
||||||
|
|
@ -4436,6 +4440,7 @@ CodeGenerator::emitApplyGeneric(T* apply)
|
||||||
masm.bind(&rejoin);
|
masm.bind(&rejoin);
|
||||||
|
|
||||||
// Finally call the function in objreg, as assigned by one of the paths above.
|
// Finally call the function in objreg, as assigned by one of the paths above.
|
||||||
|
ensureOsiSpace();
|
||||||
uint32_t callOffset = masm.callJit(objreg);
|
uint32_t callOffset = masm.callJit(objreg);
|
||||||
markSafepointAt(callOffset, apply);
|
markSafepointAt(callOffset, apply);
|
||||||
|
|
||||||
|
|
@ -11244,6 +11249,7 @@ CodeGenerator::visitGetDOMProperty(LGetDOMProperty* ins)
|
||||||
masm.passABIArg(ObjectReg);
|
masm.passABIArg(ObjectReg);
|
||||||
masm.passABIArg(PrivateReg);
|
masm.passABIArg(PrivateReg);
|
||||||
masm.passABIArg(ValueReg);
|
masm.passABIArg(ValueReg);
|
||||||
|
ensureOsiSpace();
|
||||||
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, ins->mir()->fun()));
|
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, ins->mir()->fun()));
|
||||||
|
|
||||||
if (ins->mir()->isInfallible()) {
|
if (ins->mir()->isInfallible()) {
|
||||||
|
|
|
||||||
|
|
@ -1112,7 +1112,6 @@ CodeGeneratorShared::ensureOsiSpace()
|
||||||
}
|
}
|
||||||
MOZ_ASSERT_IF(!masm.oom(),
|
MOZ_ASSERT_IF(!masm.oom(),
|
||||||
masm.currentOffset() - lastOsiPointOffset_ >= Assembler::PatchWrite_NearCallSize());
|
masm.currentOffset() - lastOsiPointOffset_ >= Assembler::PatchWrite_NearCallSize());
|
||||||
lastOsiPointOffset_ = masm.currentOffset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
|
|
@ -1124,6 +1123,7 @@ CodeGeneratorShared::markOsiPoint(LOsiPoint* ins)
|
||||||
uint32_t offset = masm.currentOffset();
|
uint32_t offset = masm.currentOffset();
|
||||||
SnapshotOffset so = ins->snapshot()->snapshotOffset();
|
SnapshotOffset so = ins->snapshot()->snapshotOffset();
|
||||||
masm.propagateOOM(osiIndices_.append(OsiIndex(offset, so)));
|
masm.propagateOOM(osiIndices_.append(OsiIndex(offset, so)));
|
||||||
|
lastOsiPointOffset_ = offset;
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ ifeq (,$(filter SunOS Linux WINNT,$(OS_ARCH)))
|
||||||
else
|
else
|
||||||
$(MAKE) stage-package make-buildinfo-file
|
$(MAKE) stage-package make-buildinfo-file
|
||||||
@echo 'Compressing...'
|
@echo 'Compressing...'
|
||||||
cd $(DIST)/$(MOZ_PKG_DIR); $(CREATE_PRECOMPLETE_CMD)
|
|
||||||
ifeq (WINNT,$(OS_ARCH))
|
ifeq (WINNT,$(OS_ARCH))
|
||||||
cd $(DIST); $(CYGWIN_WRAPPER) 7z a -t7z -m0=lzma2 -mx=9 -aoa -bb3 $(PKG_BASENAME).7z $(MOZ_PKG_DIR)
|
cd $(DIST); $(CYGWIN_WRAPPER) 7z a -t7z -m0=lzma2 -mx=9 -aoa -bb3 $(PKG_BASENAME).7z $(MOZ_PKG_DIR)
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,10 @@ stage-package: $(MOZ_PKG_MANIFEST) $(MOZ_PKG_MANIFEST_DEPS)
|
||||||
$(MOZ_PKG_MANIFEST) '$(DIST)' '$(DIST)'/$(STAGEPATH)$(MOZ_PKG_DIR)$(if $(MOZ_PKG_MANIFEST),,$(_BINPATH)) \
|
$(MOZ_PKG_MANIFEST) '$(DIST)' '$(DIST)'/$(STAGEPATH)$(MOZ_PKG_DIR)$(if $(MOZ_PKG_MANIFEST),,$(_BINPATH)) \
|
||||||
$(if $(filter omni,$(MOZ_PACKAGER_FORMAT)),$(if $(NON_OMNIJAR_FILES),--non-resource $(NON_OMNIJAR_FILES)))
|
$(if $(filter omni,$(MOZ_PACKAGER_FORMAT)),$(if $(NON_OMNIJAR_FILES),--non-resource $(NON_OMNIJAR_FILES)))
|
||||||
$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/find-dupes.py $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)
|
$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/find-dupes.py $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)
|
||||||
|
ifneq (Darwin, $(OS_ARCH))
|
||||||
|
# We don't want to do this on Mac as it will end up in the package root which is not how Mac packages things
|
||||||
|
cd $(DIST)/$(MOZ_PKG_DIR) && $(CREATE_PRECOMPLETE_CMD)
|
||||||
|
endif
|
||||||
ifdef MOZ_PACKAGE_JSSHELL
|
ifdef MOZ_PACKAGE_JSSHELL
|
||||||
# Package JavaScript Shell
|
# Package JavaScript Shell
|
||||||
@echo 'Packaging JavaScript Shell...'
|
@echo 'Packaging JavaScript Shell...'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue