Bug 407127 - Part 1: Refactor the editor so that it only touches mPresShellWeak in GetPresShell, to make removing it easier; r=roc
This commit is contained in:
@@ -311,7 +311,8 @@ nsHTMLEditor::HideGrabber()
|
||||
NS_ENSURE_TRUE(mGrabber, NS_ERROR_NULL_POINTER);
|
||||
|
||||
// get the presshell's document observer interface.
|
||||
nsCOMPtr<nsIPresShell> ps = do_QueryReferent(mPresShellWeak);
|
||||
nsCOMPtr<nsIPresShell> ps;
|
||||
GetPresShell(getter_AddRefs(ps));
|
||||
// We allow the pres shell to be null; when it is, we presume there
|
||||
// are no document observers to notify, but we still want to
|
||||
// UnbindFromTree.
|
||||
@@ -427,7 +428,8 @@ nsresult
|
||||
nsHTMLEditor::EndMoving()
|
||||
{
|
||||
if (mPositioningShadow) {
|
||||
nsCOMPtr<nsIPresShell> ps = do_QueryReferent(mPresShellWeak);
|
||||
nsCOMPtr<nsIPresShell> ps;
|
||||
GetPresShell(getter_AddRefs(ps));
|
||||
NS_ENSURE_TRUE(ps, NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
nsCOMPtr<nsIDOMNode> parentNode;
|
||||
|
||||
Reference in New Issue
Block a user