mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 13:56:29 +00:00
Bug 1344604 - part2: Return empty DocumentFragment if the ConvertCueToDOMTree() return null. r=alwu
It is a regression of bug1307710, if something wrong during the ConvertCueToDOMTree() in vtt.jsm, we will get null ptr. MozReview-Commit-ID: LSQrJIhBzRU --HG-- extra : rebase_source : b0a2cf675f9288ddc9c264faaffcf97049c6c1c6
This commit is contained in:
parent
622a99a3ec
commit
098e6e6897
@ -136,6 +136,9 @@ TextTrackCue::GetCueAsHTML()
|
||||
nsCOMPtr<nsIDOMDocumentFragment> frag;
|
||||
sParserWrapper->ConvertCueToDOMTree(window, this,
|
||||
getter_AddRefs(frag));
|
||||
if (!frag) {
|
||||
return mDocument->CreateDocumentFragment();
|
||||
}
|
||||
return frag.forget().downcast<DocumentFragment>();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user