mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1539884 - Part 24: Mark nsIContentViewer::pageHide as can_run_script r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D134388
This commit is contained in:
parent
a34e15c597
commit
b35db1ba18
@ -958,11 +958,13 @@ class nsDocShell final : public nsDocLoader,
|
||||
// If aSkipCheckingDynEntries is true, it will not try to remove dynamic
|
||||
// subframe entries. This is to avoid redundant RemoveDynEntries calls in all
|
||||
// children docshells.
|
||||
void FirePageHideNotificationInternal(bool aIsUnload,
|
||||
bool aSkipCheckingDynEntries);
|
||||
// TODO: Convert this to MOZ_CAN_RUN_SCRIPT (bug 1415230)
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY void FirePageHideNotificationInternal(
|
||||
bool aIsUnload, bool aSkipCheckingDynEntries);
|
||||
|
||||
void ThawFreezeNonRecursive(bool aThaw);
|
||||
void FirePageHideShowNonRecursive(bool aShow);
|
||||
// TODO: Convert this to MOZ_CAN_RUN_SCRIPT (bug 1415230)
|
||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY void FirePageHideShowNonRecursive(bool aShow);
|
||||
|
||||
nsresult Dispatch(mozilla::TaskCategory aCategory,
|
||||
already_AddRefed<nsIRunnable>&& aRunnable);
|
||||
|
@ -113,7 +113,7 @@ interface nsIContentViewer : nsISupports
|
||||
*/
|
||||
readonly attribute boolean beforeUnloadFiring;
|
||||
|
||||
void pageHide(in boolean isUnload);
|
||||
[can_run_script] void pageHide(in boolean isUnload);
|
||||
|
||||
/**
|
||||
* All users of a content viewer are responsible for calling both
|
||||
|
@ -1400,7 +1400,7 @@ nsDocumentViewer::PageHide(bool aIsUnload) {
|
||||
NS_ENSURE_STATE(mDocument);
|
||||
|
||||
// First, get the window from the document...
|
||||
nsPIDOMWindowOuter* window = mDocument->GetWindow();
|
||||
RefPtr<nsPIDOMWindowOuter> window = mDocument->GetWindow();
|
||||
|
||||
if (!window) {
|
||||
// Fail if no window is available...
|
||||
@ -1427,7 +1427,8 @@ nsDocumentViewer::PageHide(bool aIsUnload) {
|
||||
|
||||
Document::PageUnloadingEventTimeStamp timestamp(mDocument);
|
||||
|
||||
EventDispatcher::Dispatch(window, mPresContext, &event, nullptr, &status);
|
||||
RefPtr<nsPresContext> presContext = mPresContext;
|
||||
EventDispatcher::Dispatch(window, presContext, &event, nullptr, &status);
|
||||
}
|
||||
|
||||
// look for open menupopups and close them after the unload event, in case
|
||||
|
Loading…
Reference in New Issue
Block a user