mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 694867 - Part d: Store a JSScript in nsXULPrototypeCache; r=volkmar
This commit is contained in:
parent
2e196a5c20
commit
be67644abb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user