Bug 1835710 - Cancel off-thread JIT compilation before changing nursery allocation...
[gecko.git] / dom / base / ParentProcessMessageManager.h
blobd1cbc5808fc6971b10d942c6c07c90addbad2173
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_ParentProcessMessageManager_h
8 #define mozilla_dom_ParentProcessMessageManager_h
10 #include "mozilla/dom/MessageBroadcaster.h"
12 namespace mozilla::dom {
14 /**
15 * Implementation for the WebIDL ParentProcessMessageManager interface.
16 * ParentProcessMessageManager is used in a parent process to communicate with
17 * all the child processes.
19 class ParentProcessMessageManager final : public MessageBroadcaster {
20 public:
21 ParentProcessMessageManager();
23 virtual JSObject* WrapObject(JSContext* aCx,
24 JS::Handle<JSObject*> aGivenProto) override;
26 // ProcessScriptLoader
27 void LoadProcessScript(const nsAString& aUrl, bool aAllowDelayedLoad,
28 mozilla::ErrorResult& aError) {
29 LoadScript(aUrl, aAllowDelayedLoad, false, aError);
31 void RemoveDelayedProcessScript(const nsAString& aURL) {
32 RemoveDelayedScript(aURL);
34 void GetDelayedProcessScripts(JSContext* aCx,
35 nsTArray<nsTArray<JS::Value>>& aScripts,
36 mozilla::ErrorResult& aError) {
37 GetDelayedScripts(aCx, aScripts, aError);
40 // GlobalProcessScriptLoader
41 using nsFrameMessageManager::GetInitialProcessData;
43 private:
44 virtual ~ParentProcessMessageManager();
47 } // namespace mozilla::dom
49 #endif // mozilla_dom_ParentProcessMessageManager_h