Bug 1543315 - part 9: Mark nsIPresShell::FlushPendingNotifications() as MOZ_CAN_RUN_SCRIPT r=smaug

So, this patch makes all caller of it safe including its arguments unless
they come from other methods.

Differential Revision: https://phabricator.services.mozilla.com/D27225
This commit is contained in:
Masayuki Nakano
2019-04-13 12:43:57 +00:00
parent a2279a0478
commit ad34e89b46
44 changed files with 163 additions and 112 deletions

View File

@@ -6578,7 +6578,8 @@ nsresult nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
// will cause any OnLoad(...) and PopState(...) handlers to fire.
if (!mEODForCurrentDocument && mContentViewer) {
mIsExecutingOnLoadHandler = true;
mContentViewer->LoadComplete(aStatus);
nsCOMPtr<nsIContentViewer> contentViewer = mContentViewer;
contentViewer->LoadComplete(aStatus);
mIsExecutingOnLoadHandler = false;
mEODForCurrentDocument = true;