зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1666196 - Part 1: Move decision to cancel to ProcessHangMonitor. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90825
This commit is contained in:
Родитель
3cfb419d00
Коммит
a26f502e34
|
@ -5602,12 +5602,6 @@ void ContentParent::CancelContentJSExecutionIfRunning(
|
|||
return;
|
||||
}
|
||||
|
||||
if (!aBrowserParent->CanCancelContentJS(aNavigationType,
|
||||
aCancelContentJSOptions.mIndex,
|
||||
aCancelContentJSOptions.mUri)) {
|
||||
return;
|
||||
}
|
||||
|
||||
ProcessHangMonitor::CancelContentJSExecutionIfRunning(
|
||||
mHangMonitorActor, aBrowserParent, aNavigationType,
|
||||
aCancelContentJSOptions);
|
||||
|
|
|
@ -784,6 +784,12 @@ void HangMonitorParent::CancelContentJSExecutionIfRunning(
|
|||
const dom::CancelContentJSOptions& aCancelContentJSOptions) {
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!aBrowserParent->CanCancelContentJS(aNavigationType,
|
||||
aCancelContentJSOptions.mIndex,
|
||||
aCancelContentJSOptions.mUri)) {
|
||||
return;
|
||||
}
|
||||
|
||||
TabId id = aBrowserParent->GetTabId();
|
||||
Dispatch(NewNonOwningRunnableMethod<TabId, nsIRemoteTab::NavigationType,
|
||||
int32_t, nsIURI*, int32_t>(
|
||||
|
|
Загрузка…
Ссылка в новой задаче