summaryrefslogtreecommitdiff
path: root/www/firefox/patches/patch-bugzilla-319004
diff options
context:
space:
mode:
Diffstat (limited to 'www/firefox/patches/patch-bugzilla-319004')
-rw-r--r--www/firefox/patches/patch-bugzilla-319004128
1 files changed, 0 insertions, 128 deletions
diff --git a/www/firefox/patches/patch-bugzilla-319004 b/www/firefox/patches/patch-bugzilla-319004
deleted file mode 100644
index 2bac02d9a52..00000000000
--- a/www/firefox/patches/patch-bugzilla-319004
+++ /dev/null
@@ -1,128 +0,0 @@
-$NetBSD: patch-bugzilla-319004,v 1.1 2005/12/10 13:47:22 taya Exp $
-
-Index: toolkit/components/history/src/nsGlobalHistory.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/toolkit/components/history/src/nsGlobalHistory.cpp,v
-retrieving revision 1.63
-diff -u -8 -r1.63 nsGlobalHistory.cpp
---- toolkit/components/history/src/nsGlobalHistory.cpp 17 Nov 2005 00:23:09 -0000 1.63
-+++ toolkit/components/history/src/nsGlobalHistory.cpp 9 Dec 2005 08:30:42 -0000
-@@ -108,16 +108,20 @@
-
- #define PREF_BRANCH_BASE "browser."
- #define PREF_BROWSER_HISTORY_EXPIRE_DAYS "history_expire_days"
- #define PREF_AUTOCOMPLETE_ONLY_TYPED "urlbar.matchOnlyTyped"
- #define PREF_AUTOCOMPLETE_ENABLED "urlbar.autocomplete.enabled"
-
- #define FIND_BY_AGEINDAYS_PREFIX "find:datasource=history&match=AgeInDays&method="
-
-+// see bug #319004 -- clamp title and URL to generously-large but not too large
-+// length
-+#define HISTORY_STRING_LENGTH_MAX 65536
-+
- // sync history every 10 seconds
- #define HISTORY_SYNC_TIMEOUT (10 * PR_MSEC_PER_SEC)
- //#define HISTORY_SYNC_TIMEOUT 3000 // every 3 seconds - testing only!
-
- // the value of mLastNow expires every 3 seconds
- #define HISTORY_EXPIRE_NOW_TIMEOUT (3 * PR_MSEC_PER_SEC)
-
- #define MSECS_PER_DAY (PR_MSEC_PER_SEC * 60 * 60 * 24)
-@@ -1105,30 +1109,33 @@
- }
-
- NS_IMETHODIMP
- nsGlobalHistory::SetPageTitle(nsIURI *aURI, const nsAString& aTitle)
- {
- nsresult rv;
- NS_ENSURE_ARG_POINTER(aURI);
-
-- const nsAFlatString& titleString = PromiseFlatString(aTitle);
-+ nsAutoString titleString(Substring(aTitle, 0, HISTORY_STRING_LENGTH_MAX));
-
- // skip about: URIs to avoid reading in the db (about:blank, especially)
- PRBool isAbout;
- rv = aURI->SchemeIs("about", &isAbout);
- NS_ENSURE_SUCCESS(rv, rv);
- if (isAbout) return NS_OK;
-
- NS_ENSURE_SUCCESS(OpenDB(), NS_ERROR_FAILURE);
-
- nsCAutoString URISpec;
- rv = aURI->GetSpec(URISpec);
- NS_ENSURE_SUCCESS(rv, rv);
-
-+ if (URISpec.Length() > HISTORY_STRING_LENGTH_MAX)
-+ URISpec.Left(URISpec, HISTORY_STRING_LENGTH_MAX);
-+
- nsCOMPtr<nsIMdbRow> row;
- rv = FindRow(kToken_URLColumn, URISpec.get(), getter_AddRefs(row));
-
- // if the row doesn't exist, we silently succeed
- if (rv == NS_ERROR_NOT_AVAILABLE) return NS_OK;
- NS_ENSURE_SUCCESS(rv, rv);
-
- // Get the old title so we can notify observers
-Index: xpfe/components/history/src/nsGlobalHistory.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp,v
-retrieving revision 1.213
-diff -u -8 -p -r1.213 nsGlobalHistory.cpp
---- xpfe/components/history/src/nsGlobalHistory.cpp 26 Oct 2005 16:50:47 -0000 1.213
-+++ xpfe/components/history/src/nsGlobalHistory.cpp 9 Dec 2005 08:47:37 -0000
-@@ -106,16 +106,20 @@ nsIPrefBranch* nsGlobalHistory::gPrefBra
-
- #define PREF_BRANCH_BASE "browser."
- #define PREF_BROWSER_HISTORY_EXPIRE_DAYS "history_expire_days"
- #define PREF_AUTOCOMPLETE_ONLY_TYPED "urlbar.matchOnlyTyped"
- #define PREF_AUTOCOMPLETE_ENABLED "urlbar.autocomplete.enabled"
-
- #define FIND_BY_AGEINDAYS_PREFIX "find:datasource=history&match=AgeInDays&method="
-
-+// see bug #319004 -- clamp title and URL to generously-large but not too large
-+// length
-+#define HISTORY_STRING_LENGTH_MAX 65536
-+
- // sync history every 10 seconds
- #define HISTORY_SYNC_TIMEOUT (10 * PR_MSEC_PER_SEC)
- //#define HISTORY_SYNC_TIMEOUT 3000 // every 3 seconds - testing only!
-
- // the value of mLastNow expires every 3 seconds
- #define HISTORY_EXPIRE_NOW_TIMEOUT (3 * PR_MSEC_PER_SEC)
-
- static const PRInt64 MSECS_PER_DAY = LL_INIT(20, 500654080); // (1000000LL * 60 * 60 * 24)
-@@ -1028,30 +1032,33 @@ nsGlobalHistory::GetCount(PRUint32* aCou
- }
-
- NS_IMETHODIMP
- nsGlobalHistory::SetPageTitle(nsIURI *aURI, const nsAString& aTitle)
- {
- nsresult rv;
- NS_ENSURE_ARG_POINTER(aURI);
-
-- const nsAFlatString& titleString = PromiseFlatString(aTitle);
-+ nsAutoString titleString(Substring(aTitle, 0, HISTORY_STRING_LENGTH_MAX));
-
- // skip about: URIs to avoid reading in the db (about:blank, especially)
- PRBool isAbout;
- rv = aURI->SchemeIs("about", &isAbout);
- NS_ENSURE_SUCCESS(rv, rv);
- if (isAbout) return NS_OK;
-
- NS_ENSURE_SUCCESS(OpenDB(), NS_ERROR_FAILURE);
-
- nsCAutoString URISpec;
- rv = aURI->GetSpec(URISpec);
- NS_ENSURE_SUCCESS(rv, rv);
-
-+ if (URISpec.Length() > HISTORY_STRING_LENGTH_MAX)
-+ URISpec.Left(URISpec, HISTORY_STRING_LENGTH_MAX);
-+
- nsCOMPtr<nsIMdbRow> row;
- rv = FindRow(kToken_URLColumn, URISpec.get(), getter_AddRefs(row));
-
- // if the row doesn't exist, we silently succeed
- if (rv == NS_ERROR_NOT_AVAILABLE) return NS_OK;
- NS_ENSURE_SUCCESS(rv, rv);
-
- // Get the old title so we can notify observers