1. 01 Jul, 2020 1 commit
  2. 17 Jan, 2020 1 commit
  3. 06 Dec, 2019 1 commit
    • Gabriele Svelto's avatar
      Bug 1600545 - Remove useless inclusions of header files generated from IDL... · 69790bc6
      Gabriele Svelto authored
      Bug 1600545 -  Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
      
      The inclusions were removed with the following very crude script and the
      resulting breakage was fixed up by hand. The manual fixups did either
      revert the changes done by the script, replace a generic header with a more
      specific one or replace a header with a forward declaration.
      
      find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
          interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
          if [ -n "$interfaces" ]; then
              if [[ "$interfaces" == *$'\n'* ]]; then
                regexp="\("
                for i in $interfaces; do regexp="$regexp$i\|"; done
                regexp="${regexp%%\\\|}\)"
              else
                regexp="$interfaces"
              fi
              interface=$(basename "$path")
              rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
                  hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
                  if [ $hits -eq 0 ]; then
                      echo "Removing ${interface} from ${path2}"
                      grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                      mv -f "$path2".tmp "$path2"
                  fi
              done
          fi
      done
      
      Differential Revision: https://phabricator.services.mozilla.com/D55443
      
      --HG--
      extra : moz-landing-system : lando
      69790bc6
  4. 22 Aug, 2019 1 commit
  5. 21 Aug, 2019 2 commits
  6. 01 May, 2019 1 commit
  7. 30 Nov, 2018 1 commit
  8. 19 Aug, 2018 1 commit
  9. 18 Aug, 2018 1 commit
    • Kris Maglione's avatar
      Bug 1484496: Part 2 - Add common base class for all nsISimpleEnumerator implementations. r=froydnj · 65c28aa0
      Kris Maglione authored
      In order to allow JS callers to use nsISimpleEnumerator instances with the JS
      iteration protocol, we'll need to additional methods to every instance. Since
      we currently have a large number of unrelated implementations, it would be
      best if they could share the same implementation for the JS portion of the
      protocol.
      
      This patch adds a stub nsSimpleEnumerator base class, and updates all existing
      implementations to inherit from it. A follow-up will add a new base interface
      to this class, and implement the additional functionality required for JS
      iteration.
      
      Differential Revision: https://phabricator.services.mozilla.com/D3725
      
      --HG--
      extra : rebase_source : ad66d7b266856d5a750c772e4710679fab9434b1
      extra : histedit_source : a83ebffbf2f0b191ba7de9007f73def6b9a955b8
      65c28aa0
  10. 17 Nov, 2017 1 commit
  11. 26 Oct, 2017 1 commit
    • Nicholas Nethercote's avatar
      Bug 1410794 (attempt 2) - Change some |string| occurrences in... · 92524355
      Nicholas Nethercote authored
      Bug 1410794 (attempt 2) - Change some |string| occurrences in nsIPrefBranch.idl to |ACString|. r=erahm.
      
      This makes the code nicer. In particular, it removes many getter_Copies()
      calls. The patch also converts a lot of nsCStrings to nsAutoCString, which will
      avoid heap allocation in the common case.
      
      The patch also renames PREF_CopyCharPref() as PREF_GetCStringPref(), because
      it's actually getting a string, not a char, and that matches the existing
      GetCString() and GetDefaultCString() methods. Correspondingly, it also renames
      PREF_SetCharPref() as PREF_SetCStringPref().
      
      The |aPrefName| arguments in nsIPrefBranch.idl remain as |string| because they
      almost always involve passing in C string literals, and passing "foo" is much
      nicer than passing NS_LITERAL_CSTRING("foo").
      
      It's worth noting that early versions of this patch used |AUTF8String| instead
      of |ACString|. But it turns out that libpref stores prefs internally as Latin1.
      And |ACString| is compatible with Latin1 but |AUTF8String| isn't, because
      non-ASCII Latin1 strings are not valid UTF-8!
      
      MozReview-Commit-ID: D3f7a1Vl1oE
      
      --HG--
      extra : rebase_source : e6e4b15d6d210cfd93686f96400281f02bd1d06b
      92524355
  12. 25 Oct, 2017 1 commit
  13. 24 Oct, 2017 1 commit
    • Nicholas Nethercote's avatar
      Bug 1410794 - Change some |string| occurrences in nsIPrefBranch.idl to |ACString|. r=erahm. · a861772b
      Nicholas Nethercote authored
      This makes the code nicer. In particular, it removes many getter_Copies()
      calls. The patch also converts a lot of nsCStrings to nsAutoCString, which will
      avoid heap allocation in the common case.
      
      The patch also renames PREF_CopyCharPref() as PREF_GetCStringPref(), because
      it's actually getting a string, not a char, and that matches the existing
      GetCString() and GetDefaultCString() methods. Correspondingly, it also renames
      PREF_SetCharPref() as PREF_SetCStringPref().
      
      The |aPrefName| arguments in nsIPrefBranch.idl remain as |string| because they
      almost always involve passing in C string literals, and passing "foo" is much
      nicer than passing NS_LITERAL_CSTRING("foo").
      
      It's worth noting that early versions of this patch used |AUTF8String| instead
      of |ACString|. But it turns out that libpref stores prefs internally as Latin1.
      And |ACString| is compatible with Latin1 but |AUTF8String| isn't, because
      non-ASCII Latin1 strings are not valid UTF-8!
      
      --HG--
      extra : rebase_source : 725ccf57943283a60ef8c9d654afe4515b4089f8
      a861772b
  14. 12 Mar, 2017 1 commit
    • Zibi Braniecki's avatar
      Bug 1346616 - Migrate callsites that are retrieving requested locale from... · a1a4f0b7
      Zibi Braniecki authored
      Bug 1346616 - Migrate callsites that are retrieving requested locale from pref, to use LocaleService::GetRequestedLocales. r=jfkthame,Pike
      
      I'm adding a helper function mozILocaleService::GetRequestedLocale to simplify
      most of the callsites that are looking for the first of the requested locales.
      
      In most cases, I'm just matching the behavior of the code with reusing
      LocaleService API instead of direct manipulation on the prefs.
      That includes how I handle error case scenarios.
      
      In case of sdk/l10n/locale.js I am reusing LocaleService heuristics over
      the custom one from the file since the ones in LocaleService are just
      more correct and unified accross the whole platform.
      
      In case of FallbackEncoding I have to turn it into a nsIObserver to listen
      to intl:requested-locales-changed.
      
      MozReview-Commit-ID: 7rOr2CovLK
      
      --HG--
      extra : rebase_source : 883a91b249b6953b7872bfb9a8851e8be7257c7b
      a1a4f0b7
  15. 17 Apr, 2017 1 commit
  16. 12 Mar, 2017 1 commit
    • Zibi Braniecki's avatar
      Bug 1346616 - Migrate callsites that are retrieving requested locale from... · cce53c69
      Zibi Braniecki authored
      Bug 1346616 - Migrate callsites that are retrieving requested locale from pref, to use LocaleService::GetRequestedLocales. r=jfkthame,Pike
      
      I'm adding a helper function mozILocaleService::GetRequestedLocale to simplify
      most of the callsites that are looking for the first of the requested locales.
      
      In most cases, I'm just matching the behavior of the code with reusing
      LocaleService API instead of direct manipulation on the prefs.
      That includes how I handle error case scenarios.
      
      In case of sdk/l10n/locale.js I am reusing LocaleService heuristics over
      the custom one from the file since the ones in LocaleService are just
      more correct and unified accross the whole platform.
      
      In case of FallbackEncoding I have to turn it into a nsIObserver to listen
      to intl:requested-locales-changed.
      
      MozReview-Commit-ID: 7rOr2CovLK
      
      --HG--
      extra : rebase_source : 2f166cf1746f389a035f7cf557edcadeacb10fa0
      cce53c69
  17. 28 Sep, 2016 1 commit
  18. 30 Aug, 2016 1 commit
  19. 07 Mar, 2016 1 commit
  20. 11 Jan, 2016 1 commit
    • Mike Hommey's avatar
      Bug 1235099 - Remove the NS_APP_BOOKMARKS_50_FILE directory service key. r=dolske · 8810bde2
      Mike Hommey authored
      Nothing in mozilla-central uses the NS_APP_BOOKMARKS_50_FILE/BMarks key except
      tests. It's also not been very useful since the switch to places in ... Firefox
      3? so even if addons use it, it's not doing them much good.
      BookmarkHTMLUtils.defaultPath returns the same thing anyways for those that
      really do insist on getting the equivalent thing (but I'd argue
      BookmarkHTMLUtils.defaultPath, as well as the browser.bookmarks.file pref could
      just go away as well).
      
      Seamonkey does use NS_APP_BOOKMARKS_50_FILE/BMarks, but they really only need
      the #define, which they can add in their source.
      8810bde2
  21. 04 Sep, 2015 1 commit
  22. 15 Jun, 2015 1 commit
  23. 29 Sep, 2014 1 commit
  24. 27 Apr, 2014 1 commit
  25. 11 May, 2013 1 commit
  26. 30 Jul, 2012 1 commit
  27. 06 Jun, 2012 1 commit
  28. 21 May, 2012 1 commit
  29. 08 Mar, 2012 1 commit
  30. 17 Nov, 2011 1 commit
  31. 17 Oct, 2011 1 commit
  32. 29 Sep, 2011 1 commit
  33. 06 Oct, 2011 2 commits
  34. 27 Jan, 2011 1 commit
  35. 10 Jun, 2010 1 commit
  36. 07 Nov, 2009 1 commit
  37. 22 Jan, 2009 1 commit
  38. 11 Sep, 2007 1 commit