Bug 1564449, ensure the right body element is used throughout the method call, r=mccr8

This commit is contained in:
Olli Pettay 2019-08-06 16:43:01 +03:00
Родитель 8307db6f25
Коммит 2c99c9a038
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -657,7 +657,7 @@ nsresult ImageDocument::CreateSyntheticDocument() {
NS_ENSURE_SUCCESS(rv, rv);
// Add the image element
Element* body = GetBodyElement();
RefPtr<Element> body = GetBodyElement();
if (!body) {
NS_WARNING("no body on image document!");
return NS_ERROR_FAILURE;

Просмотреть файл

@ -190,7 +190,7 @@ nsresult PluginDocument::CreateSyntheticPluginDocument() {
NS_ENSURE_SUCCESS(rv, rv);
// then attach our plugin
Element* body = GetBodyElement();
RefPtr<Element> body = GetBodyElement();
if (!body) {
NS_WARNING("no body on plugin document!");
return NS_ERROR_FAILURE;

Просмотреть файл

@ -102,7 +102,7 @@ void VideoDocument::SetScriptGlobalObject(
}
nsresult VideoDocument::CreateVideoElement() {
Element* body = GetBodyElement();
RefPtr<Element> body = GetBodyElement();
if (!body) {
NS_WARNING("no body on video document!");
return NS_ERROR_FAILURE;