mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout 51bff179fa81 (bug 731898) for Android bustage
This commit is contained in:
parent
c0f82b0771
commit
d433f51394
@ -1073,14 +1073,14 @@ JS_YieldRequest(JSContext *cx)
|
||||
#endif
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(unsigned)
|
||||
JS_PUBLIC_API(jsrefcount)
|
||||
JS_SuspendRequest(JSContext *cx)
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
JSRuntime *rt = cx->runtime;
|
||||
JS_ASSERT(rt->onOwnerThread());
|
||||
|
||||
unsigned saveDepth = rt->requestDepth;
|
||||
jsrefcount saveDepth = rt->requestDepth;
|
||||
if (!saveDepth)
|
||||
return 0;
|
||||
|
||||
@ -1094,7 +1094,7 @@ JS_SuspendRequest(JSContext *cx)
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_ResumeRequest(JSContext *cx, unsigned saveDepth)
|
||||
JS_ResumeRequest(JSContext *cx, jsrefcount 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(unsigned)
|
||||
JS_PUBLIC_API(jsrefcount)
|
||||
JS_HoldPrincipals(JSContext *cx, JSPrincipals *principals)
|
||||
{
|
||||
return JS_ATOMIC_INCREMENT(&principals->refcount);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(unsigned)
|
||||
JS_PUBLIC_API(jsrefcount)
|
||||
JS_DropPrincipals(JSContext *cx, JSPrincipals *principals)
|
||||
{
|
||||
unsigned rc = JS_ATOMIC_DECREMENT(&principals->refcount);
|
||||
jsrefcount 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(unsigned)
|
||||
extern JS_PUBLIC_API(jsrefcount)
|
||||
JS_SuspendRequest(JSContext *cx);
|
||||
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_ResumeRequest(JSContext *cx, unsigned saveDepth);
|
||||
JS_ResumeRequest(JSContext *cx, jsrefcount saveDepth);
|
||||
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_IsInRequest(JSRuntime *rt);
|
||||
@ -2396,7 +2396,7 @@ class JSAutoRequest {
|
||||
|
||||
protected:
|
||||
JSContext *mContext;
|
||||
unsigned mSaveDepth;
|
||||
jsrefcount mSaveDepth;
|
||||
JS_DECL_USE_GUARD_OBJECT_NOTIFIER
|
||||
|
||||
#if 0
|
||||
@ -2428,7 +2428,7 @@ class JSAutoSuspendRequest {
|
||||
|
||||
protected:
|
||||
JSContext *mContext;
|
||||
unsigned mSaveDepth;
|
||||
jsrefcount 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. */
|
||||
unsigned refcount;
|
||||
jsrefcount 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(unsigned)
|
||||
extern JS_PUBLIC_API(jsrefcount)
|
||||
JS_HoldPrincipals(JSContext *cx, JSPrincipals *principals);
|
||||
|
||||
extern JS_PUBLIC_API(unsigned)
|
||||
extern JS_PUBLIC_API(jsrefcount)
|
||||
JS_DropPrincipals(JSContext *cx, JSPrincipals *principals);
|
||||
|
||||
#else
|
||||
|
@ -86,7 +86,7 @@ struct JSSharpInfo {
|
||||
typedef js::HashMap<JSObject *, JSSharpInfo> JSSharpTable;
|
||||
|
||||
struct JSSharpObjectMap {
|
||||
unsigned depth;
|
||||
jsrefcount depth;
|
||||
uint32_t sharpgen;
|
||||
JSSharpTable table;
|
||||
|
||||
@ -293,7 +293,7 @@ struct JSRuntime : js::RuntimeFriendFields
|
||||
|
||||
js::RootedValueMap gcRootsHash;
|
||||
js::GCLocks gcLocksHash;
|
||||
unsigned gcKeepAtoms;
|
||||
jsrefcount gcKeepAtoms;
|
||||
size_t gcBytes;
|
||||
size_t gcMaxBytes;
|
||||
size_t gcMaxMallocBytes;
|
||||
|
@ -270,10 +270,10 @@ struct JSCompartment
|
||||
|
||||
#ifdef DEBUG
|
||||
/* Property metering. */
|
||||
unsigned livePropTreeNodes;
|
||||
unsigned totalPropTreeNodes;
|
||||
unsigned propTreeKidsChunks;
|
||||
unsigned liveDictModeNodes;
|
||||
jsrefcount livePropTreeNodes;
|
||||
jsrefcount totalPropTreeNodes;
|
||||
jsrefcount propTreeKidsChunks;
|
||||
jsrefcount liveDictModeNodes;
|
||||
#endif
|
||||
|
||||
/* Set of all unowned base shapes in the compartment. */
|
||||
|
@ -96,6 +96,7 @@ 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 unsigned finalizeCount = 0;
|
||||
static jsrefcount 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.
|
||||
unsigned suspendDepth;
|
||||
jsrefcount suspendDepth;
|
||||
};
|
||||
|
||||
class XPCJSContextStack
|
||||
|
Loading…
Reference in New Issue
Block a user