Commit Graph

292 Commits

Author SHA1 Message Date
Ehsan Akhgari
843a39d44d Bug 1188203 - Fix more constructors in XPCOM; r=froydnj 2015-07-28 12:24:37 -04:00
Michael Layzell
aeed1a226e Bug 1159433 - Part 4: Mark nsTAutoString_CharT and nsAutoArrayBase as non-memmovable; r=froydnj 2015-07-24 19:15:40 -04:00
Andrea Marchesini
bfe593d668 Bug 1171603 - Better size check in nsTSubstring::ReplacePrep. r=ehsan 2015-07-06 14:27:35 -04:00
Hamzata Diallo
9a79d7372b Bug 1178513 - Export libxul symbols needed by ACL. r=mattwoodrow 2015-07-02 15:19:35 -07:00
Ryan VanderMeulen
9cd6cd7ca3 Backed out changeset 97c7e83acb6b (bug 1171603) for Windows Werror bustage.
CLOSED TREE
2015-07-02 15:33:10 -04:00
Andrea Marchesini
d9e5b0cca8 Bug 1171603 - Better size check in nsTSubstring::ReplacePrep. r=ehsan 2015-07-02 14:51:42 -04:00
Eric Rahm
c5e63515bf Bug 1165518 - Part 2: Replace prlog.h with Logging.h. rs=froydnj 2015-05-19 11:15:34 -07:00
Neil Rashbrook
441960eebc Bug 1155963 Only allow NS_LITERAL_CSTRING to be used on compile-time literals r=froydnj,ehsan 2015-05-16 09:07:10 +01:00
Wes Kocher
484229a7ff Backed out changeset 17cfad44e12b (bug 1155963) for breaking b2g builds 2015-05-14 16:35:18 -07:00
Neil Rashbrook
5b5c002aaf Bug 1155963 Only allow NS_LITERAL_CSTRING to be used on compile-time literals r=froydnj,ehsan 2015-05-15 00:00:33 +01:00
Mike Hommey
b673a97a25 Bug 1134923 - Remove NS_Alloc/NS_Realloc/NS_Free. r=nfroyd
They are kept around for the sake of the standalone glue, which is used
for e.g. webapprt, which doesn't have direct access to jemalloc, and thus
still needs a wrapper to go through the xpcom function list and get to
jemalloc from there.
2015-05-01 09:40:30 +09:00
David Major
c92c020b89 Bug 1157835: Remove the MSVC_ENABLE_PGO flag from the build system. r=glandium 2015-04-27 19:59:27 -04:00
Nathan Froyd
751d877ec3 Bug 1156407 - part 1 - use static_assert instead of PR_STATIC_ASSERT; r=mccr8
We have better, C++-ier ways of doing compile-time assertions now.  Fold in the
nsTSubstring.cpp change in passing, since mccr8 suggested it in his review.
2015-04-20 13:56:46 -04:00
Jim Blandy
c49a3b9f79 Bug 1145051: Use MOZ_WARN_UNUSED_RESULT instead of NS_WARN_UNUSED_RESULT. r=glandium 2015-03-19 00:46:40 -07:00
Randall Barker
70c940e622 Bug 1093934 - Create a XPCOM library that can be used to support standalone WebRTC. r=nfroyd 2015-04-03 15:52:00 +02:00
Wes Kocher
e1bc5d7b91 Backed out changeset 0f5799df920b (bug 1093934) for various test failures CLOSED TREE 2015-04-02 13:42:34 -07:00
Randall Barker
3d56345656 Bug 1093934 - Create a XPCOM library that can be used to support standalone WebRTC r=froydnj 2015-04-02 12:12:37 -07:00
Mike Hommey
ccd2a9b975 Bug 1134920 - Use moz_xmalloc/moz_xrealloc/free instead of nsMemory::Alloc/Realloc/Free. r=nfroyd 2015-04-01 13:51:45 +09:00
Ehsan Akhgari
33bb32f549 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
William Chen
0e66f2c712 Bug 1131348 - Use fallible Append in content serializers. r=smaug,nfroyd 2015-03-17 01:55:22 -07:00
Andrew McCreight
346d9f50b4 Bug 1139050, part 2 - Move nsAlgorithm.h to xpcom/base. r=froydnj 2015-03-10 16:41:38 -07:00
Andrew McCreight
69b67f08f3 Bug 1139050 - Add moz.build BUG_COMPONENT metadata for xpcom/. r=froydnj 2015-03-10 16:41:38 -07:00
Tom Tromey
ab5eff3c57 Bug 1135081 - Fix typo in nsTString::AssertValidDepedentString. r=froydnj 2015-02-20 08:02:00 -05:00
Nicholas Nethercote
6ee3666899 Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 488e401ff87e31a2074c4108c4df0572d9536667
2015-02-09 14:34:50 -08:00
Andrew McCreight
8413cc973c Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote
3629781b69 Bug 1127201 (part 2) - Convert all NS_ABORT_IF_FALSE calls to MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 99182e70335d2b5ff95f8c528ae992d37294be3a
2015-02-04 20:05:36 -08:00
Mike Hommey
824818ee98 Bug 1126593 - Add a global fallible instance, so that using fallible works directly, everywhere. r=njn
--HG--
rename : memory/mozalloc/fallible.h => memory/fallible/fallible.h
2015-02-02 09:56:13 +09:00
Trevor Saunders
43229d1314 bug 1122100 - more MOZ_OVERRIDE in xpcomish stuff r=froydnj 2015-01-19 17:41:12 -05:00
Ehsan Akhgari
a744779bf5 Bug 1097452 - Use fallible allocation when setting the value of an <input> or <textarea> element; r=jst,froydnj
This patch handles most of the call sites for these allocations except
for a few where I added TODO comments with some information.  Handling
those places may require reworking lots of code, so I prefer to not do
that here.
2015-01-14 17:31:41 -05:00
Ehsan Akhgari
b6e35bb4b4 Bug 1118486 - Part 1: Use = delete instead of MOZ_DELETE directly; r=Waldo
Most of this patch (with the exception of dom/bindings/Codegen.py) was
generated by the following bash script:

