#587: M1513855 M1596668 M1602944 M1599420 M1595399

This commit is contained in:
Cameron Kaiser 2020-01-25 18:01:18 -08:00
parent 0d448f2baa
commit 35a4358b3d
7 changed files with 23 additions and 10 deletions

View File

@ -2796,6 +2796,10 @@ BackgroundCursorChild::HandleResponse(
auto& responses = auto& responses =
const_cast<nsTArray<ObjectStoreCursorResponse>&>(aResponses); const_cast<nsTArray<ObjectStoreCursorResponse>&>(aResponses);
// If a new cursor is created, we need to keep a reference to it until the
// ResultHelper creates a DOM Binding.
RefPtr<IDBCursor> newCursor;
for (ObjectStoreCursorResponse& response : responses) { for (ObjectStoreCursorResponse& response : responses) {
StructuredCloneReadInfo cloneReadInfo(Move(response.cloneInfo())); StructuredCloneReadInfo cloneReadInfo(Move(response.cloneInfo()));
cloneReadInfo.mDatabase = mTransaction->Database(); cloneReadInfo.mDatabase = mTransaction->Database();
@ -2804,8 +2808,6 @@ BackgroundCursorChild::HandleResponse(
response.cloneInfo(), response.cloneInfo(),
cloneReadInfo.mFiles); cloneReadInfo.mFiles);
RefPtr<IDBCursor> newCursor;
if (mCursor) { if (mCursor) {
if (mCursor->IsContinueCalled()) { if (mCursor->IsContinueCalled()) {
mCursor->Reset(Move(response.key()), Move(cloneReadInfo)); mCursor->Reset(Move(response.key()), Move(cloneReadInfo));

View File

@ -710,8 +710,6 @@ public abstract class TreeBuilder<T> implements TokenHandler,
contextName); contextName);
} }
} }
contextName = null;
contextNode = null;
} else { } else {
mode = INITIAL; mode = INITIAL;
// If we are viewing XML source, put a foreign element permanently // If we are viewing XML source, put a foreign element permanently
@ -1617,8 +1615,6 @@ public abstract class TreeBuilder<T> implements TokenHandler,
* @see nu.validator.htmlparser.common.TokenHandler#endTokenization() * @see nu.validator.htmlparser.common.TokenHandler#endTokenization()
*/ */
public final void endTokenization() throws SAXException { public final void endTokenization() throws SAXException {
formPointer = null;
headPointer = null;
deepTreeSurrogateParent = null; deepTreeSurrogateParent = null;
templateModeStack = null; templateModeStack = null;
if (stack != null) { if (stack != null) {

View File

@ -140,8 +140,6 @@ nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self)
tokenizer->setState(NS_HTML5TOKENIZER_DATA); tokenizer->setState(NS_HTML5TOKENIZER_DATA);
} }
} }
contextName = nullptr;
contextNode = nullptr;
} else { } else {
mode = NS_HTML5TREE_BUILDER_INITIAL; mode = NS_HTML5TREE_BUILDER_INITIAL;
if (tokenizer->isViewingXmlSource()) { if (tokenizer->isViewingXmlSource()) {
@ -580,6 +578,8 @@ nsHtml5TreeBuilder::endTokenization()
{ {
formPointer = nullptr; formPointer = nullptr;
headPointer = nullptr; headPointer = nullptr;
contextName = nullptr;
contextNode = nullptr;
deepTreeSurrogateParent = nullptr; deepTreeSurrogateParent = nullptr;
templateModeStack = nullptr; templateModeStack = nullptr;
if (stack) { if (stack) {

View File

@ -283,6 +283,11 @@ nsAppStartup::Run(void)
return rv; 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; nsresult retval = NS_OK;
if (mRestart) { if (mRestart) {
retval = NS_SUCCESS_RESTART_APP; retval = NS_SUCCESS_RESTART_APP;

View File

@ -58,7 +58,8 @@ nsBaseDragService::nsBaseDragService()
mDragAction(DRAGDROP_ACTION_NONE), mDragAction(DRAGDROP_ACTION_NONE),
mDragActionFromChildProcess(DRAGDROP_ACTION_UNINITIALIZED), mTargetSize(0,0), mDragActionFromChildProcess(DRAGDROP_ACTION_UNINITIALIZED), mTargetSize(0,0),
mScreenX(-1), mScreenY(-1), mSuppressLevel(0), mScreenX(-1), mScreenY(-1), mSuppressLevel(0),
mInputSource(nsIDOMMouseEvent::MOZ_SOURCE_MOUSE) mInputSource(nsIDOMMouseEvent::MOZ_SOURCE_MOUSE),
mEndingSession(false)
{ {
} }
@ -379,10 +380,12 @@ nsBaseDragService::TakeChildProcessDragAction()
NS_IMETHODIMP NS_IMETHODIMP
nsBaseDragService::EndDragSession(bool aDoneDrag) nsBaseDragService::EndDragSession(bool aDoneDrag)
{ {
if (!mDoingDrag) { if (!mDoingDrag || mEndingSession) {
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }
mEndingSession = true;
if (aDoneDrag && !mSuppressLevel) { if (aDoneDrag && !mSuppressLevel) {
FireDragEventAtSource(eDragEnd); FireDragEventAtSource(eDragEnd);
} }
@ -401,6 +404,7 @@ nsBaseDragService::EndDragSession(bool aDoneDrag)
mChildProcesses.Clear(); mChildProcesses.Clear();
mDoingDrag = false; mDoingDrag = false;
mEndingSession = false;
mCanDrop = false; mCanDrop = false;
// release the source we've been holding on to. // release the source we've been holding on to.

View File

@ -142,6 +142,9 @@ protected:
bool mCanDrop; bool mCanDrop;
bool mOnlyChromeDrop; bool mOnlyChromeDrop;
bool mDoingDrag; bool mDoingDrag;
// true if in EndDragSession
bool mEndingSession;
// true if mImage should be used to set a drag image // true if mImage should be used to set a drag image
bool mHasImage; bool mHasImage;
// true if the user cancelled the drag operation // true if the user cancelled the drag operation

View File

@ -1573,6 +1573,9 @@ nsLocalFile::IsExecutable(bool* aResult)
// Search for any of the set of executable extensions. // Search for any of the set of executable extensions.
static const char* const executableExts[] = { static const char* const executableExts[] = {
"air", // Adobe AIR installer "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 "jar" // java application bundle
}; };
nsDependentSubstring ext = Substring(path, dotIdx + 1); nsDependentSubstring ext = Substring(path, dotIdx + 1);