Debian Codegraph @

js/src/proxy/DOMProxy.h

raw
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/. */
6
7 /* DOM proxy details that don't need to be exported as friend API. */
8
9 #ifndef proxy_DOMProxy_h
10 #define proxy_DOMProxy_h
11
12 #include "js/friend/DOMProxy.h" // JS::DOMProxyShadowsCheck
13
14 class JS_PUBLIC_API JSObject;
15
16 namespace js {
17
18 extern const void* GetDOMProxyHandlerFamily();
19
20 extern JS::DOMProxyShadowsCheck GetDOMProxyShadowsCheck();
21
22 inline bool DOMProxyIsShadowing(JS::DOMProxyShadowsResult result) {
23 return result == JS::DOMProxyShadowsResult::Shadows ||
24 result == JS::DOMProxyShadowsResult::ShadowsViaDirectExpando ||
25 result == JS::DOMProxyShadowsResult::ShadowsViaIndirectExpando;
26 }
27
28 extern const void* GetDOMRemoteProxyHandlerFamily();
29
30 extern bool IsDOMRemoteProxyObject(JSObject* object);
31
32 } // namespace js
33
34 #endif // proxy_DOMProxy_h