diff --git a/dom/indexedDB/ActorsChild.cpp b/dom/indexedDB/ActorsChild.cpp index cd730eec3e..2cf30919ab 100644 --- a/dom/indexedDB/ActorsChild.cpp +++ b/dom/indexedDB/ActorsChild.cpp @@ -2257,12 +2257,14 @@ BackgroundCursorChild::HandleResponse( StructuredCloneReadInfo cloneReadInfo(Move(response.cloneInfo())); + // If a new cursor is created, we need to keep a reference to it until the + // ResultHelper creates a DOM Binding. + nsRefPtr newCursor; + ConvertActorsToBlobs(mTransaction->Database(), response.cloneInfo(), cloneReadInfo.mFiles); - nsRefPtr newCursor; - if (mCursor) { mCursor->Reset(Move(response.key()), Move(cloneReadInfo)); } else { diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h index 633c1cb049..0de6537db7 100644 --- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -8501,11 +8501,6 @@ class MStoreElementHole MDefinition* value() const { return getOperand(3); } - AliasSet getAliasSet() const override { - // StoreElementHole can update the initialized length, the array length - // or reallocate obj->elements. - return AliasSet::Store(AliasSet::Element | AliasSet::ObjectFields); - } ALLOW_CLONE(MStoreElementHole) }; diff --git a/parser/html/javasrc/TreeBuilder.java b/parser/html/javasrc/TreeBuilder.java index c9202e3756..d6e60673b6 100644 --- a/parser/html/javasrc/TreeBuilder.java +++ b/parser/html/javasrc/TreeBuilder.java @@ -710,8 +710,6 @@ public abstract class TreeBuilder implements TokenHandler, contextName); } } - contextName = null; - contextNode = null; } else { mode = INITIAL; // If we are viewing XML source, put a foreign element permanently @@ -1617,8 +1615,6 @@ public abstract class TreeBuilder implements TokenHandler, * @see nu.validator.htmlparser.common.TokenHandler#endTokenization() */ public final void endTokenization() throws SAXException { - formPointer = null; - headPointer = null; deepTreeSurrogateParent = null; templateModeStack = null; if (stack != null) { diff --git a/parser/html/nsHtml5TreeBuilder.cpp b/parser/html/nsHtml5TreeBuilder.cpp index 9d2bafd255..c14544717e 100644 --- a/parser/html/nsHtml5TreeBuilder.cpp +++ b/parser/html/nsHtml5TreeBuilder.cpp @@ -140,8 +140,6 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self) tokenizer->setStateAndEndTagExpectation(NS_HTML5TOKENIZER_DATA, contextName); } } - contextName = nullptr; - contextNode = nullptr; } else { mode = NS_HTML5TREE_BUILDER_INITIAL; if (tokenizer->isViewingXmlSource()) { @@ -577,6 +575,8 @@ nsHtml5TreeBuilder::endTokenization() { formPointer = nullptr; headPointer = nullptr; + contextName = nullptr; + contextNode = nullptr; deepTreeSurrogateParent = nullptr; templateModeStack = nullptr; if (stack) { diff --git a/security/manager/ssl/src/SSLServerCertVerification.cpp b/security/manager/ssl/src/SSLServerCertVerification.cpp index 91a3b20e5e..daec5bcd2c 100644 --- a/security/manager/ssl/src/SSLServerCertVerification.cpp +++ b/security/manager/ssl/src/SSLServerCertVerification.cpp @@ -982,6 +982,7 @@ GatherBaselineRequirementsTelemetry(const ScopedCERTCertList& certList) // According to DNS.h, this includes space for the null-terminator char buf[net::kNetAddrMaxCStrBufSize] = { 0 }; PRNetAddr addr; + memset(&addr, 0, sizeof(addr)); if (currentName->name.other.len == 4) { addr.inet.family = PR_AF_INET; memcpy(&addr.inet.ip, currentName->name.other.data, diff --git a/security/manager/ssl/src/TransportSecurityInfo.cpp b/security/manager/ssl/src/TransportSecurityInfo.cpp index 502b489260..868e20e42a 100644 --- a/security/manager/ssl/src/TransportSecurityInfo.cpp +++ b/security/manager/ssl/src/TransportSecurityInfo.cpp @@ -24,6 +24,7 @@ #include "nsServiceManagerUtils.h" #include "nsXULAppAPI.h" #include "PSMRunnable.h" +#include "mozilla/net/DNS.h" #include "secerr.h" @@ -681,8 +682,10 @@ GetSubjectAltNames(CERTCertificate *nssCert, case certIPAddress: { - char buf[INET6_ADDRSTRLEN]; + // According to DNS.h, this includes space for the null-terminator + char buf[net::kNetAddrMaxCStrBufSize] = {0}; PRNetAddr addr; + memset(&addr, 0, sizeof(addr)); if (current->name.other.len == 4) { addr.inet.family = PR_AF_INET; memcpy(&addr.inet.ip, current->name.other.data, current->name.other.len); diff --git a/security/manager/ssl/src/nsNSSCertHelper.cpp b/security/manager/ssl/src/nsNSSCertHelper.cpp index fe15c9e0f7..41be5128cf 100644 --- a/security/manager/ssl/src/nsNSSCertHelper.cpp +++ b/security/manager/ssl/src/nsNSSCertHelper.cpp @@ -19,6 +19,7 @@ #include "nsIDateTimeFormat.h" #include "nsDateTimeFormatCID.h" #include "nsServiceManagerUtils.h" +#include "mozilla/net/DNS.h" #include using namespace mozilla; @@ -1035,8 +1036,9 @@ ProcessGeneralName(PLArenaPool *arena, break; case certIPAddress: { - char buf[INET6_ADDRSTRLEN]; PRStatus status = PR_FAILURE; + // According to DNS.h, this includes space for the null-terminator + char buf[net::kNetAddrMaxCStrBufSize] = {0}; PRNetAddr addr; memset(&addr, 0, sizeof(addr)); nssComponent->GetPIPNSSBundleString("CertDumpIPAddress", key); diff --git a/toolkit/components/startup/nsAppStartup.cpp b/toolkit/components/startup/nsAppStartup.cpp index 84b6e36df1..00e85a436b 100644 --- a/toolkit/components/startup/nsAppStartup.cpp +++ b/toolkit/components/startup/nsAppStartup.cpp @@ -282,6 +282,11 @@ nsAppStartup::Run(void) return rv; } + // Make sure that the appropriate quit notifications have been dispatched + // regardless of whether the event loop has spun or not. Note that this call + // is a no-op if Quit has already been called previously. + Quit(eForceQuit); + nsresult retval = NS_OK; if (mRestart) { retval = NS_SUCCESS_RESTART_APP; diff --git a/widget/nsBaseDragService.cpp b/widget/nsBaseDragService.cpp index 4097f4944d..8df981878c 100644 --- a/widget/nsBaseDragService.cpp +++ b/widget/nsBaseDragService.cpp @@ -53,7 +53,8 @@ nsBaseDragService::nsBaseDragService() mHasImage(false), mUserCancelled(false), mDragAction(DRAGDROP_ACTION_NONE), mTargetSize(0,0), mImageX(0), mImageY(0), mScreenX(-1), mScreenY(-1), mSuppressLevel(0), - mInputSource(nsIDOMMouseEvent::MOZ_SOURCE_MOUSE) + mInputSource(nsIDOMMouseEvent::MOZ_SOURCE_MOUSE), + mEndingSession(false) { } @@ -332,10 +333,12 @@ nsBaseDragService::OpenDragPopup() NS_IMETHODIMP nsBaseDragService::EndDragSession(bool aDoneDrag) { - if (!mDoingDrag) { + if (!mDoingDrag || mEndingSession) { return NS_ERROR_FAILURE; } + mEndingSession = true; + if (aDoneDrag && !mSuppressLevel) FireDragEventAtSource(NS_DRAGDROP_END); @@ -347,6 +350,7 @@ nsBaseDragService::EndDragSession(bool aDoneDrag) } mDoingDrag = false; + mEndingSession = false; // release the source we've been holding on to. mSourceDocument = nullptr; diff --git a/widget/nsBaseDragService.h b/widget/nsBaseDragService.h index 1e1fc120e8..d27d0950e0 100644 --- a/widget/nsBaseDragService.h +++ b/widget/nsBaseDragService.h @@ -115,6 +115,9 @@ protected: bool mCanDrop; bool mOnlyChromeDrop; bool mDoingDrag; + + // true if in EndDragSession + bool mEndingSession; // true if mImage should be used to set a drag image bool mHasImage; // true if the user cancelled the drag operation diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp index 5419710c62..404e34016e 100644 --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp @@ -1573,6 +1573,9 @@ nsLocalFile::IsExecutable(bool* aResult) // Search for any of the set of executable extensions. static const char* const executableExts[] = { "air", // Adobe AIR installer +#ifdef MOZ_WIDGET_COCOA + "fileloc", // File location files can be used to point to other files. +#endif "jar" // java application bundle }; nsDependentSubstring ext = Substring(path, dotIdx + 1);