Commit Graph

15 Commits

Author SHA1 Message Date
Mike Hommey
715db83e04 Bug 1126593 - Add a global fallible instance, so that using fallible works directly, everywhere. r=njn 2015-02-02 09:56:13 +09:00
Ehsan Akhgari
0f02dbc8c0 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
0dcceb0b64 Bug 1113005 - Copy only the necessary number of bytes from the source buffer; r=froydnj 2014-12-20 10:25:02 -05:00
Ehsan Akhgari
60b3090c10 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
Wes Kocher
dabb117549 Backed out changeset 95377313608b (bug 1101337) for linux debug build bustage 2014-12-12 16:34:43 -08:00
Ehsan Akhgari
f859fa7e98 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
92e38be3c8 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
d11a3a5d3b 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
a90dd4dace 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 11:47:55 -05:00
David Major
d85f8b5439 Bug 1097283: Fix count/byte mismatches in NS_ABORT_OOM calls. r=froydnj 2014-11-12 21:13:44 +13:00
David Major
4954e07571 Backed out changeset 8a4595cc5ec4 for Linux build failure on a CLOESD TREE
just kidding it's a CLOSED TREE
2014-11-12 17:19:15 +13:00
David Major
3da2a00813 Bug 1097283: Fix count/byte mismatches in NS_ABORT_OOM calls. r=froydnj 2014-11-12 15:42:53 +13:00
Birunthan Mohanathas
2a49da1efa Bug 1028559 - Flatten xpcom/string/{public,src}/ directories. r=dbaron 2014-06-25 15:08:54 -07:00
Wes Kocher
777add5c77 Backed out 6 changesets (bug 1028559, bug 1028565) for android mochitest bustage on a CLOSED TREE
Backed out changeset fdd74c065e5d (bug 1028565)
Backed out changeset 5e9777d38052 (bug 1028565)
Backed out changeset 3510bcdba3fc (bug 1028565)
Backed out changeset 62ad3254903e (bug 1028565)
Backed out changeset e7557f70acfe (bug 1028565)
Backed out changeset 5b1b527abe47 (bug 1028559)
2014-06-24 18:32:55 -07:00
Birunthan Mohanathas
91694f185a Bug 1028559 - Flatten xpcom/string/{public,src}/ directories. r=dbaron 2014-06-21 08:56:57 -07:00