зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1448850 - Remove nsIProcessScriptLoader. r=bz.
--HG-- extra : rebase_source : 7fe189ba9eafe423ebb710771d3c2be94225e745
This commit is contained in:
Родитель
7d074b504a
Коммит
02d487b70c
|
@ -50,14 +50,15 @@ public:
|
|||
// XPCOM ReleaseCachedProcesses is OK
|
||||
|
||||
// ProcessScriptLoader
|
||||
using nsFrameMessageManager::LoadProcessScript;
|
||||
void LoadProcessScript(const nsAString& aUrl, bool aAllowDelayedLoad,
|
||||
mozilla::ErrorResult& aError)
|
||||
{
|
||||
LoadScript(aUrl, aAllowDelayedLoad, false, aError);
|
||||
}
|
||||
// XPCOM RemoveDelayedProcessScript is OK
|
||||
using nsFrameMessageManager::GetDelayedProcessScripts;
|
||||
void RemoveDelayedProcessScript(const nsAString& aURL)
|
||||
{
|
||||
RemoveDelayedScript(aURL);
|
||||
}
|
||||
void GetDelayedProcessScripts(JSContext* aCx,
|
||||
nsTArray<nsTArray<JS::Value>>& aScripts,
|
||||
mozilla::ErrorResult& aError)
|
||||
|
|
|
@ -23,14 +23,15 @@ public:
|
|||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
// ProcessScriptLoader
|
||||
using nsFrameMessageManager::LoadProcessScript;
|
||||
void LoadProcessScript(const nsAString& aUrl, bool aAllowDelayedLoad,
|
||||
mozilla::ErrorResult& aError)
|
||||
{
|
||||
LoadScript(aUrl, aAllowDelayedLoad, false, aError);
|
||||
}
|
||||
// XPCOM RemoveDelayedProcessScript is OK
|
||||
using nsFrameMessageManager::GetDelayedProcessScripts;
|
||||
void RemoveDelayedProcessScript(const nsAString& aURL)
|
||||
{
|
||||
RemoveDelayedScript(aURL);
|
||||
}
|
||||
void GetDelayedProcessScripts(JSContext* aCx,
|
||||
nsTArray<nsTArray<JS::Value>>& aScripts,
|
||||
mozilla::ErrorResult& aError)
|
||||
|
|
|
@ -164,10 +164,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsFrameMessageManager)
|
|||
/* Frame message managers (non-process message managers) support nsIFrameScriptLoader. */
|
||||
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIFrameScriptLoader,
|
||||
mChrome && !mIsProcessManager)
|
||||
|
||||
/* Process message managers (process message managers) support nsIProcessScriptLoader. */
|
||||
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIProcessScriptLoader,
|
||||
mChrome && mIsProcessManager)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsFrameMessageManager)
|
||||
|
@ -509,30 +505,6 @@ nsFrameMessageManager::GetDelayedFrameScripts(JSContext* aCx, JS::MutableHandle<
|
|||
return GetDelayedScripts(aCx, aList);
|
||||
}
|
||||
|
||||
// nsIProcessScriptLoader
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrameMessageManager::LoadProcessScript(const nsAString& aURL,
|
||||
bool aAllowDelayedLoad)
|
||||
{
|
||||
ErrorResult rv;
|
||||
LoadScript(aURL, aAllowDelayedLoad, false, rv);
|
||||
return rv.StealNSResult();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrameMessageManager::RemoveDelayedProcessScript(const nsAString& aURL)
|
||||
{
|
||||
RemoveDelayedScript(aURL);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrameMessageManager::GetDelayedProcessScripts(JSContext* aCx, JS::MutableHandle<JS::Value> aList)
|
||||
{
|
||||
return GetDelayedScripts(aCx, aList);
|
||||
}
|
||||
|
||||
static bool
|
||||
JSONCreator(const char16_t* aBuf, uint32_t aLen, void* aData)
|
||||
{
|
||||
|
|
|
@ -174,8 +174,7 @@ private:
|
|||
|
||||
class nsFrameMessageManager : public nsIContentFrameMessageManager,
|
||||
public nsIMessageBroadcaster,
|
||||
public nsIFrameScriptLoader,
|
||||
public nsIProcessScriptLoader
|
||||
public nsIFrameScriptLoader
|
||||
{
|
||||
friend class mozilla::dom::MessageManagerReporter;
|
||||
typedef mozilla::dom::ipc::StructuredCloneData StructuredCloneData;
|
||||
|
@ -259,7 +258,6 @@ public:
|
|||
NS_DECL_NSIMESSAGEMANAGERGLOBAL
|
||||
NS_DECL_NSICONTENTFRAMEMESSAGEMANAGER
|
||||
NS_DECL_NSIFRAMESCRIPTLOADER
|
||||
NS_DECL_NSIPROCESSSCRIPTLOADER
|
||||
|
||||
static mozilla::dom::ChromeMessageSender*
|
||||
NewProcessMessageManager(bool aIsRemote);
|
||||
|
|
|
@ -450,28 +450,3 @@ interface nsIFrameScriptLoader : nsISupports
|
|||
[implicit_jscontext]
|
||||
jsval getDelayedFrameScripts();
|
||||
};
|
||||
|
||||
[uuid(7e1e1a20-b24f-11e4-ab27-0800200c9a66)]
|
||||
interface nsIProcessScriptLoader : nsISupports
|
||||
{
|
||||
/**
|
||||
* Load a script in the (possibly remote) process. aURL must be the absolute URL.
|
||||
* data: URLs are also supported. For example data:,dump("foo\n");
|
||||
* If aAllowDelayedLoad is true, script will be loaded when the
|
||||
* remote frame becomes available. Otherwise the script will be loaded
|
||||
* only if the frame is already available.
|
||||
*/
|
||||
void loadProcessScript(in AString aURL, in boolean aAllowDelayedLoad);
|
||||
|
||||
/**
|
||||
* Removes aURL from the list of scripts which support delayed load.
|
||||
*/
|
||||
void removeDelayedProcessScript(in AString aURL);
|
||||
|
||||
/**
|
||||
* Returns all delayed scripts that will be loaded once a (remote)
|
||||
* frame becomes available. The return value is a list of URLs.
|
||||
*/
|
||||
[implicit_jscontext]
|
||||
jsval getDelayedProcessScripts();
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче