#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 =
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) {
StructuredCloneReadInfo cloneReadInfo(Move(response.cloneInfo()));
cloneReadInfo.mDatabase = mTransaction->Database();
@ -2804,8 +2808,6 @@ BackgroundCursorChild::HandleResponse(
response.cloneInfo(),
cloneReadInfo.mFiles);
RefPtr<IDBCursor> newCursor;
if (mCursor) {
if (mCursor->IsContinueCalled()) {
mCursor->Reset(Move(response.key()), Move(cloneReadInfo));

View File

@ -710,8 +710,6 @@ public abstract class TreeBuilder<T> 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<T> 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) {

View File

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

View File

@ -283,6 +283,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;

View File

@ -58,7 +58,8 @@ nsBaseDragService::nsBaseDragService()
mDragAction(DRAGDROP_ACTION_NONE),
mDragActionFromChildProcess(DRAGDROP_ACTION_UNINITIALIZED), mTargetSize(0,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
nsBaseDragService::EndDragSession(bool aDoneDrag)
{
if (!mDoingDrag) {
if (!mDoingDrag || mEndingSession) {
return NS_ERROR_FAILURE;
}
mEndingSession = true;
if (aDoneDrag && !mSuppressLevel) {
FireDragEventAtSource(eDragEnd);
}
@ -401,6 +404,7 @@ nsBaseDragService::EndDragSession(bool aDoneDrag)
mChildProcesses.Clear();
mDoingDrag = false;
mEndingSession = false;
mCanDrop = false;
// release the source we've been holding on to.

View File

@ -142,6 +142,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

View File

@ -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);