Realm.h 1018 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2. * vim: set ts=8 sts=4 et sw=4 tw=99:
  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/. */
  6. /*
  7. * Ways to get various per-Realm objects. All the getters declared in this
  8. * header operate on the Realm corresponding to the current compartment on the
  9. * JSContext.
  10. */
  11. #ifndef js_Realm_h
  12. #define js_Realm_h
  13. #include "jstypes.h"
  14. struct JSContext;
  15. class JSObject;
  16. namespace JS {
  17. extern JS_PUBLIC_API(JSObject*)
  18. GetRealmObjectPrototype(JSContext* cx);
  19. extern JS_PUBLIC_API(JSObject*)
  20. GetRealmFunctionPrototype(JSContext* cx);
  21. extern JS_PUBLIC_API(JSObject*)
  22. GetRealmArrayPrototype(JSContext* cx);
  23. extern JS_PUBLIC_API(JSObject*)
  24. GetRealmErrorPrototype(JSContext* cx);
  25. extern JS_PUBLIC_API(JSObject*)
  26. GetRealmIteratorPrototype(JSContext* cx);
  27. } // namespace JS
  28. #endif // js_Realm_h