Part 2 of fix for bug 533401 (Names added through external DOM classinfo don't resolve on global object). r=jst, a=beltzner.
authorPeter Van der Beken <peterv@propagandism.org>
Tue, 08 Dec 2009 21:50:27 -0800
changeset 35498 c7bbc4ce86fad02a94053140444f2ea63ab93f27
parent 35497 abd2dcd924d92f39b9f389680d440a26cf52bc6f
child 35499 61b1c094b729f6b594667e459ef2d9f4daa2a37d
push id10620
push userpvanderbeken@mozilla.com
push dateWed, 09 Dec 2009 05:53:44 +0000
treeherdermozilla-central@c7bbc4ce86fa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjst, beltzner
bugs533401
milestone1.9.3a1pre
Part 2 of fix for bug 533401 (Names added through external DOM classinfo don't resolve on global object). r=jst, a=beltzner.
dom/base/nsDOMClassInfo.cpp
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -5504,17 +5504,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)