mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1013326 - Move script principals APIs to jsfriendapi; r=luke
This commit is contained in:
parent
62bcd287ce
commit
3b5c74e922
@ -291,12 +291,6 @@ JS_GetFunctionScript(JSContext *cx, JS::HandleFunction fun);
|
||||
extern JS_PUBLIC_API(JSNative)
|
||||
JS_GetFunctionNative(JSContext *cx, JSFunction *fun);
|
||||
|
||||
extern JS_PUBLIC_API(JSPrincipals *)
|
||||
JS_GetScriptPrincipals(JSScript *script);
|
||||
|
||||
extern JS_PUBLIC_API(JSPrincipals *)
|
||||
JS_GetScriptOriginPrincipals(JSScript *script);
|
||||
|
||||
JS_PUBLIC_API(JSFunction *)
|
||||
JS_GetScriptFunction(JSContext *cx, JSScript *script);
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "jsfriendapi.h"
|
||||
#include "js/OldDebugAPI.h"
|
||||
#include "jsapi-tests/tests.h"
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "jsfriendapi.h"
|
||||
#include "js/OldDebugAPI.h"
|
||||
#include "jsapi-tests/tests.h"
|
||||
|
||||
|
@ -247,6 +247,18 @@ JS_SetCompartmentPrincipals(JSCompartment *compartment, JSPrincipals *principals
|
||||
compartment->isSystem = isSystem;
|
||||
}
|
||||
|
||||
JS_FRIEND_API(JSPrincipals *)
|
||||
JS_GetScriptPrincipals(JSScript *script)
|
||||
{
|
||||
return script->principals();
|
||||
}
|
||||
|
||||
JS_FRIEND_API(JSPrincipals *)
|
||||
JS_GetScriptOriginPrincipals(JSScript *script)
|
||||
{
|
||||
return script->originPrincipals();
|
||||
}
|
||||
|
||||
JS_FRIEND_API(bool)
|
||||
JS_WrapPropertyDescriptor(JSContext *cx, JS::MutableHandle<js::PropertyDescriptor> desc)
|
||||
{
|
||||
|
@ -122,6 +122,12 @@ JS_GetCompartmentPrincipals(JSCompartment *compartment);
|
||||
extern JS_FRIEND_API(void)
|
||||
JS_SetCompartmentPrincipals(JSCompartment *compartment, JSPrincipals *principals);
|
||||
|
||||
extern JS_FRIEND_API(JSPrincipals *)
|
||||
JS_GetScriptPrincipals(JSScript *script);
|
||||
|
||||
extern JS_FRIEND_API(JSPrincipals *)
|
||||
JS_GetScriptOriginPrincipals(JSScript *script);
|
||||
|
||||
/* Safe to call with input obj == nullptr. Returns non-nullptr iff obj != nullptr. */
|
||||
extern JS_FRIEND_API(JSObject *)
|
||||
JS_ObjectToInnerObject(JSContext *cx, JS::HandleObject obj);
|
||||
|
@ -512,18 +512,6 @@ JS_GetFunctionNative(JSContext *cx, JSFunction *fun)
|
||||
return fun->maybeNative();
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSPrincipals *)
|
||||
JS_GetScriptPrincipals(JSScript *script)
|
||||
{
|
||||
return script->principals();
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSPrincipals *)
|
||||
JS_GetScriptOriginPrincipals(JSScript *script)
|
||||
{
|
||||
return script->originPrincipals();
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
JS_PUBLIC_API(JSFunction *)
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "js/OldDebugAPI.h"
|
||||
|
||||
#include "nsJSPrincipals.h"
|
||||
|
Loading…
Reference in New Issue
Block a user