diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /toolkit/components/sessionstore/SessionStoreListener.cpp | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/sessionstore/SessionStoreListener.cpp')
-rw-r--r-- | toolkit/components/sessionstore/SessionStoreListener.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/toolkit/components/sessionstore/SessionStoreListener.cpp b/toolkit/components/sessionstore/SessionStoreListener.cpp index 11b9966954..c8135752f5 100644 --- a/toolkit/components/sessionstore/SessionStoreListener.cpp +++ b/toolkit/components/sessionstore/SessionStoreListener.cpp @@ -24,7 +24,7 @@ #include "nsIXULRuntime.h" #include "nsPresContext.h" #include "nsPrintfCString.h" -#include "SessionStoreFunctions.h" +#include "nsISessionStoreFunctions.h" using namespace mozilla; using namespace mozilla::dom; @@ -436,9 +436,13 @@ void TabListener::UpdateSessionStore(bool aIsFlush) { data.mIsPrivate.Construct() = mSessionStore->GetPrivateModeEnabled(); } - nsCOMPtr<nsISessionStoreFunctions> funcs = do_ImportESModule( - "resource://gre/modules/SessionStoreFunctions.sys.mjs", fallible); - nsCOMPtr<nsIXPConnectWrappedJS> wrapped = do_QueryInterface(funcs); + nsCOMPtr<nsISessionStoreFunctions> sessionStoreFuncs = + do_GetService("@mozilla.org/toolkit/sessionstore-functions;1"); + if (!sessionStoreFuncs) { + return; + } + nsCOMPtr<nsIXPConnectWrappedJS> wrapped = + do_QueryInterface(sessionStoreFuncs); if (!wrapped) { return; } @@ -456,7 +460,7 @@ void TabListener::UpdateSessionStore(bool aIsFlush) { JS::Rooted<JS::Value> key(jsapi.cx(), context->Canonical()->Top()->PermanentKey()); - nsresult rv = funcs->UpdateSessionStore( + nsresult rv = sessionStoreFuncs->UpdateSessionStore( mOwnerContent, context, key, mEpoch, mSessionStore->GetAndClearSHistoryChanged(), update); if (NS_FAILED(rv)) { |