mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 609496 - Get rid of compartment-obsoleted code. r=jst a=blocking betaN
--HG-- extra : rebase_source : 0241526965897b83db8299331105244b2aceecbc
This commit is contained in:
parent
50b0ea20e8
commit
c648566dbb
@ -1547,59 +1547,6 @@ JS_PutPropertyDescArray(JSContext *cx, JSPropertyDescArray *pda)
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
JS_FRIEND_API(JSBool)
|
||||
js_GetPropertyByIdWithFakeFrame(JSContext *cx, JSObject *obj, JSObject *scopeobj, jsid id,
|
||||
jsval *vp)
|
||||
{
|
||||
JS_ASSERT(scopeobj->isGlobal());
|
||||
|
||||
DummyFrameGuard frame;
|
||||
if (!cx->stack().pushDummyFrame(cx, *scopeobj, &frame))
|
||||
return false;
|
||||
|
||||
bool ok = JS_GetPropertyById(cx, obj, id, vp);
|
||||
|
||||
JS_ASSERT(!frame.fp()->hasCallObj());
|
||||
JS_ASSERT(!frame.fp()->hasArgsObj());
|
||||
return ok;
|
||||
}
|
||||
|
||||
JS_FRIEND_API(JSBool)
|
||||
js_SetPropertyByIdWithFakeFrame(JSContext *cx, JSObject *obj, JSObject *scopeobj, jsid id,
|
||||
jsval *vp)
|
||||
{
|
||||
JS_ASSERT(scopeobj->isGlobal());
|
||||
|
||||
DummyFrameGuard frame;
|
||||
if (!cx->stack().pushDummyFrame(cx, *scopeobj, &frame))
|
||||
return false;
|
||||
|
||||
bool ok = JS_SetPropertyById(cx, obj, id, vp);
|
||||
|
||||
JS_ASSERT(!frame.fp()->hasCallObj());
|
||||
JS_ASSERT(!frame.fp()->hasArgsObj());
|
||||
return ok;
|
||||
}
|
||||
|
||||
JS_FRIEND_API(JSBool)
|
||||
js_CallFunctionValueWithFakeFrame(JSContext *cx, JSObject *obj, JSObject *scopeobj, jsval funval,
|
||||
uintN argc, jsval *argv, jsval *rval)
|
||||
{
|
||||
JS_ASSERT(scopeobj->isGlobal());
|
||||
|
||||
DummyFrameGuard frame;
|
||||
if (!cx->stack().pushDummyFrame(cx, *scopeobj, &frame))
|
||||
return false;
|
||||
|
||||
bool ok = JS_CallFunctionValue(cx, obj, funval, argc, argv, rval);
|
||||
|
||||
JS_ASSERT(!frame.fp()->hasCallObj());
|
||||
JS_ASSERT(!frame.fp()->hasArgsObj());
|
||||
return ok;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
JS_SetDebuggerHandler(JSRuntime *rt, JSDebuggerHandler handler, void *closure)
|
||||
{
|
||||
|
@ -404,20 +404,6 @@ JS_PutPropertyDescArray(JSContext *cx, JSPropertyDescArray *pda);
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
extern JS_FRIEND_API(JSBool)
|
||||
js_GetPropertyByIdWithFakeFrame(JSContext *cx, JSObject *obj, JSObject *scopeobj, jsid id,
|
||||
jsval *vp);
|
||||
|
||||
extern JS_FRIEND_API(JSBool)
|
||||
js_SetPropertyByIdWithFakeFrame(JSContext *cx, JSObject *obj, JSObject *scopeobj, jsid id,
|
||||
jsval *vp);
|
||||
|
||||
extern JS_FRIEND_API(JSBool)
|
||||
js_CallFunctionValueWithFakeFrame(JSContext *cx, JSObject *obj, JSObject *scopeobj, jsval funval,
|
||||
uintN argc, jsval *argv, jsval *rval);
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_SetDebuggerHandler(JSRuntime *rt, JSDebuggerHandler hook, void *closure);
|
||||
|
||||
|
@ -232,7 +232,6 @@ void DEBUG_CheckWrapperThreadSafety(const XPCWrappedNative* wrapper);
|
||||
#define XPC_NATIVE_JSCLASS_MAP_SIZE 32
|
||||
#define XPC_THIS_TRANSLATOR_MAP_SIZE 8
|
||||
#define XPC_NATIVE_WRAPPER_MAP_SIZE 16
|
||||
#define XPC_WRAPPER_MAP_SIZE 8
|
||||
|
||||
/***************************************************************************/
|
||||
// data declarations...
|
||||
@ -1515,9 +1514,6 @@ public:
|
||||
Native2WrappedNativeMap*
|
||||
GetWrappedNativeMap() const {return mWrappedNativeMap;}
|
||||
|
||||
WrappedNative2WrapperMap*
|
||||
GetWrapperMap() const {return mWrapperMap;}
|
||||
|
||||
ClassInfo2WrappedNativeProtoMap*
|
||||
GetWrappedNativeProtoMap(JSBool aMainThreadOnly) const
|
||||
{return aMainThreadOnly ?
|
||||
@ -1629,7 +1625,6 @@ private:
|
||||
Native2WrappedNativeMap* mWrappedNativeMap;
|
||||
ClassInfo2WrappedNativeProtoMap* mWrappedNativeProtoMap;
|
||||
ClassInfo2WrappedNativeProtoMap* mMainThreadWrappedNativeProtoMap;
|
||||
WrappedNative2WrapperMap* mWrapperMap;
|
||||
nsXPCComponents* mComponents;
|
||||
XPCWrappedNativeScope* mNext;
|
||||
// The JS global object for this scope. If non-null, this will be the
|
||||
@ -2677,7 +2672,6 @@ public:
|
||||
JSObject* wrapper = GetWrapper();
|
||||
if(wrapper)
|
||||
JS_CALL_OBJECT_TRACER(trc, wrapper, "XPCWrappedNative::mWrapper");
|
||||
TraceOtherWrapper(trc);
|
||||
}
|
||||
|
||||
inline void AutoTrace(JSTracer* trc)
|
||||
@ -2788,7 +2782,6 @@ protected:
|
||||
|
||||
private:
|
||||
|
||||
void TraceOtherWrapper(JSTracer* trc);
|
||||
JSBool Init(XPCCallContext& ccx, JSObject* parent, JSBool isGlobal,
|
||||
const XPCNativeScriptableCreateInfo* sci);
|
||||
JSBool Init(XPCCallContext &ccx, JSObject *existingJSObject);
|
||||
|
@ -1073,20 +1073,6 @@ XPCWrappedNative::GatherScriptableCreateInfo(
|
||||
return sciProto;
|
||||
}
|
||||
|
||||
void
|
||||
XPCWrappedNative::TraceOtherWrapper(JSTracer* trc)
|
||||
{
|
||||
// Note: This isn't wrapped by a MapLock, however, this is normally called
|
||||
// during GC, where nobody should be playing with the wrapper map anyway,
|
||||
// so this should be OK.
|
||||
JSObject *otherWrapper = GetScope()->GetWrapperMap()->Find(mFlatJSObject);
|
||||
if(otherWrapper)
|
||||
{
|
||||
JS_CALL_OBJECT_TRACER(trc, otherWrapper,
|
||||
"XPCWrappedNative::mOtherWrapper");
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_slimwrappers
|
||||
static PRUint32 sMorphedSlimWrappers;
|
||||
#endif
|
||||
@ -1344,8 +1330,6 @@ XPCWrappedNative::FlatJSObjectFinalized(JSContext *cx)
|
||||
}
|
||||
}
|
||||
|
||||
GetScope()->GetWrapperMap()->Remove(mFlatJSObject);
|
||||
|
||||
if(IsWrapperExpired())
|
||||
{
|
||||
GetScope()->GetWrappedNativeMap()->Remove(this);
|
||||
|
@ -137,7 +137,6 @@ XPCWrappedNativeScope::XPCWrappedNativeScope(XPCCallContext& ccx,
|
||||
mWrappedNativeMap(Native2WrappedNativeMap::newMap(XPC_NATIVE_MAP_SIZE)),
|
||||
mWrappedNativeProtoMap(ClassInfo2WrappedNativeProtoMap::newMap(XPC_NATIVE_PROTO_MAP_SIZE)),
|
||||
mMainThreadWrappedNativeProtoMap(ClassInfo2WrappedNativeProtoMap::newMap(XPC_NATIVE_PROTO_MAP_SIZE)),
|
||||
mWrapperMap(WrappedNative2WrapperMap::newMap(XPC_WRAPPER_MAP_SIZE)),
|
||||
mComponents(nsnull),
|
||||
mNext(nsnull),
|
||||
mGlobalJSObject(nsnull),
|
||||
@ -326,12 +325,6 @@ XPCWrappedNativeScope::~XPCWrappedNativeScope()
|
||||
delete mMainThreadWrappedNativeProtoMap;
|
||||
}
|
||||
|
||||
if(mWrapperMap)
|
||||
{
|
||||
NS_ASSERTION(0 == mWrapperMap->Count(), "scope has non-empty map");
|
||||
delete mWrapperMap;
|
||||
}
|
||||
|
||||
if(mContext)
|
||||
mContext->RemoveScope(this);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user