Граф коммитов

63 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke 82dc9b2271 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 10:46:14 +00:00
Butkovits Atila e3dce68834 Backed out 3 changesets (bug 1643289, bug 1642949) for causing failure at test_headless_screenshot.html. CLOSED TREE
Backed out changeset 98c420f73380 (bug 1643289)
Backed out changeset 9447ea8910aa (bug 1643289)
Backed out changeset 0c827da9d847 (bug 1642949)
2020-06-10 10:07:23 +03:00
Simon Giesecke d419f0ff08 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 05:49:28 +00:00
Simon Giesecke 191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Simon Giesecke 30984f7bab Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D62543

--HG--
extra : moz-landing-system : lando
2020-02-12 11:13:33 +00:00
Andrew Osmond da3cf4fd77 Bug 1610381 - Improve image memory reporting for missing/incomplete surfaces. r=tnikkel
This dumps more information about the surface cache. Each surface has a
flag indicating whether or not it has finished decoding; incomplete
surfaces are now marked as such in the cache reports. We now also have
counters for various insertion errors, as well as the composition of the
cache (total vs locked images, total vs locked surfaces).

Differential Revision: https://phabricator.services.mozilla.com/D60450

--HG--
extra : moz-landing-system : lando
2020-01-21 09:59:15 +00:00
Eric Rahm 6d75492859 Bug 1241518 - Part 1: Remove unused nsAutoPtr.h includes in xpcom/ r=kmag
This removes various unused `#include "nsAutoPtr.h"` in `xpcom/`. Additionally
adds a few includes to the media stack.

Differential Revision: https://phabricator.services.mozilla.com/D58282

--HG--
extra : moz-landing-system : lando
2020-01-07 00:06:01 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andi-Bogdan Postelnicu 78304aaf0d Bug 1453795 - XPCOM - Initialize member fields in classes/ structures. r=froydnj
--HG--
extra : rebase_source : c9d9e80b83ad52d8ac9203f491f1c9469a7e9b0c
extra : amend_source : ca502ae98ff21a2e3d1ab2d389310f3a5aded5ed
2018-06-15 14:41:20 +03:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Chris Peterson d09123f248 Bug 1436263 - Part 1: Replace `final override` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: DE5HkIhsZ6D

--HG--
extra : rebase_source : 94831c1e13a840dd2ea0600f64bcf70c2bf938d9
extra : source : cf9283bf1b0bca3a6311c98e227329d451f80ecb
2018-02-05 22:46:57 -08:00
Kris Maglione f6ba082a01 Bug 1404198: Part 2b - Switch to NS_NewTimer* in xpcom. r=njn
MozReview-Commit-ID: BEtHEpOmT1E

--HG--
extra : rebase_source : dac8a182f1ad76df6715146e1da1279c02c0406f
2017-10-15 23:11:22 -07:00
Andrew Osmond 42266555ed Bug 1389479 - Part 1. Add nsExpirationTracker::NotifyEndTransaction(Locked) callbacks for subclasses to know when an aging iteration is complete. r=froydnj 2017-08-15 15:02:14 -04:00
Bevis Tseng 41242cf89a Bug 1367497 - Part 1: Improve Error Handling in {Add|Remove}ObjectLocked(). r=froydnj
MozReview-Commit-ID: 6ecIS6PnVdj

--HG--
extra : source : 0a273c823e19e1048d78f9e6b1ddedf8cc034bd6
2017-05-26 14:36:17 +08:00
Sebastian Hengst 7b4e0b8924 Backed out changeset 0a273c823e19 (bug 1367497) for intermittently crashing in mochitest-chrome-3's layout/style/test/chrome/test_stylesheet_clone_import_rule.html on debug. r=backout 2017-08-15 18:47:29 +02:00
Bevis Tseng 4b1a41e00e Bug 1367497 - Part 1: Improve Error Handling in {Add|Remove}ObjectLocked(). r=froydnj
MozReview-Commit-ID: 6ecIS6PnVdj
2017-05-26 14:36:17 +08:00
Bevis Tseng b31fd1ee95 Backed out changeset c29f8828b859
--HG--
extra : rebase_source : 4a32c7d30c128dd9041e209c6226030c7fba567c
2017-08-15 10:45:28 +08:00
Bevis Tseng c12623dcbe Bug 1367497 - Part 1: Improve Error Handling in {Add|Remove}ObjectLocked(). r=froydnj
MozReview-Commit-ID: 6ecIS6PnVdj
2017-05-26 14:36:17 +08:00
Andreas Farre 1cf93d7962 Bug 1311425 - Avoid expiration timers when scheduling idle runnables, r=froydnj
--HG--
extra : rebase_source : b20edf82a69a24965b4bb6300ff9b1be39ad7b8a
2017-05-24 21:17:06 -04:00
Samael Wang ecbe18e933 Bug 1363036 - Part 1: Remove MOZ_DIAGNOSTIC_ASSERTs previously added for bug hunting. r=smaug
MozReview-Commit-ID: BAkuRlHtMcP