#!/bin/bash

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "*/.git*" \
       ! -wholename "obj-*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -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_DELETE '= delete'
2015-01-08 23:19:05 -05:00
Ehsan Akhgari
e6bf8b9624 Bug 1113005 - Copy only the necessary number of bytes from the source buffer; r=froydnj
--HG--
extra : amend_source : 2367a3ad35a599790fc333e35e1b9272653463a1
2014-12-20 10:25:02 -05:00
Ehsan Akhgari
5b56680479 Bug 1101337 - Make the ReplaceSubstring() XPCOM string API linear; r=froydnj
ReplaceSubstring() is an O(n*m) algorithm (n being the length of the
string and m being the number of occurrences of aTarget) because we have
to move the remainder of the string, search it again and potentially
memmove most of it again as we find more matches.  This patch rewrites
that function to make it O(n+m).

Note that we currently don't build TestStrings.cpp, so the test case in
this patch is not run automatically, but the test case has been verified
to pass separately by moving the test function into Gecko and calling it
during startup and stepping through it in the debugger.

--HG--
extra : rebase_source : b020e17c1973330b0dbbd6bf956c073cfdcb775e
2014-12-12 18:57:09 -05:00
Wes Kocher
17cc280629 Backed out changeset 95377313608b (bug 1101337) for linux debug build bustage 2014-12-12 16:34:43 -08:00
Ehsan Akhgari
0f549528e4 Bug 1101337 - Make the ReplaceSubstring() XPCOM string API linear; r=froydnj
ReplaceSubstring() is an O(n*m) algorithm (n being the length of the
string and m being the number of occurrences of aTarget) because we have
to move the remainder of the string, search it again and potentially
memmove most of it again as we find more matches.  This patch rewrites
that function to make it O(n+m).

