Fixing lame bug in two Find implementations - thanks shaver. Removing commented out dead code

This commit is contained in:
jband%netscape.com 1999-06-29 21:37:09 +00:00
Родитель a022bcbbcf
Коммит a39bd6d9f6
3 изменённых файлов: 2 добавлений и 26 удалений

Просмотреть файл

@ -240,7 +240,7 @@ nsXPCWrappedJS::Find(REFNSIID aIID)
nsXPCWrappedJS* cur = mRoot;
do
{
if(aIID.Equals(GetIID()))
if(aIID.Equals(cur->GetIID()))
return cur;
} while(NULL != (cur = cur->mNext));

Просмотреть файл

@ -124,29 +124,6 @@ nsXPCWrappedJSClass::~nsXPCWrappedJSClass()
NS_RELEASE(mInfo);
}
/***************************************************************************/
// XXX for now IIDs are represented in JS as string objects containing strings
// of the form: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} (just like the nsID
// Parse and ToString methods use.
// XXX lots of room for optimization here!
// JSObject*
// nsXPCWrappedJSClass::CreateIIDJSObject(REFNSIID aIID)
// {
// JSObject* obj = NULL;
// char* str = aIID.ToString();
// if(str)
// {
// JSContext* cx = GetJSContext();
// JSString* jsstr = JS_InternString(cx, str);
// delete [] str;
// if(jsstr)
// JS_ValueToObject(cx, STRING_TO_JSVAL(jsstr), &obj);
// }
// return obj;
// }
JSObject*
nsXPCWrappedJSClass::CallQueryInterfaceOnJSObject(JSObject* jsobj, REFNSIID aIID)
{
@ -159,7 +136,6 @@ nsXPCWrappedJSClass::CallQueryInterfaceOnJSObject(JSObject* jsobj, REFNSIID aIID
if(!cx)
return NULL;
// id = CreateIIDJSObject(aIID);
id = xpc_NewIIDObject(cx, aIID);
if(id)

Просмотреть файл

@ -313,7 +313,7 @@ nsXPCWrappedNative::Find(REFNSIID aIID)
nsXPCWrappedNative* cur = mRoot;
do
{
if(aIID.Equals(GetIID()))
if(aIID.Equals(cur->GetIID()))
return cur;
} while(NULL != (cur = cur->mNext));