[SVN-Commit] r1819 - in trunk: mail/thunderbird/files www/firefox-esr/files www/firefox-nightly/files www/firefox/files www/libxul/files www/seamonkey/files

svn-freebsd-gecko at chruetertee.ch svn-freebsd-gecko at chruetertee.ch
Fri Feb 27 13:23:51 UTC 2015


Author: jbeich
Date: Fri Feb 27 13:23:36 2015
New Revision: 1819

Log:
Check if NS_NewNativeLocalFile() succeeds before using

Obtained from:	PkgSrc

Modified:
   trunk/mail/thunderbird/files/patch-bug991253
   trunk/www/firefox-esr/files/patch-bug991253
   trunk/www/firefox-nightly/files/patch-bug991253
   trunk/www/firefox/files/patch-bug991253
   trunk/www/libxul/files/patch-bug991253
   trunk/www/seamonkey/files/patch-bug991253

Modified: trunk/mail/thunderbird/files/patch-bug991253
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug991253	Mon Feb 23 22:44:53 2015	(r1818)
+++ trunk/mail/thunderbird/files/patch-bug991253	Fri Feb 27 13:23:36 2015	(r1819)
@@ -1,14 +1,16 @@
 --- mozilla/extensions/spellcheck/hunspell/src/mozHunspell.cpp~
 +++ mozilla/extensions/spellcheck/hunspell/src/mozHunspell.cpp
-@@ -400,6 +400,12 @@ mozHunspell::LoadDictionaryList()
+@@ -400,6 +400,14 @@ mozHunspell::LoadDictionaryList(bool aNo
      }
    }
  
 +  // load system hunspell dictionaries
-+  nsIFile* hunDir;
++  nsCOMPtr<nsIFile> hunDir;
 +  NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
-+			true, &hunDir);
-+  LoadDictionariesFromDir(hunDir);
++                        true, getter_AddRefs(hunDir));
++  if (hunDir) {
++      LoadDictionariesFromDir(hunDir);
++  }
 +
    // find dictionaries from extensions requiring restart
    nsCOMPtr<nsISimpleEnumerator> dictDirs;

Modified: trunk/www/firefox-esr/files/patch-bug991253
==============================================================================
--- trunk/www/firefox-esr/files/patch-bug991253	Mon Feb 23 22:44:53 2015	(r1818)
+++ trunk/www/firefox-esr/files/patch-bug991253	Fri Feb 27 13:23:36 2015	(r1819)
@@ -1,14 +1,16 @@
 --- extensions/spellcheck/hunspell/src/mozHunspell.cpp~
 +++ extensions/spellcheck/hunspell/src/mozHunspell.cpp
-@@ -400,6 +400,12 @@ mozHunspell::LoadDictionaryList()
+@@ -400,6 +400,14 @@ mozHunspell::LoadDictionaryList(bool aNo
      }
    }
  
 +  // load system hunspell dictionaries
-+  nsIFile* hunDir;
++  nsCOMPtr<nsIFile> hunDir;
 +  NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
-+			true, &hunDir);
-+  LoadDictionariesFromDir(hunDir);
++                        true, getter_AddRefs(hunDir));
++  if (hunDir) {
++      LoadDictionariesFromDir(hunDir);
++  }
 +
    // find dictionaries from extensions requiring restart
    nsCOMPtr<nsISimpleEnumerator> dictDirs;

Modified: trunk/www/firefox-nightly/files/patch-bug991253
==============================================================================
--- trunk/www/firefox-nightly/files/patch-bug991253	Mon Feb 23 22:44:53 2015	(r1818)
+++ trunk/www/firefox-nightly/files/patch-bug991253	Fri Feb 27 13:23:36 2015	(r1819)
@@ -1,14 +1,16 @@
 --- extensions/spellcheck/hunspell/src/mozHunspell.cpp~
 +++ extensions/spellcheck/hunspell/src/mozHunspell.cpp
-@@ -400,6 +400,12 @@ mozHunspell::LoadDictionaryList()
+@@ -400,6 +400,14 @@ mozHunspell::LoadDictionaryList(bool aNo
      }
    }
  
 +  // load system hunspell dictionaries
-+  nsIFile* hunDir;
++  nsCOMPtr<nsIFile> hunDir;
 +  NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
-+			true, &hunDir);
-+  LoadDictionariesFromDir(hunDir);
++                        true, getter_AddRefs(hunDir));
++  if (hunDir) {
++      LoadDictionariesFromDir(hunDir);
++  }
 +
    // find dictionaries from extensions requiring restart
    nsCOMPtr<nsISimpleEnumerator> dictDirs;

Modified: trunk/www/firefox/files/patch-bug991253
==============================================================================
--- trunk/www/firefox/files/patch-bug991253	Mon Feb 23 22:44:53 2015	(r1818)
+++ trunk/www/firefox/files/patch-bug991253	Fri Feb 27 13:23:36 2015	(r1819)
@@ -1,14 +1,16 @@
 --- extensions/spellcheck/hunspell/src/mozHunspell.cpp~
 +++ extensions/spellcheck/hunspell/src/mozHunspell.cpp
-@@ -400,6 +400,12 @@ mozHunspell::LoadDictionaryList()
+@@ -400,6 +400,14 @@ mozHunspell::LoadDictionaryList(bool aNo
      }
    }
  
 +  // load system hunspell dictionaries
-+  nsIFile* hunDir;
++  nsCOMPtr<nsIFile> hunDir;
 +  NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
-+			true, &hunDir);
-+  LoadDictionariesFromDir(hunDir);
++                        true, getter_AddRefs(hunDir));
++  if (hunDir) {
++      LoadDictionariesFromDir(hunDir);
++  }
 +
    // find dictionaries from extensions requiring restart
    nsCOMPtr<nsISimpleEnumerator> dictDirs;

Modified: trunk/www/libxul/files/patch-bug991253
==============================================================================
--- trunk/www/libxul/files/patch-bug991253	Mon Feb 23 22:44:53 2015	(r1818)
+++ trunk/www/libxul/files/patch-bug991253	Fri Feb 27 13:23:36 2015	(r1819)
@@ -1,14 +1,16 @@
 --- extensions/spellcheck/hunspell/src/mozHunspell.cpp~
 +++ extensions/spellcheck/hunspell/src/mozHunspell.cpp
-@@ -400,6 +400,12 @@ mozHunspell::LoadDictionaryList()
+@@ -400,6 +400,14 @@ mozHunspell::LoadDictionaryList(bool aNo
      }
    }
  
 +  // load system hunspell dictionaries
-+  nsIFile* hunDir;
++  nsCOMPtr<nsIFile> hunDir;
 +  NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
-+			true, &hunDir);
-+  LoadDictionariesFromDir(hunDir);
++                        true, getter_AddRefs(hunDir));
++  if (hunDir) {
++      LoadDictionariesFromDir(hunDir);
++  }
 +
    // find dictionaries from extensions requiring restart
    nsCOMPtr<nsISimpleEnumerator> dictDirs;

Modified: trunk/www/seamonkey/files/patch-bug991253
==============================================================================
--- trunk/www/seamonkey/files/patch-bug991253	Mon Feb 23 22:44:53 2015	(r1818)
+++ trunk/www/seamonkey/files/patch-bug991253	Fri Feb 27 13:23:36 2015	(r1819)
@@ -1,14 +1,16 @@
 --- mozilla/extensions/spellcheck/hunspell/src/mozHunspell.cpp~
 +++ mozilla/extensions/spellcheck/hunspell/src/mozHunspell.cpp
-@@ -400,6 +400,12 @@ mozHunspell::LoadDictionaryList()
+@@ -400,6 +400,14 @@ mozHunspell::LoadDictionaryList(bool aNo
      }
    }
  
 +  // load system hunspell dictionaries
-+  nsIFile* hunDir;
++  nsCOMPtr<nsIFile> hunDir;
 +  NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
-+			true, &hunDir);
-+  LoadDictionariesFromDir(hunDir);
++                        true, getter_AddRefs(hunDir));
++  if (hunDir) {
++      LoadDictionariesFromDir(hunDir);
++  }
 +
    // find dictionaries from extensions requiring restart
    nsCOMPtr<nsISimpleEnumerator> dictDirs;


More information about the freebsd-gecko mailing list