M1739352 M1732572(partial) M1730120 M1738237 M1737009 M1717318(partial) M1586061
This commit is contained in:
parent
f98a834454
commit
03ffdeadba
|
@ -9219,7 +9219,11 @@ nsDocShell::SetupNewViewer(nsIContentViewer* aNewViewer)
|
||||||
mContentViewer->SetNavigationTiming(mTiming);
|
mContentViewer->SetNavigationTiming(mTiming);
|
||||||
|
|
||||||
if (NS_FAILED(mContentViewer->Init(widget, bounds))) {
|
if (NS_FAILED(mContentViewer->Init(widget, bounds))) {
|
||||||
|
nsCOMPtr<nsIContentViewer> viewer = mContentViewer;
|
||||||
|
viewer->Close(nullptr);
|
||||||
|
viewer->Destroy();
|
||||||
mContentViewer = nullptr;
|
mContentViewer = nullptr;
|
||||||
|
mCurrentURI = nullptr;
|
||||||
NS_WARNING("ContentViewer Initialization failed");
|
NS_WARNING("ContentViewer Initialization failed");
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,6 +133,10 @@ nsStructuredCloneContainer::GetDataAsBase64(nsAString &aOut)
|
||||||
if (!DataLength()) {
|
if (!DataLength()) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
CheckedInt<nsAutoCString::size_type> sizeCheck(DataLength());
|
||||||
|
if (MOZ_UNLIKELY(!sizeCheck.isValid())) {
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
if (HasClonedDOMObjects()) {
|
if (HasClonedDOMObjects()) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
|
@ -209,6 +209,11 @@ FirstNon8Bit(const char16_t *str, const char16_t *end)
|
||||||
bool
|
bool
|
||||||
nsTextFragment::SetTo(const char16_t* aBuffer, int32_t aLength, bool aUpdateBidi)
|
nsTextFragment::SetTo(const char16_t* aBuffer, int32_t aLength, bool aUpdateBidi)
|
||||||
{
|
{
|
||||||
|
if (MOZ_UNLIKELY(aLength < 0 || static_cast<uint32_t>(aLength) >
|
||||||
|
NS_MAX_TEXT_FRAGMENT_LENGTH)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ReleaseText();
|
ReleaseText();
|
||||||
|
|
||||||
if (aLength == 0) {
|
if (aLength == 0) {
|
||||||
|
@ -337,9 +342,16 @@ nsTextFragment::CopyTo(char16_t *aDest, int32_t aOffset, int32_t aCount)
|
||||||
bool
|
bool
|
||||||
nsTextFragment::Append(const char16_t* aBuffer, uint32_t aLength, bool aUpdateBidi)
|
nsTextFragment::Append(const char16_t* aBuffer, uint32_t aLength, bool aUpdateBidi)
|
||||||
{
|
{
|
||||||
|
if (!aLength) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// This is a common case because some callsites create a textnode
|
// This is a common case because some callsites create a textnode
|
||||||
// with a value by creating the node and then calling AppendData.
|
// with a value by creating the node and then calling AppendData.
|
||||||
if (mState.mLength == 0) {
|
if (mState.mLength == 0) {
|
||||||
|
if (MOZ_UNLIKELY(aLength > INT32_MAX)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return SetTo(aBuffer, aLength, aUpdateBidi);
|
return SetTo(aBuffer, aLength, aUpdateBidi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1540,8 +1540,6 @@ DetachContainerRecurse(nsIDocShell *aShell)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDocumentViewer::Destroy()
|
nsDocumentViewer::Destroy()
|
||||||
{
|
{
|
||||||
NS_ASSERTION(mDocument, "No document in Destroy()!");
|
|
||||||
|
|
||||||
#ifdef NS_PRINTING
|
#ifdef NS_PRINTING
|
||||||
// Here is where we check to see if the document was still being prepared
|
// Here is where we check to see if the document was still being prepared
|
||||||
// for printing when it was asked to be destroy from someone externally
|
// for printing when it was asked to be destroy from someone externally
|
||||||
|
|
|
@ -423,8 +423,9 @@ PeerConnectionImpl::~PeerConnectionImpl()
|
||||||
destroy_timecard(mTimeCard);
|
destroy_timecard(mTimeCard);
|
||||||
mTimeCard = nullptr;
|
mTimeCard = nullptr;
|
||||||
}
|
}
|
||||||
// This aborts if not on main thread (in Debug builds)
|
|
||||||
PC_AUTO_ENTER_API_CALL_NO_CHECK();
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
|
||||||
if (PeerConnectionCtx::isActive()) {
|
if (PeerConnectionCtx::isActive()) {
|
||||||
PeerConnectionCtx::GetInstance()->mPeerConnections.erase(mHandle);
|
PeerConnectionCtx::GetInstance()->mPeerConnections.erase(mHandle);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2605,7 +2606,7 @@ PeerConnectionImpl::CloseInt()
|
||||||
void
|
void
|
||||||
PeerConnectionImpl::ShutdownMedia()
|
PeerConnectionImpl::ShutdownMedia()
|
||||||
{
|
{
|
||||||
PC_AUTO_ENTER_API_CALL_NO_CHECK();
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
|
||||||
if (!mMedia)
|
if (!mMedia)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -142,7 +142,7 @@ nsNativeAppSupportCocoa::ReOpen()
|
||||||
|
|
||||||
nsCOMPtr<nsIWidget> widget = nullptr;
|
nsCOMPtr<nsIWidget> widget = nullptr;
|
||||||
baseWindow->GetMainWidget(getter_AddRefs(widget));
|
baseWindow->GetMainWidget(getter_AddRefs(widget));
|
||||||
if (!widget) {
|
if (!widget || !widget->IsVisible()) {
|
||||||
windowList->HasMoreElements(&more);
|
windowList->HasMoreElements(&more);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -246,6 +246,11 @@ static const nsCursor sCustomCursor = eCursorCount;
|
||||||
//if (sCursorImgContainer == aCursorImage && sCursorScaleFactor == scaleFactor && mCurrentMacCursor) {
|
//if (sCursorImgContainer == aCursorImage && sCursorScaleFactor == scaleFactor && mCurrentMacCursor) {
|
||||||
if (sCursorImgContainer == aCursorImage && mCurrentMacCursor) {
|
if (sCursorImgContainer == aCursorImage && mCurrentMacCursor) {
|
||||||
// [self setMacCursor:mCurrentMacCursor]; // bug 1736049
|
// [self setMacCursor:mCurrentMacCursor]; // bug 1736049
|
||||||
|
|
||||||
|
// Native dragging can unset our cursor apparently (see bug 1739352).
|
||||||
|
if (MOZ_UNLIKELY(![mCurrentMacCursor isSet])) {
|
||||||
|
[mCurrentMacCursor set];
|
||||||
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,7 +259,7 @@ static const nsCursor sCustomCursor = eCursorCount;
|
||||||
aCursorImage->GetWidth(&width);
|
aCursorImage->GetWidth(&width);
|
||||||
aCursorImage->GetHeight(&height);
|
aCursorImage->GetHeight(&height);
|
||||||
// prevent DoS attacks
|
// prevent DoS attacks
|
||||||
if (width > 128 || height > 128) {
|
if (MOZ_UNLIKELY(width > 128 || height > 128)) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,13 @@ nsAppShellService::EnsurePrivateHiddenWindow()
|
||||||
nsresult
|
nsresult
|
||||||
nsAppShellService::CreateHiddenWindowHelper(bool aIsPrivate)
|
nsAppShellService::CreateHiddenWindowHelper(bool aIsPrivate)
|
||||||
{
|
{
|
||||||
|
if (!aIsPrivate && mHiddenWindow) {
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
if (aIsPrivate && mHiddenPrivateWindow) {
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
int32_t initialHeight = 100, initialWidth = 100;
|
int32_t initialHeight = 100, initialWidth = 100;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue