2010-05-18 05:28:37 -07:00
|
|
|
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8; -*- */
|
|
|
|
/* vim: set sw=4 ts=8 et tw=80 : */
|
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/. */
|
2010-05-18 05:28:37 -07:00
|
|
|
|
|
|
|
#include "nsInProcessTabChildGlobal.h"
|
|
|
|
#include "nsContentUtils.h"
|
|
|
|
#include "nsIScriptSecurityManager.h"
|
|
|
|
#include "nsIInterfaceRequestorUtils.h"
|
|
|
|
#include "nsEventDispatcher.h"
|
|
|
|
#include "nsIComponentManager.h"
|
|
|
|
#include "nsIServiceManager.h"
|
|
|
|
#include "nsIJSRuntimeService.h"
|
|
|
|
#include "nsComponentManagerUtils.h"
|
|
|
|
#include "nsNetUtil.h"
|
|
|
|
#include "nsScriptLoader.h"
|
|
|
|
#include "nsFrameLoader.h"
|
2011-01-14 14:03:21 -08:00
|
|
|
#include "xpcpublic.h"
|
2012-05-08 09:20:35 -07:00
|
|
|
#include "nsIMozBrowserFrame.h"
|
2012-07-20 09:42:08 -07:00
|
|
|
#include "nsDOMClassInfoID.h"
|
2012-08-01 23:02:29 -07:00
|
|
|
#include "mozilla/dom/StructuredCloneUtils.h"
|
|
|
|
|
|
|
|
using mozilla::dom::StructuredCloneData;
|
|
|
|
using mozilla::dom::StructuredCloneClosure;
|
2010-05-18 05:28:37 -07:00
|
|
|
|
2012-09-27 22:43:12 -07:00
|
|
|
bool
|
|
|
|
nsInProcessTabChildGlobal::DoSendSyncMessage(const nsAString& aMessage,
|
|
|
|
const StructuredCloneData& aData,
|
|
|
|
InfallibleTArray<nsString>* aJSONRetVal)
|
2010-05-18 05:28:37 -07:00
|
|
|
{
|
2010-06-11 04:14:01 -07:00
|
|
|
nsTArray<nsCOMPtr<nsIRunnable> > asyncMessages;
|
2012-09-27 22:43:12 -07:00
|
|
|
asyncMessages.SwapElements(mASyncMessages);
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t len = asyncMessages.Length();
|
|
|
|
for (uint32_t i = 0; i < len; ++i) {
|
2010-06-11 04:14:01 -07:00
|
|
|
nsCOMPtr<nsIRunnable> async = asyncMessages[i];
|
2010-05-18 05:28:37 -07:00
|
|
|
async->Run();
|
|
|
|
}
|
2012-09-27 22:43:12 -07:00
|
|
|
if (mChromeMessageManager) {
|
|
|
|
nsRefPtr<nsFrameMessageManager> mm = mChromeMessageManager;
|
2013-05-20 05:40:06 -07:00
|
|
|
mm->ReceiveMessage(mOwner, aMessage, true, &aData, JS::NullPtr(),
|
|
|
|
aJSONRetVal);
|
2010-05-18 05:28:37 -07:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
class nsAsyncMessageToParent : public nsRunnable
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsAsyncMessageToParent(nsInProcessTabChildGlobal* aTabChild,
|
2012-08-01 23:02:29 -07:00
|
|
|
const nsAString& aMessage,
|
|
|
|
const StructuredCloneData& aData)
|
2012-12-18 09:08:03 -08:00
|
|
|
: mTabChild(aTabChild), mMessage(aMessage), mRun(false)
|
2012-08-01 23:02:29 -07:00
|
|
|
{
|
|
|
|
if (aData.mDataLength && !mData.copy(aData.mData, aData.mDataLength)) {
|
|
|
|
NS_RUNTIMEABORT("OOM");
|
|
|
|
}
|
|
|
|
mClosure = aData.mClosure;
|
|
|
|
}
|
2010-05-18 05:28:37 -07:00
|
|
|
|
|
|
|
NS_IMETHOD Run()
|
|
|
|
{
|
2012-12-18 09:08:03 -08:00
|
|
|
if (mRun) {
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
mRun = true;
|
2010-06-11 04:14:01 -07:00
|
|
|
mTabChild->mASyncMessages.RemoveElement(this);
|
2010-05-18 05:28:37 -07:00
|
|
|
if (mTabChild->mChromeMessageManager) {
|
2012-08-01 23:02:29 -07:00
|
|
|
StructuredCloneData data;
|
|
|
|
data.mData = mData.data();
|
|
|
|
data.mDataLength = mData.nbytes();
|
|
|
|
data.mClosure = mClosure;
|
|
|
|
|
2011-06-16 11:21:08 -07:00
|
|
|
nsRefPtr<nsFrameMessageManager> mm = mTabChild->mChromeMessageManager;
|
2012-08-01 23:02:29 -07:00
|
|
|
mm->ReceiveMessage(mTabChild->mOwner, mMessage, false, &data,
|
2013-06-30 08:00:18 -07:00
|
|
|
JS::NullPtr(), nullptr);
|
2010-05-18 05:28:37 -07:00
|
|
|
}
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
nsRefPtr<nsInProcessTabChildGlobal> mTabChild;
|
|
|
|
nsString mMessage;
|
2012-08-01 23:02:29 -07:00
|
|
|
JSAutoStructuredCloneBuffer mData;
|
|
|
|
StructuredCloneClosure mClosure;
|
2012-12-18 09:08:03 -08:00
|
|
|
// True if this runnable has already been called. This can happen if DoSendSyncMessage
|
|
|
|
// is called while waiting for an asynchronous message send.
|
|
|
|
bool mRun;
|
2010-05-18 05:28:37 -07:00
|
|
|
};
|
|
|
|
|
2012-09-27 22:43:12 -07:00
|
|
|
bool
|
|
|
|
nsInProcessTabChildGlobal::DoSendAsyncMessage(const nsAString& aMessage,
|
|
|
|
const StructuredCloneData& aData)
|
2010-05-18 05:28:37 -07:00
|
|
|
{
|
2010-06-11 04:14:01 -07:00
|
|
|
nsCOMPtr<nsIRunnable> ev =
|
2012-09-27 22:43:12 -07:00
|
|
|
new nsAsyncMessageToParent(this, aMessage, aData);
|
|
|
|
mASyncMessages.AppendElement(ev);
|
2010-05-18 05:28:37 -07:00
|
|
|
NS_DispatchToCurrentThread(ev);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsInProcessTabChildGlobal::nsInProcessTabChildGlobal(nsIDocShell* aShell,
|
|
|
|
nsIContent* aOwner,
|
|
|
|
nsFrameMessageManager* aChrome)
|
2011-10-17 07:59:28 -07:00
|
|
|
: mDocShell(aShell), mInitialized(false), mLoadingScript(false),
|
|
|
|
mDelayedDisconnect(false), mOwner(aOwner), mChromeMessageManager(aChrome)
|
2010-05-18 05:28:37 -07:00
|
|
|
{
|
2012-05-08 09:20:35 -07:00
|
|
|
|
Bug 802366 - The main event: Let a browser process inherit its app's id. r=bz,cjones
The main bug fixed here is that in half of our interfaces, we use "is browser frame/element" to mean "browser or app", and in the other half, we use it to mean "is browser not app".
There's a related, functional bug also fixed here, which is that a browser process doesn't inherit its parent's app-id. This causes problems e.g. for IndexedDB: If a browser inside an app uses IndexedDB, the DB should have the app's app-id.
I also modified Tab{Parent,Child} and nsFrameLoader to call "app" "ownOrContainingApp", to emphasize that we might have inherited the app from a parent process. I left nsIDocShell::appId alone, because changing that would have necessitated changing nsILoadGroup and therefore a /lot/ of users in Necko; it's also not clear it would have clarified anything in those cases.
2012-11-10 10:32:37 -08:00
|
|
|
// If owner corresponds to an <iframe mozbrowser> or <iframe mozapp>, we'll
|
|
|
|
// have to tweak our PreHandleEvent implementation.
|
2012-05-08 09:20:35 -07:00
|
|
|
nsCOMPtr<nsIMozBrowserFrame> browserFrame = do_QueryInterface(mOwner);
|
|
|
|
if (browserFrame) {
|
Bug 802366 - The main event: Let a browser process inherit its app's id. r=bz,cjones
The main bug fixed here is that in half of our interfaces, we use "is browser frame/element" to mean "browser or app", and in the other half, we use it to mean "is browser not app".
There's a related, functional bug also fixed here, which is that a browser process doesn't inherit its parent's app-id. This causes problems e.g. for IndexedDB: If a browser inside an app uses IndexedDB, the DB should have the app's app-id.
I also modified Tab{Parent,Child} and nsFrameLoader to call "app" "ownOrContainingApp", to emphasize that we might have inherited the app from a parent process. I left nsIDocShell::appId alone, because changing that would have necessitated changing nsILoadGroup and therefore a /lot/ of users in Necko; it's also not clear it would have clarified anything in those cases.
2012-11-10 10:32:37 -08:00
|
|
|
mIsBrowserOrAppFrame = browserFrame->GetReallyIsBrowserOrApp();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
mIsBrowserOrAppFrame = false;
|
2012-05-08 09:20:35 -07:00
|
|
|
}
|
2010-05-18 05:28:37 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
nsInProcessTabChildGlobal::~nsInProcessTabChildGlobal()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-08-09 01:33:38 -07:00
|
|
|
/* [notxpcom] boolean markForCC (); */
|
|
|
|
// This method isn't automatically forwarded safely because it's notxpcom, so
|
|
|
|
// the IDL binding doesn't know what value to return.
|
|
|
|
NS_IMETHODIMP_(bool)
|
|
|
|
nsInProcessTabChildGlobal::MarkForCC()
|
|
|
|
{
|
|
|
|
return mMessageManager ? mMessageManager->MarkForCC() : false;
|
|
|
|
}
|
|
|
|
|
2010-05-18 05:28:37 -07:00
|
|
|
nsresult
|
|
|
|
nsInProcessTabChildGlobal::Init()
|
|
|
|
{
|
2011-04-14 05:04:12 -07:00
|
|
|
#ifdef DEBUG
|
|
|
|
nsresult rv =
|
|
|
|
#endif
|
|
|
|
InitTabChildGlobal();
|
2010-05-18 05:28:37 -07:00
|
|
|
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
|
|
|
|
"Couldn't initialize nsInProcessTabChildGlobal");
|
2012-09-27 22:43:12 -07:00
|
|
|
mMessageManager = new nsFrameMessageManager(this,
|
2012-07-30 07:20:58 -07:00
|
|
|
nullptr,
|
2012-09-27 22:43:12 -07:00
|
|
|
mozilla::dom::ipc::MM_CHILD);
|
2010-05-18 05:28:37 -07:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2013-07-02 22:30:36 -07:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_INHERITED_2(nsInProcessTabChildGlobal,
|
|
|
|
nsDOMEventTargetHelper,
|
|
|
|
mMessageManager,
|
|
|
|
mGlobal)
|
2010-05-18 05:28:37 -07:00
|
|
|
|
|
|
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsInProcessTabChildGlobal)
|
2012-08-27 07:13:02 -07:00
|
|
|
NS_INTERFACE_MAP_ENTRY(nsIMessageListenerManager)
|
|
|
|
NS_INTERFACE_MAP_ENTRY(nsIMessageSender)
|
2010-08-31 11:58:35 -07:00
|
|
|
NS_INTERFACE_MAP_ENTRY(nsISyncMessageSender)
|
2010-05-18 05:28:37 -07:00
|
|
|
NS_INTERFACE_MAP_ENTRY(nsIContentFrameMessageManager)
|
|
|
|
NS_INTERFACE_MAP_ENTRY(nsIInProcessContentFrameMessageManager)
|
|
|
|
NS_INTERFACE_MAP_ENTRY(nsIScriptObjectPrincipal)
|
2013-04-04 02:27:06 -07:00
|
|
|
NS_INTERFACE_MAP_ENTRY(nsIGlobalObject)
|
2013-04-04 02:27:40 -07:00
|
|
|
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
2010-05-18 05:28:37 -07:00
|
|
|
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(ContentFrameMessageManager)
|
2012-02-07 18:53:33 -08:00
|
|
|
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
|
2010-05-18 05:28:37 -07:00
|
|
|
|
|
|
|
NS_IMPL_ADDREF_INHERITED(nsInProcessTabChildGlobal, nsDOMEventTargetHelper)
|
|
|
|
NS_IMPL_RELEASE_INHERITED(nsInProcessTabChildGlobal, nsDOMEventTargetHelper)
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsInProcessTabChildGlobal::GetContent(nsIDOMWindow** aContent)
|
|
|
|
{
|
2012-07-30 07:20:58 -07:00
|
|
|
*aContent = nullptr;
|
2010-05-18 05:28:37 -07:00
|
|
|
nsCOMPtr<nsIDOMWindow> window = do_GetInterface(mDocShell);
|
|
|
|
window.swap(*aContent);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsInProcessTabChildGlobal::GetDocShell(nsIDocShell** aDocShell)
|
|
|
|
{
|
|
|
|
NS_IF_ADDREF(*aDocShell = mDocShell);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2011-06-25 02:52:00 -07:00
|
|
|
NS_IMETHODIMP
|
|
|
|
nsInProcessTabChildGlobal::Btoa(const nsAString& aBinaryData,
|
|
|
|
nsAString& aAsciiBase64String)
|
|
|
|
{
|
|
|
|
return nsContentUtils::Btoa(aBinaryData, aAsciiBase64String);
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsInProcessTabChildGlobal::Atob(const nsAString& aAsciiString,
|
|
|
|
nsAString& aBinaryData)
|
|
|
|
{
|
|
|
|
return nsContentUtils::Atob(aAsciiString, aBinaryData);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-11-24 05:58:21 -08:00
|
|
|
NS_IMETHODIMP
|
|
|
|
nsInProcessTabChildGlobal::PrivateNoteIntentionalCrash()
|
|
|
|
{
|
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2010-05-18 05:28:37 -07:00
|
|
|
void
|
|
|
|
nsInProcessTabChildGlobal::Disconnect()
|
|
|
|
{
|
2010-08-12 09:47:22 -07:00
|
|
|
// Let the frame scripts know the child is being closed. We do any other
|
|
|
|
// cleanup after the event has been fired. See DelayedDisconnect
|
|
|
|
nsContentUtils::AddScriptRunner(
|
|
|
|
NS_NewRunnableMethod(this, &nsInProcessTabChildGlobal::DelayedDisconnect)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
nsInProcessTabChildGlobal::DelayedDisconnect()
|
|
|
|
{
|
|
|
|
// Don't let the event escape
|
2012-07-30 07:20:58 -07:00
|
|
|
mOwner = nullptr;
|
2010-08-12 09:47:22 -07:00
|
|
|
|
|
|
|
// Fire the "unload" event
|
2012-09-27 13:11:31 -07:00
|
|
|
nsDOMEventTargetHelper::DispatchTrustedEvent(NS_LITERAL_STRING("unload"));
|
2010-08-12 09:47:22 -07:00
|
|
|
|
|
|
|
// Continue with the Disconnect cleanup
|
2010-06-16 04:42:42 -07:00
|
|
|
nsCOMPtr<nsIDOMWindow> win = do_GetInterface(mDocShell);
|
|
|
|
nsCOMPtr<nsPIDOMWindow> pwin = do_QueryInterface(win);
|
|
|
|
if (pwin) {
|
|
|
|
pwin->SetChromeEventHandler(pwin->GetChromeEventHandler());
|
|
|
|
}
|
2012-07-30 07:20:58 -07:00
|
|
|
mDocShell = nullptr;
|
|
|
|
mChromeMessageManager = nullptr;
|
2010-05-18 05:28:37 -07:00
|
|
|
if (mMessageManager) {
|
|
|
|
static_cast<nsFrameMessageManager*>(mMessageManager.get())->Disconnect();
|
2012-07-30 07:20:58 -07:00
|
|
|
mMessageManager = nullptr;
|
2010-05-18 05:28:37 -07:00
|
|
|
}
|
2010-08-23 01:44:43 -07:00
|
|
|
if (mListenerManager) {
|
|
|
|
mListenerManager->Disconnect();
|
|
|
|
}
|
2013-04-19 15:18:33 -07:00
|
|
|
|
2010-05-18 05:28:37 -07:00
|
|
|
if (!mLoadingScript) {
|
2013-04-19 15:18:33 -07:00
|
|
|
nsContentUtils::ReleaseWrapper(static_cast<EventTarget*>(this), this);
|
2013-06-30 08:00:20 -07:00
|
|
|
mGlobal = nullptr;
|
2010-05-18 05:28:37 -07:00
|
|
|
} else {
|
2011-10-17 07:59:28 -07:00
|
|
|
mDelayedDisconnect = true;
|
2010-05-18 05:28:37 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP_(nsIContent *)
|
|
|
|
nsInProcessTabChildGlobal::GetOwnerContent()
|
|
|
|
{
|
|
|
|
return mOwner;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
nsInProcessTabChildGlobal::PreHandleEvent(nsEventChainPreVisitor& aVisitor)
|
|
|
|
{
|
2011-10-17 07:59:28 -07:00
|
|
|
aVisitor.mCanHandle = true;
|
2012-05-08 09:20:35 -07:00
|
|
|
|
Bug 802366 - The main event: Let a browser process inherit its app's id. r=bz,cjones
The main bug fixed here is that in half of our interfaces, we use "is browser frame/element" to mean "browser or app", and in the other half, we use it to mean "is browser not app".
There's a related, functional bug also fixed here, which is that a browser process doesn't inherit its parent's app-id. This causes problems e.g. for IndexedDB: If a browser inside an app uses IndexedDB, the DB should have the app's app-id.
I also modified Tab{Parent,Child} and nsFrameLoader to call "app" "ownOrContainingApp", to emphasize that we might have inherited the app from a parent process. I left nsIDocShell::appId alone, because changing that would have necessitated changing nsILoadGroup and therefore a /lot/ of users in Necko; it's also not clear it would have clarified anything in those cases.
2012-11-10 10:32:37 -08:00
|
|
|
if (mIsBrowserOrAppFrame &&
|
2012-06-20 12:25:23 -07:00
|
|
|
(!mOwner || !nsContentUtils::IsInChromeDocshell(mOwner->OwnerDoc()))) {
|
2012-05-08 09:20:35 -07:00
|
|
|
if (mOwner) {
|
|
|
|
nsPIDOMWindow* innerWindow = mOwner->OwnerDoc()->GetInnerWindow();
|
|
|
|
if (innerWindow) {
|
|
|
|
aVisitor.mParentTarget = innerWindow->GetParentTarget();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
aVisitor.mParentTarget = mOwner;
|
|
|
|
}
|
2010-05-18 05:28:37 -07:00
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
if (mOwner) {
|
|
|
|
nsCOMPtr<nsIFrameLoaderOwner> owner = do_QueryInterface(mOwner);
|
|
|
|
nsRefPtr<nsFrameLoader> fl = owner->GetFrameLoader();
|
|
|
|
if (fl) {
|
|
|
|
NS_ASSERTION(this == fl->GetTabChildGlobalAsEventTarget(),
|
|
|
|
"Wrong event target!");
|
|
|
|
NS_ASSERTION(fl->mMessageManager == mChromeMessageManager,
|
|
|
|
"Wrong message manager!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
nsInProcessTabChildGlobal::InitTabChildGlobal()
|
|
|
|
{
|
2013-02-20 02:39:59 -08:00
|
|
|
nsAutoCString id;
|
|
|
|
id.AssignLiteral("inProcessTabChildGlobal");
|
|
|
|
nsIURI* uri = mOwner->OwnerDoc()->GetDocumentURI();
|
|
|
|
if (uri) {
|
|
|
|
nsAutoCString u;
|
|
|
|
uri->GetSpec(u);
|
|
|
|
id.AppendLiteral("?ownedBy=");
|
|
|
|
id.Append(u);
|
|
|
|
}
|
2013-04-19 15:18:33 -07:00
|
|
|
nsISupports* scopeSupports = NS_ISUPPORTS_CAST(EventTarget*, this);
|
2013-02-20 02:39:59 -08:00
|
|
|
NS_ENSURE_STATE(InitTabChildGlobalInternal(scopeSupports, id));
|
2010-05-18 05:28:37 -07:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2011-05-19 07:48:17 -07:00
|
|
|
class nsAsyncScriptLoad : public nsRunnable
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsAsyncScriptLoad(nsInProcessTabChildGlobal* aTabChild, const nsAString& aURL)
|
|
|
|
: mTabChild(aTabChild), mURL(aURL) {}
|
|
|
|
|
|
|
|
NS_IMETHOD Run()
|
|
|
|
{
|
|
|
|
mTabChild->LoadFrameScript(mURL);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
nsRefPtr<nsInProcessTabChildGlobal> mTabChild;
|
|
|
|
nsString mURL;
|
|
|
|
};
|
|
|
|
|
2010-05-18 05:28:37 -07:00
|
|
|
void
|
|
|
|
nsInProcessTabChildGlobal::LoadFrameScript(const nsAString& aURL)
|
|
|
|
{
|
2011-05-19 07:48:17 -07:00
|
|
|
if (!nsContentUtils::IsSafeToRunScript()) {
|
|
|
|
nsContentUtils::AddScriptRunner(new nsAsyncScriptLoad(this, aURL));
|
|
|
|
return;
|
|
|
|
}
|
2010-05-18 05:28:37 -07:00
|
|
|
if (!mInitialized) {
|
2011-10-17 07:59:28 -07:00
|
|
|
mInitialized = true;
|
2010-05-18 05:28:37 -07:00
|
|
|
Init();
|
|
|
|
}
|
2011-09-28 23:19:26 -07:00
|
|
|
bool tmp = mLoadingScript;
|
2011-10-17 07:59:28 -07:00
|
|
|
mLoadingScript = true;
|
2010-08-10 10:18:26 -07:00
|
|
|
LoadFrameScriptInternal(aURL);
|
|
|
|
mLoadingScript = tmp;
|
2010-05-18 05:28:37 -07:00
|
|
|
if (!mLoadingScript && mDelayedDisconnect) {
|
2011-10-17 07:59:28 -07:00
|
|
|
mDelayedDisconnect = false;
|
2010-05-18 05:28:37 -07:00
|
|
|
Disconnect();
|
|
|
|
}
|
|
|
|
}
|