summaryrefslogtreecommitdiff
path: root/dom/base/nsGlobalWindow.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-04-09 13:44:46 +0000
committerMoonchild <moonchild@palemoon.org>2023-04-09 13:44:46 +0000
commitbfeb62ceece166cc90de95f394c0313f35ac0fd1 (patch)
treec61991a79bfcee2ee57a5168ce87a8451adc45c6 /dom/base/nsGlobalWindow.h
parentb62bf0c4b7e70f3bfcc1915526e158712aef1211 (diff)
parentae19a0513ee353dbdee92de16fc7c1e83516a40f (diff)
downloaduxp-bfeb62ceece166cc90de95f394c0313f35ac0fd1.tar.gz
Merge pull request 'Implement `self.structuredClone()`' (#2206) from FranklinDM/UXP-contrib:work_js-structuredclone into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2206
Diffstat (limited to 'dom/base/nsGlobalWindow.h')
-rw-r--r--dom/base/nsGlobalWindow.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h
index e593890af0..63bb574dd4 100644
--- a/dom/base/nsGlobalWindow.h
+++ b/dom/base/nsGlobalWindow.h
@@ -135,6 +135,7 @@ class TabGroup;
class Timeout;
class U2F;
class WakeLock;
+struct WindowPostMessageOptions;
class Worklet;
namespace cache {
class CacheStorage;
@@ -934,7 +935,12 @@ public:
void Print(mozilla::ErrorResult& aError);
void PostMessageMoz(JSContext* aCx, JS::Handle<JS::Value> aMessage,
const nsAString& aTargetOrigin,
- const mozilla::dom::Optional<mozilla::dom::Sequence<JS::Value > >& aTransfer,
+ const mozilla::dom::Sequence<JSObject*>& aTransfer,
+ nsIPrincipal& aSubjectPrincipal,
+ mozilla::ErrorResult& aRv);
+ void PostMessageMoz(JSContext* aCx,
+ JS::Handle<JS::Value> aMessage,
+ const mozilla::dom::WindowPostMessageOptions& aOptions,
nsIPrincipal& aSubjectPrincipal,
mozilla::ErrorResult& aError);
int32_t SetTimeout(JSContext* aCx, mozilla::dom::Function& aFunction,
@@ -1178,6 +1184,10 @@ public:
const mozilla::dom::Sequence<mozilla::dom::ChannelPixelLayout>& aLayout,
mozilla::ErrorResult& aRv);
+ void StructuredClone(JSContext* aCx, JS::Handle<JS::Value> aValue,
+ const mozilla::dom::StructuredSerializeOptions& aOptions,
+ JS::MutableHandle<JS::Value> aRv,
+ mozilla::ErrorResult& aError);
// ChromeWindow bits. Do NOT call these unless your window is in
// fact an nsGlobalChromeWindow.