mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 731898: Remove typedef jsrefcount, r=luke
This commit is contained in:
parent
74ecbd9572
commit
5c3e02ec67
@ -1073,14 +1073,14 @@ JS_YieldRequest(JSContext *cx)
|
||||
#endif
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(jsrefcount)
|
||||
JS_PUBLIC_API(unsigned)
|
||||
JS_SuspendRequest(JSContext *cx)
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
JSRuntime *rt = cx->runtime;
|
||||
JS_ASSERT(rt->onOwnerThread());
|
||||
|
||||
jsrefcount saveDepth = rt->requestDepth;
|
||||
unsigned saveDepth = rt->requestDepth;
|
||||
if (!saveDepth)
|
||||
return 0;
|
||||
|
||||
@ -1094,7 +1094,7 @@ JS_SuspendRequest(JSContext *cx)
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_ResumeRequest(JSContext *cx, jsrefcount saveDepth)
|
||||
JS_ResumeRequest(JSContext *cx, unsigned saveDepth)
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
JSRuntime *rt = cx->runtime;
|
||||
@ -4447,16 +4447,16 @@ JS_CheckAccess(JSContext *cx, JSObject *obj, jsid id, JSAccessMode mode,
|
||||
}
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
JS_PUBLIC_API(jsrefcount)
|
||||
JS_PUBLIC_API(unsigned)
|
||||
JS_HoldPrincipals(JSContext *cx, JSPrincipals *principals)
|
||||
{
|
||||
return JS_ATOMIC_INCREMENT(&principals->refcount);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(jsrefcount)
|
||||
JS_PUBLIC_API(unsigned)
|
||||
JS_DropPrincipals(JSContext *cx, JSPrincipals *principals)
|
||||
{
|
||||
jsrefcount rc = JS_ATOMIC_DECREMENT(&principals->refcount);
|
||||
unsigned rc = JS_ATOMIC_DECREMENT(&principals->refcount);
|
||||
if (rc == 0)
|
||||
principals->destroy(cx, principals);
|
||||
return rc;
|
||||
|
@ -2351,11 +2351,11 @@ JS_EndRequest(JSContext *cx);
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_YieldRequest(JSContext *cx);
|
||||
|
||||
extern JS_PUBLIC_API(jsrefcount)
|
||||
extern JS_PUBLIC_API(unsigned)
|
||||
JS_SuspendRequest(JSContext *cx);
|
||||
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_ResumeRequest(JSContext *cx, jsrefcount saveDepth);
|
||||
JS_ResumeRequest(JSContext *cx, unsigned saveDepth);
|
||||
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_IsInRequest(JSRuntime *rt);
|
||||
@ -2396,7 +2396,7 @@ class JSAutoRequest {
|
||||
|
||||
protected:
|
||||
JSContext *mContext;
|
||||
jsrefcount mSaveDepth;
|
||||
unsigned mSaveDepth;
|
||||
JS_DECL_USE_GUARD_OBJECT_NOTIFIER
|
||||
|
||||
#if 0
|
||||
@ -2428,7 +2428,7 @@ class JSAutoSuspendRequest {
|
||||
|
||||
protected:
|
||||
JSContext *mContext;
|
||||
jsrefcount mSaveDepth;
|
||||
unsigned mSaveDepth;
|
||||
JS_DECL_USE_GUARD_OBJECT_NOTIFIER
|
||||
|
||||
#if 0
|
||||
@ -4085,7 +4085,7 @@ struct JSPrincipals {
|
||||
char *codebase;
|
||||
|
||||
/* Don't call "destroy"; use reference counting macros below. */
|
||||
jsrefcount refcount;
|
||||
unsigned refcount;
|
||||
|
||||
void (* destroy)(JSContext *cx, JSPrincipals *);
|
||||
JSBool (* subsume)(JSPrincipals *, JSPrincipals *);
|
||||
@ -4095,10 +4095,10 @@ struct JSPrincipals {
|
||||
#define JSPRINCIPALS_HOLD(cx, principals) JS_HoldPrincipals(cx,principals)
|
||||
#define JSPRINCIPALS_DROP(cx, principals) JS_DropPrincipals(cx,principals)
|
||||
|
||||
extern JS_PUBLIC_API(jsrefcount)
|
||||
extern JS_PUBLIC_API(unsigned)
|
||||
JS_HoldPrincipals(JSContext *cx, JSPrincipals *principals);
|
||||
|
||||
extern JS_PUBLIC_API(jsrefcount)
|
||||
extern JS_PUBLIC_API(unsigned)
|
||||
JS_DropPrincipals(JSContext *cx, JSPrincipals *principals);
|
||||
|
||||
#else
|
||||
|
@ -86,7 +86,7 @@ struct JSSharpInfo {
|
||||
typedef js::HashMap<JSObject *, JSSharpInfo> JSSharpTable;
|
||||
|
||||
struct JSSharpObjectMap {
|
||||
jsrefcount depth;
|
||||
unsigned depth;
|
||||
uint32_t sharpgen;
|
||||
JSSharpTable table;
|
||||
|
||||
@ -293,7 +293,7 @@ struct JSRuntime : js::RuntimeFriendFields
|
||||
|
||||
js::RootedValueMap gcRootsHash;
|
||||
js::GCLocks gcLocksHash;
|
||||
jsrefcount gcKeepAtoms;
|
||||
unsigned gcKeepAtoms;
|
||||
size_t gcBytes;
|
||||
size_t gcMaxBytes;
|
||||
size_t gcMaxMallocBytes;
|
||||
|
@ -270,10 +270,10 @@ struct JSCompartment
|
||||
|
||||
#ifdef DEBUG
|
||||
/* Property metering. */
|
||||
jsrefcount livePropTreeNodes;
|
||||
jsrefcount totalPropTreeNodes;
|
||||
jsrefcount propTreeKidsChunks;
|
||||
jsrefcount liveDictModeNodes;
|
||||
unsigned livePropTreeNodes;
|
||||
unsigned totalPropTreeNodes;
|
||||
unsigned propTreeKidsChunks;
|
||||
unsigned liveDictModeNodes;
|
||||
#endif
|
||||
|
||||
/* Set of all unowned base shapes in the compartment. */
|
||||
|
@ -96,7 +96,6 @@ JS_BEGIN_EXTERN_C
|
||||
/* Scalar typedefs. */
|
||||
typedef int32_t jsint;
|
||||
typedef uint32_t jsuint;
|
||||
typedef int32_t jsrefcount; /* PRInt32 if JS_THREADSAFE, see jslock.h */
|
||||
|
||||
#ifdef WIN32
|
||||
typedef wchar_t jschar;
|
||||
|
@ -1619,7 +1619,7 @@ CountHeap(JSContext *cx, unsigned argc, jsval *vp)
|
||||
return JS_NewNumberValue(cx, (double) counter, vp);
|
||||
}
|
||||
|
||||
static jsrefcount finalizeCount = 0;
|
||||
static unsigned finalizeCount = 0;
|
||||
|
||||
static void
|
||||
finalize_counter_finalize(JSContext *cx, JSObject *obj)
|
||||
|
@ -3586,7 +3586,7 @@ struct XPCJSContextInfo {
|
||||
bool savedFrameChain;
|
||||
|
||||
// Greater than 0 if a request was suspended.
|
||||
jsrefcount suspendDepth;
|
||||
unsigned suspendDepth;
|
||||
};
|
||||
|
||||
class XPCJSContextStack
|
||||
|
Loading…
Reference in New Issue
Block a user