2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* A class that handles loading and evaluation of <script> elements.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __nsScriptLoader_h__
|
|
|
|
#define __nsScriptLoader_h__
|
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsIScriptElement.h"
|
|
|
|
#include "nsCOMArray.h"
|
2007-09-28 08:15:07 -07:00
|
|
|
#include "nsTArray.h"
|
|
|
|
#include "nsAutoPtr.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsIDocument.h"
|
|
|
|
#include "nsIStreamLoader.h"
|
2014-11-18 05:46:43 -08:00
|
|
|
#include "mozilla/net/ReferrerPolicy.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class nsScriptLoadRequest;
|
2013-03-18 08:38:19 -07:00
|
|
|
class nsIURI;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-04-25 07:11:56 -07:00
|
|
|
namespace JS {
|
|
|
|
class SourceBufferHolder;
|
|
|
|
}
|
|
|
|
|
2014-07-03 11:12:03 -07:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
class AutoJSAPI;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
//////////////////////////////////////////////////////////////
|
|
|
|
// Script loader implementation
|
|
|
|
//////////////////////////////////////////////////////////////
|
|
|
|
|
2014-08-27 11:26:48 -07:00
|
|
|
class nsScriptLoader MOZ_FINAL : public nsIStreamLoaderObserver
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
2014-05-21 10:08:12 -07:00
|
|
|
class MOZ_STACK_CLASS AutoCurrentScriptUpdater
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AutoCurrentScriptUpdater(nsScriptLoader* aScriptLoader,
|
|
|
|
nsIScriptElement* aCurrentScript)
|
|
|
|
: mOldScript(aScriptLoader->mCurrentScript)
|
|
|
|
, mScriptLoader(aScriptLoader)
|
|
|
|
{
|
|
|
|
mScriptLoader->mCurrentScript = aCurrentScript;
|
|
|
|
}
|
|
|
|
~AutoCurrentScriptUpdater()
|
|
|
|
{
|
|
|
|
mScriptLoader->mCurrentScript.swap(mOldScript);
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
nsCOMPtr<nsIScriptElement> mOldScript;
|
|
|
|
nsScriptLoader* mScriptLoader;
|
|
|
|
};
|
|
|
|
|
2010-09-01 04:41:12 -07:00
|
|
|
friend class nsScriptRequestProcessor;
|
2014-05-21 10:08:12 -07:00
|
|
|
friend class AutoCurrentScriptUpdater;
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
public:
|
2014-09-01 17:49:25 -07:00
|
|
|
explicit nsScriptLoader(nsIDocument* aDocument);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISTREAMLOADEROBSERVER
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The loader maintains a weak reference to the document with
|
|
|
|
* which it is initialized. This call forces the reference to
|
|
|
|
* be dropped.
|
|
|
|
*/
|
|
|
|
void DropDocumentReference()
|
|
|
|
{
|
2012-07-30 07:20:58 -07:00
|
|
|
mDocument = nullptr;
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Add an observer for all scripts loaded through this loader.
|
|
|
|
*
|
|
|
|
* @param aObserver observer for all script processing.
|
|
|
|
*/
|
|
|
|
nsresult AddObserver(nsIScriptLoaderObserver* aObserver)
|
|
|
|
{
|
|
|
|
return mObservers.AppendObject(aObserver) ? NS_OK :
|
|
|
|
NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove an observer.
|
|
|
|
*
|
|
|
|
* @param aObserver observer to be removed
|
|
|
|
*/
|
|
|
|
void RemoveObserver(nsIScriptLoaderObserver* aObserver)
|
|
|
|
{
|
|
|
|
mObservers.RemoveObject(aObserver);
|
|
|
|
}
|
2013-12-31 08:30:07 -08:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* Process a script element. This will include both loading the
|
|
|
|
* source of the element if it is not inline and evaluating
|
|
|
|
* the script itself.
|
|
|
|
*
|
|
|
|
* If the script is an inline script that can be executed immediately
|
|
|
|
* (i.e. there are no other scripts pending) then ScriptAvailable
|
|
|
|
* and ScriptEvaluated will be called before the function returns.
|
|
|
|
*
|
2011-11-15 23:50:18 -08:00
|
|
|
* If true is returned the script could not be executed immediately.
|
|
|
|
* In this case ScriptAvailable is guaranteed to be called at a later
|
|
|
|
* point (as well as possibly ScriptEvaluated).
|
2007-03-22 10:30:00 -07:00
|
|
|
*
|
|
|
|
* @param aElement The element representing the script to be loaded and
|
|
|
|
* evaluated.
|
|
|
|
*/
|
2011-11-15 23:50:18 -08:00
|
|
|
bool ProcessScriptElement(nsIScriptElement* aElement);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the currently executing script. This is useful if you want to
|
|
|
|
* generate a unique key based on the currently executing script.
|
|
|
|
*/
|
|
|
|
nsIScriptElement* GetCurrentScript()
|
|
|
|
{
|
|
|
|
return mCurrentScript;
|
|
|
|
}
|
|
|
|
|
2010-09-06 00:41:26 -07:00
|
|
|
nsIScriptElement* GetCurrentParserInsertedScript()
|
|
|
|
{
|
|
|
|
return mCurrentParserInsertedScript;
|
|
|
|
}
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* Whether the loader is enabled or not.
|
|
|
|
* When disabled, processing of new script elements is disabled.
|
2011-11-15 23:50:18 -08:00
|
|
|
* Any call to ProcessScriptElement() will return false. Note that
|
|
|
|
* this DOES NOT disable currently loading or executing scripts.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2011-09-28 23:19:26 -07:00
|
|
|
bool GetEnabled()
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
return mEnabled;
|
|
|
|
}
|
2011-09-28 23:19:26 -07:00
|
|
|
void SetEnabled(bool aEnabled)
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
if (!mEnabled && aEnabled) {
|
|
|
|
ProcessPendingRequestsAsync();
|
|
|
|
}
|
|
|
|
mEnabled = aEnabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Add/remove blocker. Blockers will stop scripts from executing, but not
|
|
|
|
* from loading.
|
|
|
|
*/
|
|
|
|
void AddExecuteBlocker()
|
|
|
|
{
|
2008-03-14 16:08:57 -07:00
|
|
|
++mBlockerCount;
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
|
|
|
void RemoveExecuteBlocker()
|
|
|
|
{
|
|
|
|
if (!--mBlockerCount) {
|
2008-03-14 16:08:57 -07:00
|
|
|
ProcessPendingRequestsAsync();
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-25 07:11:56 -07:00
|
|
|
/**
|
|
|
|
* Convert the given buffer to a UTF-16 string.
|
|
|
|
* @param aChannel Channel corresponding to the data. May be null.
|
|
|
|
* @param aData The data to convert
|
|
|
|
* @param aLength Length of the data
|
|
|
|
* @param aHintCharset Hint for the character set (e.g., from a charset
|
|
|
|
* attribute). May be the empty string.
|
|
|
|
* @param aDocument Document which the data is loaded for. Must not be
|
|
|
|
* null.
|
2014-07-21 21:43:21 -07:00
|
|
|
* @param aBufOut [out] char16_t array allocated by ConvertToUTF16 and
|
2014-04-25 07:11:56 -07:00
|
|
|
* containing data converted to unicode. Caller must
|
|
|
|
* js_free() this data when no longer needed.
|
|
|
|
* @param aLengthOut [out] Length of array returned in aBufOut in number
|
2014-07-21 21:43:21 -07:00
|
|
|
* of char16_t code units.
|
2014-04-25 07:11:56 -07:00
|
|
|
*/
|
|
|
|
static nsresult ConvertToUTF16(nsIChannel* aChannel, const uint8_t* aData,
|
|
|
|
uint32_t aLength,
|
|
|
|
const nsAString& aHintCharset,
|
|
|
|
nsIDocument* aDocument,
|
2014-07-21 21:43:21 -07:00
|
|
|
char16_t*& aBufOut, size_t& aLengthOut);
|
2014-04-25 07:11:56 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* Processes any pending requests that are ready for processing.
|
|
|
|
*/
|
|
|
|
void ProcessPendingRequests();
|
|
|
|
|
2009-02-11 06:51:37 -08:00
|
|
|
/**
|
|
|
|
* Check whether it's OK to load a script from aURI in
|
|
|
|
* aDocument.
|
|
|
|
*/
|
|
|
|
static nsresult ShouldLoadScript(nsIDocument* aDocument,
|
|
|
|
nsISupports* aContext,
|
|
|
|
nsIURI* aURI,
|
|
|
|
const nsAString &aType);
|
|
|
|
|
2008-07-25 19:42:12 -07:00
|
|
|
/**
|
|
|
|
* Starts deferring deferred scripts and puts them in the mDeferredRequests
|
|
|
|
* queue instead.
|
|
|
|
*/
|
|
|
|
void BeginDeferringScripts()
|
|
|
|
{
|
2011-10-17 07:59:28 -07:00
|
|
|
mDeferEnabled = true;
|
2009-01-15 11:49:20 -08:00
|
|
|
if (mDocument) {
|
|
|
|
mDocument->BlockOnload();
|
|
|
|
}
|
2008-07-25 19:42:12 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-07-07 22:55:05 -07:00
|
|
|
* Notifies the script loader that parsing is done. If aTerminated is true,
|
|
|
|
* this will drop any pending scripts that haven't run yet. Otherwise, it
|
|
|
|
* will stops deferring scripts and immediately processes the
|
|
|
|
* mDeferredRequests queue.
|
2008-07-25 19:42:12 -07:00
|
|
|
*
|
2009-07-07 22:55:05 -07:00
|
|
|
* WARNING: This function will synchronously execute content scripts, so be
|
2008-07-25 19:42:12 -07:00
|
|
|
* prepared that the world might change around you.
|
|
|
|
*/
|
2011-09-28 23:19:26 -07:00
|
|
|
void ParsingComplete(bool aTerminated);
|
2008-07-25 19:42:12 -07:00
|
|
|
|
2009-01-14 17:25:21 -08:00
|
|
|
/**
|
|
|
|
* Returns the number of pending scripts, deferred or not.
|
|
|
|
*/
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t HasPendingOrCurrentScripts()
|
2009-01-14 17:25:21 -08:00
|
|
|
{
|
2010-09-01 04:41:12 -07:00
|
|
|
return mCurrentScript || mParserBlockingRequest;
|
2009-01-14 17:25:21 -08:00
|
|
|
}
|
|
|
|
|
2008-09-30 23:48:47 -07:00
|
|
|
/**
|
|
|
|
* Adds aURI to the preload list and starts loading it.
|
|
|
|
*
|
|
|
|
* @param aURI The URI of the external script.
|
|
|
|
* @param aCharset The charset parameter for the script.
|
|
|
|
* @param aType The type parameter for the script.
|
2012-03-10 08:13:52 -08:00
|
|
|
* @param aCrossOrigin The crossorigin attribute for the script.
|
|
|
|
* Void if not present.
|
2012-12-04 15:06:29 -08:00
|
|
|
* @param aScriptFromHead Whether or not the script was a child of head
|
2008-09-30 23:48:47 -07:00
|
|
|
*/
|
|
|
|
virtual void PreloadURI(nsIURI *aURI, const nsAString &aCharset,
|
2012-03-10 08:13:52 -08:00
|
|
|
const nsAString &aType,
|
2012-12-04 15:06:29 -08:00
|
|
|
const nsAString &aCrossOrigin,
|
2014-11-18 05:46:43 -08:00
|
|
|
bool aScriptFromHead,
|
|
|
|
const mozilla::net::ReferrerPolicy aReferrerPolicy);
|
2008-09-30 23:48:47 -07:00
|
|
|
|
2013-09-11 16:42:09 -07:00
|
|
|
/**
|
|
|
|
* Process a request that was deferred so that the script could be compiled
|
|
|
|
* off thread.
|
|
|
|
*/
|
2013-12-05 12:55:31 -08:00
|
|
|
nsresult ProcessOffThreadRequest(nsScriptLoadRequest *aRequest,
|
|
|
|
void **aOffThreadToken);
|
2013-09-11 16:42:09 -07:00
|
|
|
|
2014-10-01 05:13:53 -07:00
|
|
|
bool AddPendingChildLoader(nsScriptLoader* aChild) {
|
|
|
|
return mPendingChildLoaders.AppendElement(aChild) != nullptr;
|
|
|
|
}
|
|
|
|
|
2010-09-01 04:41:12 -07:00
|
|
|
private:
|
2014-06-24 19:09:15 -07:00
|
|
|
virtual ~nsScriptLoader();
|
|
|
|
|
2012-01-20 03:16:27 -08:00
|
|
|
/**
|
|
|
|
* Unblocks the creator parser of the parser-blocking scripts.
|
|
|
|
*/
|
|
|
|
void UnblockParser(nsScriptLoadRequest* aParserBlockingRequest);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Asynchronously resumes the creator parser of the parser-blocking scripts.
|
|
|
|
*/
|
|
|
|
void ContinueParserAsync(nsScriptLoadRequest* aParserBlockingRequest);
|
|
|
|
|
|
|
|
|
2008-11-18 23:05:05 -08:00
|
|
|
/**
|
|
|
|
* Helper function to check the content policy for a given request.
|
|
|
|
*/
|
2009-02-11 06:51:37 -08:00
|
|
|
static nsresult CheckContentPolicy(nsIDocument* aDocument,
|
|
|
|
nsISupports *aContext,
|
|
|
|
nsIURI *aURI,
|
|
|
|
const nsAString &aType);
|
2008-11-18 23:05:05 -08:00
|
|
|
|
2008-09-30 23:48:47 -07:00
|
|
|
/**
|
|
|
|
* Start a load for aRequest's URI.
|
|
|
|
*/
|
2012-12-04 15:06:29 -08:00
|
|
|
nsresult StartLoad(nsScriptLoadRequest *aRequest, const nsAString &aType,
|
|
|
|
bool aScriptFromHead);
|
2008-09-30 23:48:47 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
2009-01-15 11:49:20 -08:00
|
|
|
* Process any pending requests asynchronously (i.e. off an event) if there
|
2007-03-22 10:30:00 -07:00
|
|
|
* are any. Note that this is a no-op if there aren't any currently pending
|
|
|
|
* requests.
|
2009-01-15 11:49:20 -08:00
|
|
|
*
|
|
|
|
* This function is virtual to allow cross-library calls to SetEnabled()
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
|
|
|
virtual void ProcessPendingRequestsAsync();
|
|
|
|
|
2007-09-28 08:15:07 -07:00
|
|
|
/**
|
|
|
|
* If true, the loader is ready to execute scripts, and so are all its
|
|
|
|
* ancestors. If the loader itself is ready but some ancestor is not, this
|
|
|
|
* function will add an execute blocker and ask the ancestor to remove it
|
|
|
|
* once it becomes ready.
|
|
|
|
*/
|
2011-09-28 23:19:26 -07:00
|
|
|
bool ReadyToExecuteScripts();
|
2007-09-28 08:15:07 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return whether just this loader is ready to execute scripts.
|
|
|
|
*/
|
2011-09-28 23:19:26 -07:00
|
|
|
bool SelfReadyToExecuteScripts()
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
return mEnabled && !mBlockerCount;
|
|
|
|
}
|
|
|
|
|
2013-09-11 16:42:09 -07:00
|
|
|
nsresult AttemptAsyncScriptParse(nsScriptLoadRequest* aRequest);
|
|
|
|
nsresult ProcessRequest(nsScriptLoadRequest* aRequest,
|
|
|
|
void **aOffThreadToken = nullptr);
|
2007-03-22 10:30:00 -07:00
|
|
|
void FireScriptAvailable(nsresult aResult,
|
|
|
|
nsScriptLoadRequest* aRequest);
|
|
|
|
void FireScriptEvaluated(nsresult aResult,
|
|
|
|
nsScriptLoadRequest* aRequest);
|
|
|
|
nsresult EvaluateScript(nsScriptLoadRequest* aRequest,
|
2014-04-25 07:11:56 -07:00
|
|
|
JS::SourceBufferHolder& aSrcBuf,
|
2013-09-11 16:42:09 -07:00
|
|
|
void **aOffThreadToken);
|
|
|
|
|
2013-12-31 08:30:07 -08:00
|
|
|
already_AddRefed<nsIScriptGlobalObject> GetScriptGlobalObject();
|
2014-07-03 11:12:03 -07:00
|
|
|
void FillCompileOptionsForRequest(const mozilla::dom::AutoJSAPI &jsapi,
|
|
|
|
nsScriptLoadRequest *aRequest,
|
2013-11-26 08:47:52 -08:00
|
|
|
JS::Handle<JSObject *> aScopeChain,
|
2013-09-11 16:42:09 -07:00
|
|
|
JS::CompileOptions *aOptions);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
nsresult PrepareLoadedRequest(nsScriptLoadRequest* aRequest,
|
|
|
|
nsIStreamLoader* aLoader,
|
|
|
|
nsresult aStatus,
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t aStringLen,
|
|
|
|
const uint8_t* aString);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-04-12 02:02:21 -07:00
|
|
|
void AddDeferRequest(nsScriptLoadRequest* aRequest);
|
|
|
|
bool MaybeRemovedDeferRequests();
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
nsIDocument* mDocument; // [WEAK]
|
|
|
|
nsCOMArray<nsIScriptLoaderObserver> mObservers;
|
2010-10-13 00:12:55 -07:00
|
|
|
nsTArray<nsRefPtr<nsScriptLoadRequest> > mNonAsyncExternalScriptInsertedRequests;
|
2010-09-20 05:12:06 -07:00
|
|
|
nsTArray<nsRefPtr<nsScriptLoadRequest> > mAsyncRequests;
|
|
|
|
nsTArray<nsRefPtr<nsScriptLoadRequest> > mDeferRequests;
|
2010-10-27 00:18:24 -07:00
|
|
|
nsTArray<nsRefPtr<nsScriptLoadRequest> > mXSLTRequests;
|
2010-09-20 05:12:06 -07:00
|
|
|
nsRefPtr<nsScriptLoadRequest> mParserBlockingRequest;
|
2008-09-30 23:48:47 -07:00
|
|
|
|
|
|
|
// In mRequests, the additional information here is stored by the element.
|
|
|
|
struct PreloadInfo {
|
|
|
|
nsRefPtr<nsScriptLoadRequest> mRequest;
|
|
|
|
nsString mCharset;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PreloadRequestComparator {
|
2011-09-28 23:19:26 -07:00
|
|
|
bool Equals(const PreloadInfo &aPi, nsScriptLoadRequest * const &aRequest)
|
2008-09-30 23:48:47 -07:00
|
|
|
const
|
|
|
|
{
|
|
|
|
return aRequest == aPi.mRequest;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
struct PreloadURIComparator {
|
2011-09-28 23:19:26 -07:00
|
|
|
bool Equals(const PreloadInfo &aPi, nsIURI * const &aURI) const;
|
2008-09-30 23:48:47 -07:00
|
|
|
};
|
|
|
|
nsTArray<PreloadInfo> mPreloads;
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
nsCOMPtr<nsIScriptElement> mCurrentScript;
|
2010-09-06 00:41:26 -07:00
|
|
|
nsCOMPtr<nsIScriptElement> mCurrentParserInsertedScript;
|
2007-09-28 08:15:07 -07:00
|
|
|
// XXXbz do we want to cycle-collect these or something? Not sure.
|
|
|
|
nsTArray< nsRefPtr<nsScriptLoader> > mPendingChildLoaders;
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t mBlockerCount;
|
2011-09-28 23:19:26 -07:00
|
|
|
bool mEnabled;
|
|
|
|
bool mDeferEnabled;
|
|
|
|
bool mDocumentParsingDone;
|
2014-04-12 02:02:21 -07:00
|
|
|
bool mBlockingDOMContentLoaded;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
2011-08-10 13:53:14 -07:00
|
|
|
class nsAutoScriptLoaderDisabler
|
|
|
|
{
|
|
|
|
public:
|
2014-09-01 17:49:25 -07:00
|
|
|
explicit nsAutoScriptLoaderDisabler(nsIDocument* aDoc)
|
2011-08-10 13:53:14 -07:00
|
|
|
{
|
|
|
|
mLoader = aDoc->ScriptLoader();
|
|
|
|
mWasEnabled = mLoader->GetEnabled();
|
|
|
|
if (mWasEnabled) {
|
2011-10-17 07:59:28 -07:00
|
|
|
mLoader->SetEnabled(false);
|
2011-08-10 13:53:14 -07:00
|
|
|
}
|
|
|
|
}
|
2013-12-31 08:30:07 -08:00
|
|
|
|
2011-08-10 13:53:14 -07:00
|
|
|
~nsAutoScriptLoaderDisabler()
|
|
|
|
{
|
|
|
|
if (mWasEnabled) {
|
2011-10-17 07:59:28 -07:00
|
|
|
mLoader->SetEnabled(true);
|
2011-08-10 13:53:14 -07:00
|
|
|
}
|
|
|
|
}
|
2013-12-31 08:30:07 -08:00
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
bool mWasEnabled;
|
2011-08-10 13:53:14 -07:00
|
|
|
nsRefPtr<nsScriptLoader> mLoader;
|
|
|
|
};
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
#endif //__nsScriptLoader_h__
|