Bug 1401710 - Remove unused unsafe code from nsDOMClassInfo. r=bz

Also, the XPConnect() method is unused.

MozReview-Commit-ID: JycZIa9TbC8

--HG--
extra : rebase_source : b278e272696c1bf8403eb25cdb70a5ac546a56f4
This commit is contained in:
Andrew McCreight 2017-09-20 13:01:48 -07:00
parent 0448e8d8a4
commit 528237d25f
2 changed files with 0 additions and 36 deletions

View File

@ -240,14 +240,6 @@ SetParentToWindow(nsGlobalWindow *win, JSObject **parent)
return NS_OK;
}
// static
nsISupports *
nsDOMClassInfo::GetNative(nsIXPConnectWrappedNative *wrapper, JSObject *obj)
{
return wrapper ? wrapper->Native() : static_cast<nsISupports*>(js::GetObjectPrivate(obj));
}
nsresult
nsDOMClassInfo::DefineStaticJSVals()
{

View File

@ -92,13 +92,6 @@ public:
*/
static bool ObjectIsNativeWrapper(JSContext* cx, JSObject* obj);
static nsISupports *GetNative(nsIXPConnectWrappedNative *wrapper, JSObject *obj);
static nsIXPConnect *XPConnect()
{
return sXPConnect;
}
protected:
friend nsIClassInfo* NS_GetDOMClassInfoInstance(nsDOMClassInfoID aID);
@ -122,27 +115,6 @@ public:
static jsid sWrappedJSObject_id;
};
// THIS ONE ISN'T SAFE!! It assumes that the private of the JSObject is
// an nsISupports.
inline
const nsQueryInterface
do_QueryWrappedNative(nsIXPConnectWrappedNative *wrapper, JSObject *obj)
{
return nsQueryInterface(nsDOMClassInfo::GetNative(wrapper, obj));
}
// THIS ONE ISN'T SAFE!! It assumes that the private of the JSObject is
// an nsISupports.
inline
const nsQueryInterfaceWithError
do_QueryWrappedNative(nsIXPConnectWrappedNative *wrapper, JSObject *obj,
nsresult *aError)
{
return nsQueryInterfaceWithError(nsDOMClassInfo::GetNative(wrapper, obj),
aError);
}
typedef nsDOMClassInfo nsDOMGenericSH;
// Makes sure that the wrapper is preserved if new properties are added.