diff --git a/js/src/jsdbgapi.cpp b/js/src/jsdbgapi.cpp index 99a17bb6312..1dcbcbb324b 100644 --- a/js/src/jsdbgapi.cpp +++ b/js/src/jsdbgapi.cpp @@ -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) { diff --git a/js/src/jsdbgapi.h b/js/src/jsdbgapi.h index 7b16c5e7994..0848da89b41 100644 --- a/js/src/jsdbgapi.h +++ b/js/src/jsdbgapi.h @@ -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); diff --git a/js/src/xpconnect/src/xpcprivate.h b/js/src/xpconnect/src/xpcprivate.h index 65c4e69390a..744035a340c 100644 --- a/js/src/xpconnect/src/xpcprivate.h +++ b/js/src/xpconnect/src/xpcprivate.h @@ -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); diff --git a/js/src/xpconnect/src/xpcwrappednative.cpp b/js/src/xpconnect/src/xpcwrappednative.cpp index ad804192125..45be19c56f6 100644 --- a/js/src/xpconnect/src/xpcwrappednative.cpp +++ b/js/src/xpconnect/src/xpcwrappednative.cpp @@ -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); diff --git a/js/src/xpconnect/src/xpcwrappednativescope.cpp b/js/src/xpconnect/src/xpcwrappednativescope.cpp index 541e3aadb62..6f10b0e94c2 100644 --- a/js/src/xpconnect/src/xpcwrappednativescope.cpp +++ b/js/src/xpconnect/src/xpcwrappednativescope.cpp @@ -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);