Part 2 of fix for bug 533401 (Names added through external DOM classinfo don't resolve on global object). r=jst, a=blocking192.
authorPeter Van der Beken <peterv@propagandism.org>
Tue, 08 Dec 2009 21:50:27 -0800
changeset 33358 0b5a1d59f5f6e11d017bd37fe55db98a82160d5c
parent 33357 f3f8b87e11e90ed014c31ab8b7ab57fcdc052b58
child 33359 4fb28b7ec57ba177b7ab4f7d97e3018d382fc127
push id910
push userpvanderbeken@mozilla.com
push dateSun, 13 Dec 2009 19:47:52 +0000
reviewersjst, blocking192
bugs533401
milestone1.9.2b6pre
Part 2 of fix for bug 533401 (Names added through external DOM classinfo don't resolve on global object). r=jst, a=blocking192.
dom/base/nsDOMClassInfo.cpp
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -5441,17 +5441,17 @@ private:
     nameSpaceManager->LookupName(aName, aNameStruct);
 
     // Return NS_OK here, aName just isn't a DOM class but nothing failed.
     return NS_OK;
   }
 
   static PRBool IsConstructable(const nsDOMClassInfoData *aData)
   {
-    if (IS_EXTERNAL(aData)) {
+    if (IS_EXTERNAL(aData->mCachedClassInfo)) {
       const nsExternalDOMClassInfoData* data =
         static_cast<const nsExternalDOMClassInfoData*>(aData);
       return data->mConstructorCID != nsnull;
     }
 
     return FindConstructorContractID(aData) || FindConstructorFunc(aData);
   }
   static PRBool IsConstructable(const nsGlobalNameStruct *aNameStruct)