diff --git a/content/xul/document/src/nsXULPrototypeCache.cpp b/content/xul/document/src/nsXULPrototypeCache.cpp index b499113b2a2..7fbb6ec09ae 100644 --- a/content/xul/document/src/nsXULPrototypeCache.cpp +++ b/content/xul/document/src/nsXULPrototypeCache.cpp @@ -235,7 +235,7 @@ nsXULPrototypeCache::GetScript(nsIURI* aURI, PRUint32 *aLangID) return nsnull; } *aLangID = entry.mScriptTypeID; - return static_cast(entry.mScriptObject); + return entry.mScriptObject; } @@ -250,7 +250,7 @@ ReleaseScriptObjectCallback(nsIURI* aKey, CacheScriptEntry &aData, void* aClosur } nsresult -nsXULPrototypeCache::PutScript(nsIURI* aURI, PRUint32 aLangID, void* aScriptObject) +nsXULPrototypeCache::PutScript(nsIURI* aURI, PRUint32 aLangID, JSScript* aScriptObject) { CacheScriptEntry existingEntry; if (mScriptTable.Get(aURI, &existingEntry)) { diff --git a/content/xul/document/src/nsXULPrototypeCache.h b/content/xul/document/src/nsXULPrototypeCache.h index f10bce9e980..5f39e32d05a 100644 --- a/content/xul/document/src/nsXULPrototypeCache.h +++ b/content/xul/document/src/nsXULPrototypeCache.h @@ -53,6 +53,9 @@ #include "nsXULPrototypeDocument.h" #include "nsIInputStream.h" #include "nsIStorageStream.h" + +#include "jspubtd.h" + #include "mozilla/scache/StartupCache.h" using namespace mozilla::scache; @@ -62,7 +65,7 @@ class nsCSSStyleSheet; struct CacheScriptEntry { PRUint32 mScriptTypeID; // the script language ID. - void* mScriptObject; // the script object. + JSScript* mScriptObject; // the script object. }; /** @@ -105,7 +108,7 @@ public: nsresult PutPrototype(nsXULPrototypeDocument* aDocument); JSScript* GetScript(nsIURI* aURI, PRUint32* langID); - nsresult PutScript(nsIURI* aURI, PRUint32 langID, void* aScriptObject); + nsresult PutScript(nsIURI* aURI, PRUint32 langID, JSScript* aScriptObject); nsXBLDocumentInfo* GetXBLDocumentInfo(nsIURI* aURL) { return mXBLDocTable.GetWeak(aURL);