From ccab7ad794e0542660f16f545db112f6afdcda6b Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Tue, 27 Jul 2010 11:49:33 -0700 Subject: [PATCH] Backed out changeset 2335c842c06c due to test failures. --- dom/base/nsGlobalWindow.cpp | 15 ++++----------- dom/base/nsGlobalWindow.h | 10 ++-------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 4f82d05da50..162bd7276c5 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -103,9 +103,7 @@ #include "nsIHTMLDocument.h" #include "nsIDOMHTMLDocument.h" #include "nsIDOMHTMLElement.h" -#ifndef MOZ_IPC #include "nsIDOMCrypto.h" -#endif #include "nsIDOMDocument.h" #include "nsIDOM3Document.h" #include "nsIDOMNSDocument.h" @@ -390,10 +388,10 @@ static PRBool gDOMWindowDumpEnabled = PR_FALSE; static NS_DEFINE_CID(kXULControllersCID, NS_XULCONTROLLERS_CID); static const char sJSStackContractID[] = "@mozilla.org/js/xpc/ContextStack;1"; -#ifndef MOZ_IPC + static const char kCryptoContractID[] = NS_CRYPTO_CONTRACTID; static const char kPkcs11ContractID[] = NS_PKCS11_CONTRACTID; -#endif + static const char sPopStatePrefStr[] = "browser.history.allowPopState"; static PRBool @@ -1642,12 +1640,12 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument, NS_ENSURE_TRUE(scx, NS_ERROR_NOT_INITIALIZED); JSContext *cx = (JSContext *)scx->GetNativeContext(); -#ifndef MOZ_IPC + // clear smartcard events, our document has gone away. if (mCrypto) { mCrypto->SetEnableSmartCardEvents(PR_FALSE); } -#endif + if (!mDocument) { // First document load. @@ -2946,10 +2944,6 @@ nsGlobalWindow::GetApplicationCache(nsIDOMOfflineResourceList **aApplicationCach NS_IMETHODIMP nsGlobalWindow::GetCrypto(nsIDOMCrypto** aCrypto) { -#ifdef MOZ_IPC - return NS_ERROR_NOT_IMPLEMENTED; -#else - FORWARD_TO_OUTER(GetCrypto, (aCrypto), NS_ERROR_NOT_INITIALIZED); if (!mCrypto) { @@ -2959,7 +2953,6 @@ nsGlobalWindow::GetCrypto(nsIDOMCrypto** aCrypto) NS_IF_ADDREF(*aCrypto = mCrypto); return NS_OK; -#endif } NS_IMETHODIMP diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h index 55e837a7b49..15d26d29efc 100644 --- a/dom/base/nsGlobalWindow.h +++ b/dom/base/nsGlobalWindow.h @@ -83,9 +83,7 @@ #include "nsIScriptSecurityManager.h" #include "nsIEventListenerManager.h" #include "nsIDOMDocument.h" -#ifndef MOZ_IPC #include "nsIDOMCrypto.h" -#endif #include "nsIPrincipal.h" #include "nsPluginArray.h" #include "nsMimeTypeArray.h" @@ -133,10 +131,6 @@ class nsRunnable; class nsDOMOfflineResourceList; class nsGeolocation; -#ifdef MOZ_IPC -class nsIDOMCrypto; -#endif - extern nsresult NS_CreateJSTimeoutHandler(nsGlobalWindow *aWindow, PRBool *aIsInterval, @@ -795,9 +789,9 @@ protected: nsString mDefaultStatus; // index 0->language_id 1, so index MAX-1 == language_id MAX nsGlobalWindowObserver* mObserver; -#ifndef MOZ_IPC + nsCOMPtr mCrypto; -#endif + nsCOMPtr mLocalStorage; nsCOMPtr mSessionStorage;