mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Issue #2197 - Part 2c: Implement StructuredSerializeOptions for ServiceWorker
Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1502802
This commit is contained in:
parent
158784cbed
commit
4d58139fe1
6 changed files with 39 additions and 2 deletions
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/dom/Promise.h"
|
||||
#include "mozilla/dom/MessagePortBinding.h"
|
||||
#include "mozilla/dom/ServiceWorkerGlobalScopeBinding.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
|
|
@ -97,6 +98,15 @@ ServiceWorker::PostMessage(JSContext* aCx, JS::Handle<JS::Value> aMessage,
|
|||
aRv = workerPrivate->SendMessageEvent(aCx, aMessage, aTransferable, Move(clientInfo));
|
||||
}
|
||||
|
||||
void
|
||||
ServiceWorker::PostMessage(JSContext* aCx,
|
||||
JS::Handle<JS::Value> aMessage,
|
||||
const StructuredSerializeOptions& aOptions,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
PostMessage(aCx, aMessage, aOptions.mTransfer, aRv);
|
||||
}
|
||||
|
||||
} // namespace workers
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue