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
Родитель 4ce4016bd1
Коммит 8c9b477138
3 изменённых файлов: 2 добавлений и 26 удалений

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

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

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

@ -124,29 +124,6 @@ nsXPCWrappedJSClass::~nsXPCWrappedJSClass()
NS_RELEASE(mInfo); 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* JSObject*
nsXPCWrappedJSClass::CallQueryInterfaceOnJSObject(JSObject* jsobj, REFNSIID aIID) nsXPCWrappedJSClass::CallQueryInterfaceOnJSObject(JSObject* jsobj, REFNSIID aIID)
{ {
@ -159,7 +136,6 @@ nsXPCWrappedJSClass::CallQueryInterfaceOnJSObject(JSObject* jsobj, REFNSIID aIID
if(!cx) if(!cx)
return NULL; return NULL;
// id = CreateIIDJSObject(aIID);
id = xpc_NewIIDObject(cx, aIID); id = xpc_NewIIDObject(cx, aIID);
if(id) if(id)

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

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