mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 577963 - Flushing notifications can cause mPresShell to be destroyed. r=masayuki,smaug a=blocking2.0
This commit is contained in:
parent
39b2609bc8
commit
ea45199f0e
@ -88,11 +88,11 @@ nsContentEventHandler::InitCommon()
|
||||
// we need to flush the pending reflow here.
|
||||
mPresShell->FlushPendingNotifications(Flush_Layout);
|
||||
|
||||
// Flushing notifications can cause mPresShell to be destroyed (bug 577963).
|
||||
NS_ENSURE_TRUE(!mPresShell->IsDestroying(), NS_ERROR_FAILURE);
|
||||
|
||||
nsCopySupport::GetSelectionForCopy(mPresShell->GetDocument(),
|
||||
getter_AddRefs(mSelection));
|
||||
NS_ASSERTION(mSelection,
|
||||
"GetSelectionForCopy succeeded, but the result is null");
|
||||
|
||||
|
||||
nsCOMPtr<nsIDOMRange> firstRange;
|
||||
nsresult rv = mSelection->GetRangeAt(0, getter_AddRefs(firstRange));
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
|
||||
protected:
|
||||
nsPresContext* mPresContext;
|
||||
nsIPresShell* mPresShell;
|
||||
nsCOMPtr<nsIPresShell> mPresShell;
|
||||
nsCOMPtr<nsISelection> mSelection;
|
||||
nsCOMPtr<nsIRange> mFirstSelectedRange;
|
||||
nsCOMPtr<nsIContent> mRootContent;
|
||||
|
Loading…
Reference in New Issue
Block a user