Bug 1233613 - Locate parent document before getting presentation shell for canvas capture. r=mt

--HG--
extra : commitid : KHfLYnTxrYk
extra : rebase_source : b2193d6e9902a24ae4d824a72d642c02f521ba98
This commit is contained in:
Andreas Pehrson 2015-12-22 11:29:26 +08:00
parent 1c7da5116a
commit 4127d0eaa2

View File

@ -1149,6 +1149,10 @@ HTMLCanvasElement::RegisterFrameCaptureListener(FrameCaptureListener* aListener)
return NS_ERROR_FAILURE;
}
while (doc->GetParentDocument()) {
doc = doc->GetParentDocument();
}
nsIPresShell* shell = doc->GetShell();
if (!shell) {
return NS_ERROR_FAILURE;