зеркало из https://github.com/mozilla/gecko-dev.git
Bug 694867 - Part d: Store a JSScript in nsXULPrototypeCache; r=volkmar
This commit is contained in:
Родитель
86cdbf903c
Коммит
e8c4b3139e
|
@ -235,7 +235,7 @@ nsXULPrototypeCache::GetScript(nsIURI* aURI, PRUint32 *aLangID)
|
|||
return nsnull;
|
||||
}
|
||||
*aLangID = entry.mScriptTypeID;
|
||||
return static_cast<JSScript*>(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)) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче