summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/xulrunner/files/esr10.4')
-rw-r--r--net-libs/xulrunner/files/esr10.454
1 files changed, 54 insertions, 0 deletions
diff --git a/net-libs/xulrunner/files/esr10.4 b/net-libs/xulrunner/files/esr10.4
new file mode 100644
index 0000000..292d150
--- /dev/null
+++ b/net-libs/xulrunner/files/esr10.4
@@ -0,0 +1,54 @@
+
+# HG changeset patch
+# User Mats Palmgren <matspal@gmail.com>
+# Date 1333489933 -7200
+# Node ID 076f467733b45aa2e058a3d2318d2eb956b449b3
+# Parent f66c6b1c5ee647a22acf29b357bbf4284c6f7d55
+Bug 732941 - Deal with OOM when copying nsCOMArray. r=bz a=akeybl
+
+diff --git a/layout/generic/nsSelection.cpp b/layout/generic/nsSelection.cpp
+--- a/layout/generic/nsSelection.cpp
++++ b/layout/generic/nsSelection.cpp
+@@ -5727,34 +5727,33 @@ nsTypedSelection::RemoveSelectionListene
+
+
+ nsresult
+ nsTypedSelection::NotifySelectionListeners()
+ {
+ if (!mFrameSelection)
+ return NS_OK;//nothing to do
+
+- if (mFrameSelection->GetBatching()){
++ if (mFrameSelection->GetBatching()) {
+ mFrameSelection->SetDirty();
+ return NS_OK;
+ }
+- PRInt32 cnt = mSelectionListeners.Count();
+ nsCOMArray<nsISelectionListener> selectionListeners(mSelectionListeners);
+-
++ PRInt32 cnt = selectionListeners.Count();
++ if (cnt != mSelectionListeners.Count()) {
++ return NS_ERROR_OUT_OF_MEMORY; // nsCOMArray is fallible
++ }
+ nsCOMPtr<nsIDOMDocument> domdoc;
+ nsCOMPtr<nsIPresShell> shell;
+ nsresult rv = GetPresShell(getter_AddRefs(shell));
+ if (NS_SUCCEEDED(rv) && shell)
+ domdoc = do_QueryInterface(shell->GetDocument());
+ short reason = mFrameSelection->PopReason();
+- for (PRInt32 i = 0; i < cnt; i++)
+- {
+- nsISelectionListener* thisListener = selectionListeners[i];
+- if (thisListener)
+- thisListener->NotifySelectionChanged(domdoc, this, reason);
++ for (PRInt32 i = 0; i < cnt; i++) {
++ selectionListeners[i]->NotifySelectionChanged(domdoc, this, reason);
+ }
+ return NS_OK;
+ }
+
+ NS_IMETHODIMP
+ nsTypedSelection::StartBatchChanges()
+ {
+ if (mFrameSelection)
+