Note that we currently don't build TestStrings.cpp, so the test case in
this patch is not run automatically, but the test case has been verified
to pass separately by moving the test function into Gecko and calling it
during startup and stepping through it in the debugger.
2014-12-12 18:57:09 -05:00
Ehsan Akhgari
d89f187f00 Backed out 2 changesets (bug 1101337) because of ASAN bustage landed on a CLOSED TREE
Backed out changeset ffef93ec94aa (bug 1101337)
Backed out changeset 2954a37bc2df (bug 1101337)
2014-12-12 13:04:44 -05:00
Ehsan Akhgari
c95126f7c1 Bug 1101337 follow-up: Move the Segment class to nsTString_CharT in order to satisfy older gcc's used on b2g, landed on a CLOSED TREE to fix build bustage 2014-12-12 12:43:04 -05:00
Ehsan Akhgari
7e86a8f068 Bug 1101337 - Make the ReplaceSubstring() XPCOM string API linear; r=froydnj
ReplaceSubstring() is an O(n*m) algorithm (n being the length of the
string and m being the number of occurrences of aTarget) because we have
to move the remainder of the string, search it again and potentially
memmove most of it again as we find more matches.  This patch rewrites
that function to make it O(n+m).

Note that we currently don't build TestStrings.cpp, so the test case in
this patch is not run automatically, but the test case has been verified
to pass separately by moving the test function into Gecko and calling it
during startup and stepping through it in the debugger.

--HG--
extra : rebase_source : 0330c130520802392b92bd094dde85f57cfe6420
2014-12-12 11:47:55 -05:00
Chris Peterson
d3acb03f9f Bug 1107814 - Part 1: Mark more directories as FAIL_ON_WARNINGS for all compilers. r=gps 2014-12-04 16:24:03 -08:00
David Major
e748c21c20 No bug - add a comment to clarify the code. DONTBUILD
--HG--
extra : rebase_source : 3d38a9aa2fde585951ffaadaecf76422cf0dcab5
2014-11-13 08:57:09 +13:00
David Major
b7838d5451 Bug 1097283: Fix count/byte mismatches in NS_ABORT_OOM calls. r=froydnj
--HG--
extra : rebase_source : a9f4ae9e6f05e5ade56b741fa2f110974c5f08ac
2014-11-12 21:13:44 +13:00
David Major
b8f2362dd9 Backed out changeset 8a4595cc5ec4 for Linux build failure on a CLOESD TREE
just kidding it's a CLOSED TREE

--HG--
extra : rebase_source : 163a9bff0ad836095057d5911b792c34517d14cc
2014-11-12 17:19:15 +13:00
David Major
da3daae259 Bug 1097283: Fix count/byte mismatches in NS_ABORT_OOM calls. r=froydnj
--HG--
extra : rebase_source : b24e0b9d2e491ace3c045ee6b01e36b33c3ac21d
2014-11-12 15:42:53 +13:00
David Major
6188305b33 Bug 1096155: Report the correct OOM size when the caller doesn't specify a length. r=froydnj
--HG--
extra : rebase_source : 437d3acc69b0940cf388039a318eda7d9d27e082
2014-11-11 10:31:13 +13:00
Nicholas Nethercote
8ec14a3695 Bug 1067699 (part 1) - Export double-conversion.h normally from MFBT. r=froydnj.
--HG--
extra : rebase_source : 14c3d827f4d8015d8326612e82782c52dcf7335d
2014-09-16 23:33:05 -07:00
Jeff Walden
21c168f61c Bug 1065774 - Be more precise in PromiseFlatString docs about why assigning PromiseFlatString(...) to a reference is safe. r=froydnj
--HG--
extra : rebase_source : aad06aa3b0a803abb678000f559b4a9d4736813c
2014-09-11 13:25:56 -07:00
Birunthan Mohanathas
57751773f4 Bug 1045801 - Rename SafeCast to AssertedCast. r=Waldo 2014-08-25 12:17:32 -07:00
Birunthan Mohanathas
87bd70f161 Bug 1046841 - Fix more style violations in previously touched .h files in xpcom/. r=froydnj 2014-08-25 12:17:24 -07:00
Birunthan Mohanathas
6ea79dfc7c Bug 1046841 - Fix more style violations in previously touched .cpp files in xpcom/. r=froydnj 2014-08-25 12:17:15 -07:00
Ben Kelly
de0eed5a80 Bug 1025183 P2 Document how UTF16CharEnumerator treats buffer position on error. r=bz 2014-08-01 16:23:48 -04:00
Ben Kelly
04e4ab033e Revert bug 1025183 (revs 69373df15281, dd6d84edf08e, 728a5d18bcd9, 71babe0bc84b, c60f9054acf6) for bustage. r=me 2014-08-01 14:10:40 -04:00