mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
Back out 6d605438199c (bug 758589) for bug 759243
This commit is contained in:
parent
e788e38d05
commit
045f134b35
@ -1093,11 +1093,10 @@ nsTypedSelection::ToString(PRUnichar **aReturn)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
// We need Flush_Style here to make sure frames have been created for
|
||||
// the selected content. Use mFrameSelection->GetShell() which returns
|
||||
// null if the Selection has been disconnected (the shell is Destroyed).
|
||||
nsCOMPtr<nsIPresShell> shell =
|
||||
mFrameSelection ? mFrameSelection->GetShell() : nsnull;
|
||||
if (!shell) {
|
||||
// the selected content.
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
nsresult rv = GetPresShell(getter_AddRefs(shell));
|
||||
if (NS_FAILED(rv) || !shell) {
|
||||
*aReturn = ToNewUnicode(EmptyString());
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user