Bug 1748874 - Part 3: Mark the decl of SessionStoreRestoreData::RestoreInto as CAN_RUN_SCRIPT r=masayuki

Depends on D135402

Differential Revision: https://phabricator.services.mozilla.com/D135403
This commit is contained in:
Kagami Sascha Rosylight 2022-01-11 11:52:27 +00:00
parent fc805c5e5a
commit 1ae5ee832f
4 changed files with 5 additions and 4 deletions

View File

@ -287,7 +287,8 @@ class CanonicalBrowsingContext final : public BrowsingContext {
void SetRestoreData(SessionStoreRestoreData* aData, ErrorResult& aError);
void ClearRestoreState();
void RequestRestoreTabContent(WindowGlobalParent* aWindow);
MOZ_CAN_RUN_SCRIPT_BOUNDARY void RequestRestoreTabContent(
WindowGlobalParent* aWindow);
already_AddRefed<Promise> GetRestorePromise();
nsresult WriteSessionStorageToSessionStore(

View File

@ -187,7 +187,8 @@ class WindowGlobalChild final : public WindowGlobalActor,
const dom::sessionstore::DocShellRestoreState& aState,
RestoreDocShellStateResolver&& aResolve);
mozilla::ipc::IPCResult RecvRestoreTabContent(
// TODO: Use MOZ_CAN_RUN_SCRIPT when it gains IPDL support (bug 1539864)
MOZ_CAN_RUN_SCRIPT_BOUNDARY mozilla::ipc::IPCResult RecvRestoreTabContent(
dom::SessionStoreRestoreData* aData,
RestoreTabContentResolver&& aResolve);

View File

@ -52,7 +52,6 @@ bool SessionStoreRestoreData::CanRestoreInto(nsIURI* aDocumentURI) {
equalsExceptRef);
}
MOZ_CAN_RUN_SCRIPT
bool SessionStoreRestoreData::RestoreInto(RefPtr<BrowsingContext> aContext) {
if (!aContext->IsInProcess()) {
return false;

View File

@ -28,7 +28,7 @@ class SessionStoreRestoreData final : public nsISessionStoreRestoreData {
bool IsEmpty();
SessionStoreRestoreData* FindDataForChild(BrowsingContext* aContext);
bool CanRestoreInto(nsIURI* aDocumentURI);
bool RestoreInto(RefPtr<BrowsingContext> aContext);
MOZ_CAN_RUN_SCRIPT bool RestoreInto(RefPtr<BrowsingContext> aContext);
NS_DECL_ISUPPORTS
NS_DECL_NSISESSIONSTORERESTOREDATA