summaryrefslogtreecommitdiff
path: root/dom/workers/SharedWorker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/workers/SharedWorker.cpp')
-rw-r--r--dom/workers/SharedWorker.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/dom/workers/SharedWorker.cpp b/dom/workers/SharedWorker.cpp
index 97df0f57fd..2fae19f291 100644
--- a/dom/workers/SharedWorker.cpp
+++ b/dom/workers/SharedWorker.cpp
@@ -22,6 +22,7 @@
using mozilla::dom::Optional;
using mozilla::dom::Sequence;
using mozilla::dom::MessagePort;
+using mozilla::dom::StructuredSerializeOptions;
using namespace mozilla;
USING_WORKERS_NAMESPACE
@@ -142,7 +143,7 @@ SharedWorker::Close()
void
SharedWorker::PostMessage(JSContext* aCx, JS::Handle<JS::Value> aMessage,
- const Optional<Sequence<JS::Value>>& aTransferable,
+ const Sequence<JSObject*>& aTransferable,
ErrorResult& aRv)
{
AssertIsOnMainThread();
@@ -152,6 +153,15 @@ SharedWorker::PostMessage(JSContext* aCx, JS::Handle<JS::Value> aMessage,
mMessagePort->PostMessage(aCx, aMessage, aTransferable, aRv);
}
+void
+SharedWorker::PostMessage(JSContext* aCx,
+ JS::Handle<JS::Value> aMessage,
+ const StructuredSerializeOptions& aOptions,
+ ErrorResult& aRv)
+{
+ PostMessage(aCx, aMessage, aOptions.mTransfer, aRv);
+}
+
NS_IMPL_ADDREF_INHERITED(SharedWorker, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(SharedWorker, DOMEventTargetHelper)