diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index bf4e4236a8b..52f2e7d6ee4 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -894,15 +894,6 @@ nsDOMClassInfo::PreCreate(nsISupports *nativeObj, JSContext *cx, return NS_OK; } -NS_IMETHODIMP -nsDOMClassInfo::Create(nsIXPConnectWrappedNative *wrapper, - JSContext *cx, JSObject *obj) -{ - NS_WARNING("nsDOMClassInfo::Create Don't call me!"); - - return NS_ERROR_UNEXPECTED; -} - NS_IMETHODIMP nsDOMClassInfo::AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, jsval *vp, diff --git a/js/xpconnect/idl/nsIXPCScriptable.idl b/js/xpconnect/idl/nsIXPCScriptable.idl index 6fd0690a9c0..a46245f57bb 100644 --- a/js/xpconnect/idl/nsIXPCScriptable.idl +++ b/js/xpconnect/idl/nsIXPCScriptable.idl @@ -32,13 +32,13 @@ interface nsIXPConnectWrappedNative; * boolean to PR_TRUE before making the call. Implementations may skip writing * to *_retval unless they want to return PR_FALSE. */ -[uuid(24425dab-4e6b-4df5-b621-da2458c3bc42)] +[uuid(82755b3f-fd81-4efe-aa14-d4743fbedda1)] interface nsIXPCScriptable : nsISupports { /* bitflags used for 'flags' (only 32 bits available!) */ const uint32_t WANT_PRECREATE = 1 << 0; - const uint32_t WANT_CREATE = 1 << 1; + // unused bit here // unused bit here const uint32_t WANT_ADDPROPERTY = 1 << 3; const uint32_t WANT_DELPROPERTY = 1 << 4; @@ -77,9 +77,6 @@ interface nsIXPCScriptable : nsISupports void preCreate(in nsISupports nativeObj, in JSContextPtr cx, in JSObjectPtr globalObj, out JSObjectPtr parentObj); - void create(in nsIXPConnectWrappedNative wrapper, - in JSContextPtr cx, in JSObjectPtr obj); - boolean addProperty(in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsid id, in JSValPtr vp); diff --git a/js/xpconnect/public/xpc_map_end.h b/js/xpconnect/public/xpc_map_end.h index 978490f06ea..7757371c636 100644 --- a/js/xpconnect/public/xpc_map_end.h +++ b/js/xpconnect/public/xpc_map_end.h @@ -34,9 +34,6 @@ XPC_MAP_CLASSNAME::GetScriptableFlags() #ifdef XPC_MAP_WANT_PRECREATE nsIXPCScriptable::WANT_PRECREATE | #endif -#ifdef XPC_MAP_WANT_CREATE - nsIXPCScriptable::WANT_CREATE | -#endif #ifdef XPC_MAP_WANT_ADDPROPERTY nsIXPCScriptable::WANT_ADDPROPERTY | #endif @@ -87,11 +84,6 @@ NS_IMETHODIMP XPC_MAP_CLASSNAME::PreCreate(nsISupports *nativeObj, JSContext * c {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} #endif -#ifndef XPC_MAP_WANT_CREATE -NS_IMETHODIMP XPC_MAP_CLASSNAME::Create(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj) - {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} -#endif - #ifndef XPC_MAP_WANT_ADDPROPERTY NS_IMETHODIMP XPC_MAP_CLASSNAME::AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, jsid id, JS::Value * vp, bool *_retval) {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} @@ -166,10 +158,6 @@ NS_IMETHODIMP XPC_MAP_CLASSNAME::PostCreatePrototype(JSContext *cx, JSObject *pr #undef XPC_MAP_WANT_PRECREATE #endif -#ifdef XPC_MAP_WANT_CREATE -#undef XPC_MAP_WANT_CREATE -#endif - #ifdef XPC_MAP_WANT_ADDPROPERTY #undef XPC_MAP_WANT_ADDPROPERTY #endif diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp index 5dc4c090a50..46b2082debb 100644 --- a/js/xpconnect/src/XPCWrappedNative.cpp +++ b/js/xpconnect/src/XPCWrappedNative.cpp @@ -802,12 +802,6 @@ XPCWrappedNative::FinishInit() MOZ_ASSERT(1 == mRefCnt, "unexpected refcount value"); NS_ADDREF(this); - if (mScriptableInfo && mScriptableInfo->GetFlags().WantCreate() && - NS_FAILED(mScriptableInfo->GetCallback()->Create(this, cx, - mFlatJSObject))) { - return false; - } - // A hack for bug 517665, increase the probability for GC. JS_updateMallocCounter(cx, 2 * sizeof(XPCWrappedNative)); diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 76cfc4b568c..52d0cf62002 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -1611,7 +1611,6 @@ public: #define GET_IT(f_) const {return 0 != (mFlags & nsIXPCScriptable:: f_ );} bool WantPreCreate() GET_IT(WANT_PRECREATE) - bool WantCreate() GET_IT(WANT_CREATE) bool WantAddProperty() GET_IT(WANT_ADDPROPERTY) bool WantDelProperty() GET_IT(WANT_DELPROPERTY) bool WantGetProperty() GET_IT(WANT_GETPROPERTY)