зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1646481: Stop walking in-process-parent-document chain in RegisterFrameCaptureListener. r=emilio
GetRootPresContext essentially does this anyway. Differential Revision: https://phabricator.services.mozilla.com/D80066
This commit is contained in:
Родитель
5c39c6a9eb
Коммит
ca3f481eb2
|
@ -1181,11 +1181,12 @@ nsresult HTMLCanvasElement::RegisterFrameCaptureListener(
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
while (doc->GetInProcessParentDocument()) {
|
||||
doc = doc->GetInProcessParentDocument();
|
||||
PresShell* shell = nsContentUtils::FindPresShellForDocument(doc);
|
||||
if (!shell) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsPresContext* context = doc->GetPresContext();
|
||||
nsPresContext* context = shell->GetPresContext();
|
||||
if (!context) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче