зеркало из https://github.com/mozilla/gecko-dev.git
Bug 793866 - Missing null check in mozInlineSpellChecker::UpdateCurrentDictionary(); r=ehsan
This commit is contained in:
Родитель
4766ff4681
Коммит
117e69b7e2
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
var b = document.body;
|
||||
b.contentEditable = "true";
|
||||
document.execCommand("contentReadOnly", false, null);
|
||||
b.focus();
|
||||
b.contentEditable = "false";
|
||||
document.documentElement.contentEditable = "true";
|
||||
document.createDocumentFragment().appendChild(b);
|
||||
document.documentElement.focus();
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();"></body>
|
||||
</html>
|
|
@ -35,3 +35,4 @@ load 766795.html
|
|||
load 767169.html
|
||||
load 769967.xhtml
|
||||
load 768748.html
|
||||
needs-focus load 793866.html
|
||||
|
|
|
@ -1780,10 +1780,12 @@ NS_IMETHODIMP mozInlineSpellChecker::UpdateCurrentDictionary()
|
|||
previousDictionary.Truncate();
|
||||
}
|
||||
|
||||
// This might set mSpellCheck to null (bug 793866)
|
||||
nsresult rv = mSpellCheck->UpdateCurrentDictionary();
|
||||
|
||||
nsAutoString currentDictionary;
|
||||
if (NS_FAILED(mSpellCheck->GetCurrentDictionary(currentDictionary))) {
|
||||
if (!mSpellCheck ||
|
||||
NS_FAILED(mSpellCheck->GetCurrentDictionary(currentDictionary))) {
|
||||
currentDictionary.Truncate();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче