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 #ifndef XPC_WRAPPER_H
8 #define XPC_WRAPPER_H 1
9 
10 #include "js/TypeDecls.h"
11 
12 namespace XPCNativeWrapper {
13 
14 bool AttachNewConstructorObject(JSContext* aCx, JS::HandleObject aGlobalObject);
15 
16 }  // namespace XPCNativeWrapper
17 
18 // This namespace wraps some common functionality between the three existing
19 // wrappers. Its main purpose is to allow XPCCrossOriginWrapper to act both
20 // as an XPCSafeJSObjectWrapper and as an XPCNativeWrapper when required to
21 // do so (the decision is based on the principals of the wrapper and wrapped
22 // objects).
23 namespace XPCWrapper {
24 
25 JSObject* UnsafeUnwrapSecurityWrapper(JSObject* obj);
26 
27 }  // namespace XPCWrapper
28 
29 #endif
30