--HG--
extra : rebase_source : 5e708d0dacec9a673851d689d1f5274a0f1b69aa
2017-05-22 11:25:54 +08:00
Samael Wang da20faa46e Bug 1363036 - Add MOZ_DIAGNOSTIC_ASSERTs for bug hunting. r=smaug
MozReview-Commit-ID: JPnkkJlkwDY
2017-05-16 10:54:01 +08:00
Daniel Holbert 2a33c81425 Bug 1353941: Convert a MOZ_RELEASE_ASSERT() expression to "if" + MOZ_CRASH(), to work around clang 3.8 segfault. r=froydnj
MozReview-Commit-ID: Bq2DM61YvQ3

--HG--
extra : rebase_source : 2d546cbabd71f17ac0d9d8b3a98271d57ffc428c
2017-04-05 18:24:56 -07:00
Bevis Tseng 5daae11f33 Bug 1345464 - Add an optional EventTarget to nsExpirationTracker to support Labeling for Quantum-DOM. r=froydnj
--HG--
extra : rebase_source : f05d3a31543ea8ed35a756a1721adc272c792a08
2017-03-30 09:23:36 -04:00
Bevis Tseng eb452e8278 Bug 1350177 - Part 1: Define ExpirationTrackerImpl as a Thread-Safe Tracker. r=froydnj
1. Define ExpirationTrackerImpl which requires AutoLock before calling Tracker APIs.
2. Move expiration logic from nsExpirationTracker to ExpirationTrackerImpl.
3. Keep nsExprationTracker un-thread-safe with fake Lock acquired.

--HG--
extra : rebase_source : 536876ce2c64240f5470180aa633264d8e5de664
2017-03-27 19:37:29 +08:00
David Anderson f80736e0c8 Shutdown XPCOM-dependent resources in ImageBridgeChild at the appropriate time. (bug 1298938 part 3.1, r=mattwoodrow)
--HG--
extra : rebase_source : 9579e1ca6ec1af2fac7cd0fc4574b849cc8b8e12
2016-09-13 16:30:57 -07:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nicholas Nethercote f429eae6a5 Bug 1203427 (part 5) - Add logging of timer firings. r=froydnj. 2015-09-10 00:50:51 -07:00
Nicholas Nethercote 6f036921dc Bug 1203427 (part 1) - Add nsExpirationTracker::mName. r=froydnj.
There are many sub-classes of nsExpirationTracker. In order to distinguish them
nicely in the logging of timer firings, it's necessary to manually name each
one. (This wouldn't be necessary if there was a way to stringify template
parameters, but there isn't.)

--HG--
extra : rebase_source : 89b99e9dbb2a806bd21145d04a5e023794643b61
2015-09-09 21:07:07 -07:00
Eric Rahm 4879ae86f4 Bug 1165518 - Part 2: Replace prlog.h with Logging.h. rs=froydnj 2015-05-19 11:15:34 -07:00
Andrew McCreight 1e0f87e27d Bug 1151541, part 2 - Fix mode lines in xpcom/. r=froydnj 2015-04-09 10:25:05 -07:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Nathan Froyd 772bdaecb8 Bug 1117853 - remove duplicate mozilla/Attributes.h #include; r=bsmedberg 2014-01-22 18:37:02 -05:00
Birunthan Mohanathas 16471161bb Bug 1046841 - Fix more style violations in previously touched .h files in xpcom/. r=froydnj 2014-08-25 12:17:24 -07:00
Ehsan Akhgari 4af9c14370 Bug 1048239 - Fix more bad implicit constructors in XPCOM; r=froydnj 2014-08-05 09:36:32 -04:00
Birunthan Mohanathas 68ba4f3767 Bug 1022456 - Convert xpcom/ds/ to Gecko style. r=froydnj 2014-07-09 08:15:21 -07:00
Benoit Jacob 60d536773a Bug 1004098 - Make nsTArray use size_t in its interface (32bitness is fine as an internal detail) - r=froydnj, sr=bsmedberg 2014-05-08 21:03:35 -04:00
Birunthan Mohanathas 5f1fde8824 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Ehsan Akhgari 186680d83a Bug 798158 - Part 1: Use a pointer-sized type to store refcounts internally; r=bsmedberg 2014-03-27 16:38:33 -04:00
Ehsan Akhgari 1b83407ce9 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Mina Almasry 22a7e34984 Bug 863966 - Improve perf of querySelector by caching selector list. r=bz 2013-10-09 09:20:45 -04:00
Kyle Huey 7ea5a68da2 Bug 901630: Remove support for the cc thread. r=mccr8 2013-08-13 10:45:32 -07:00
Ehsan Akhgari 2824b29025 Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])

--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
Chris Peterson cbe66ccea3 Bug 839962 - Part 1: Replace some XPCOM refcount NS_ASSERTIONs with MOZ_ASSERTs. r=bsmedberg 2013-02-07 20:50:05 -08:00
Mats Palmgren 5f5d30eb5b Bug 786533 - Replace NS_MIN/NS_MAX in xpcom/ with XPCOM_MIN/XPCOM_MAX to prevent accidental use. r=ehsan 2013-01-15 13:22:03 +01:00
Ehsan Akhgari e368dc9c85 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Aryeh Gregor d0ad5a7d0c Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Mark Capella bfa59371ce Bug 712936 - Convert users of PR_STATIC_ASSERT to MOZ_STATIC_ASSERT. r=jwalden 2012-04-02 17:21:24 -07:00