gecko-dev/xpcom
Ehsan Akhgari 2b3c79836e 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
..
base Bug 1094552 (part 4) - Rename AnalyzeReports() as Analyze(). r=mccr8. 2014-12-08 14:45:13 -08:00
build Bug 1108613. Create an XRE_IsParentProcess to detect if code is running in the parent process. r=roc 2014-12-09 11:21:47 -08:00
components Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2014-11-28 10:54:49 -05:00
doc
ds bug 552020 Part 3: Enable Creation of mozilla::TimeStamp from system timestamps. r=roc 2014-11-18 13:28:42 -08:00
glue Bug 1103368, part 5 - Make Class::getProperty and setProperty nullable instead of needing stub functions. Never store stub functions in JSPropertyDescriptors. r=bhackett. 2014-11-22 12:23:39 -06:00
idl-parser Bug 1097731 - emit using declarations for infallible convenience methods. r=nfroyd 2014-11-12 08:11:00 +01:00
io Bug 1106551: Include sys/mount.h only in the linux quota case r=froydnj 2014-12-05 15:46:53 +01:00
libxpt/xptcall
reflect Bug 1107814 - Part 1: Mark more directories as FAIL_ON_WARNINGS for all compilers. r=gps 2014-12-04 16:24:03 -08:00
sample Bug 1107814 - Part 1: Mark more directories as FAIL_ON_WARNINGS for all compilers. r=gps 2014-12-04 16:24:03 -08:00
string Bug 1101337 - Make the ReplaceSubstring() XPCOM string API linear; r=froydnj 2014-12-12 11:47:55 -05:00
system Bug 1038145 - Make use of the new infoURL item from the blocklist for plugins with an update. r=irving 2014-10-15 15:23:22 +02:00
tests Bug 1101337 - Make the ReplaceSubstring() XPCOM string API linear; r=froydnj 2014-12-12 11:47:55 -05:00
threads Bug 1091758 - Report full paths for most chrome scripts; r=snorp 2014-11-25 15:35:21 -08:00
typelib Bug 1077148 part 4 - Add and use new moz.build templates for Gecko programs and libraries. r=gps 2014-10-30 13:06:12 +09:00
windbgdlg Bug 1059090 - Don't require SOURCES to be set for CPP_UNIT_TESTS and SIMPLE_PROGRAMS. r=mshal 2014-09-03 14:16:37 +09:00
xpidl
Makefile.in
moz.build Bug 1043820 - Remove PARALLEL_DIRS. r=gps 2014-07-29 08:57:59 +09:00
xpcom-config.h.in Bug 1095633 - part 2 - remove HAVE_CPP_TROUBLE_COMPARING_TO_ZERO bits from the build system; r=mshal 2014-11-07 14:08:13 -05:00
xpcom-private.h.in