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

1856 Коммитов

Автор SHA1 Сообщение Дата
Chris Peterson 1ca3d5aa46 Bug 870698 - Part 8: Replace Equals(NS_LITERAL_CSTRING("")) with EqualsLiteral(""). r=erahm
The NS_LITERAL_CSTRING macro creates a temporary nsLiteralCString to encapsulate the string literal and its length, but AssignLiteral() can determine the string literal's length at compile-time without nsLiteralCString.

MozReview-Commit-ID: B5Y8KyExPQ8

--HG--
extra : rebase_source : e27b266c145daa5acd887e998c6d5b408101e1db
extra : source : 33f49977a33cbdb1c7127871b940eefccc018f65
2017-09-06 15:00:31 -07:00
Chris Peterson a0c8081df4 Bug 870698 - Part 4: Replace Equals("") with EqualsLiteral(""). r=erahm
MozReview-Commit-ID: G1GhyvD29WK

--HG--
extra : rebase_source : 115842c37a40041bdca7b4e1ff0a5680b02ced15
extra : source : 90bfff9c01d80086cdc17637f310e898fea295ea
2017-09-06 01:13:45 -07:00
Chris Peterson 9f4c1f5278 Bug 870698 - Part 1: Replace Assign("") with AssignLiteral(""). r=erahm
MozReview-Commit-ID: A0u9PP49OW3

--HG--
extra : rebase_source : 7d5286959f510eb4b7df1b7e32d5b9b58719c48b
extra : intermediate-source : f552b4a78236c42bc09030b3eb008725a3edb9c8
extra : source : 26ac4a1014f6661a70e3bf9f552407e12c2c3981
2017-09-03 22:12:56 -07:00
Nicholas Nethercote 225f3a87e4 Bug 1400193 (part 2) - Shrink PLDHashTable. r=froydnj.
This patch reduces sizeof(PLDHashTable) as follows.

- 64-bit: from 40 bytes to 32
- 32-bit: from 28 bytes to 20

It does this by doing the following.

- It moves mGeneration from EntryStore to PLDHashTable, to avoid unnecessary
  padding on 64-bit. This requires tweaking EntryStore::Set() as explained in a
  comment.

- It also shrinks mGeneration from uint32_t to uint16_t, saving 2 bytes of
  data.

- It shrinks mEntrySize from uint32_t to uint8_t, to cut 3 bytes of data.

- It shrinks mHashShift from int16_t to uint8_t, trimming another byte of data,
  and moves it, saving another 2 bytes of padding.

And it reorders the fields so the word-sized ones are at the start, which makes
it easier to imagine the memory layout.

The patch also adds a test, and fixes some misordered function arguments in
existing tests.

--HG--
extra : rebase_source : 6ed6f7be68477fd4a82f07dd2f51c1f1d9b92dcc
2017-09-15 20:04:29 +10:00
Tom Tromey f993bb28d0 Bug 1401821 - nsTextFormatter "*" width argument comes before the actual argument; r=froydnj
Bug 1388789 introduced a bug breaking formats like "%*.f".  The problem
was that the next "natural" argument was taken before the "*" width
argument.

MozReview-Commit-ID: BZack9faY7a

--HG--
extra : rebase_source : a14485914ef9e29e38f29be6c1df1372ce5e722f
2017-09-21 09:43:28 -06:00
Tom Tromey 971dbd3853 Bug 1388789 - clean up \0 emission in nsTextFormatter; r=froydnj
nsTextFormatter unconditionally emitted a trailing \0, leading some code
elsewhere to have to work around this.  This changes the code to only
emit it in snprintf.

MozReview-Commit-ID: G3CBpAPp9Tn

--HG--
extra : rebase_source : 36666476a4f796e2553c9fa31daa54d245ae3b5f
2017-09-06 09:38:58 -06:00
Tom Tromey f2a652249e Bug 1388789 - make nsTextFormatter runtime type-safe; r=froydnj
Change nsTextFormatter functions to template functions, box their
arguments, and then make the formatter mostly impervious to type
mismatches.  Most formatting is done according to the type of the actual
argument.

MozReview-Commit-ID: H8WmyxFCb7s

--HG--
extra : rebase_source : ad98ad6243825f1a892fc6a641d155e239b12a6b
2017-09-01 14:03:56 -06:00
Tom Tromey 586209d1a8 Bug 1388789 - handle unrecognized escapes in nsTextFormatter; r=froydnj
nsTextFormatter tried to pass unrecognized escapes in the format string
through to the output.  However, if the format held a width or
precision, that text was not output.  It seems better to me to try to
preserve the format text as-is.

MozReview-Commit-ID: HoBykpfzK7C

--HG--
extra : rebase_source : 9b071db3800e3e75cabb4995a920818dfb35b03d
2017-09-01 08:31:49 -06:00
Boris Zbarsky 203072cfe1 Bug 1401171 - Make nsIMultiplexInputStream not inherit from nsIInputStream. r=bkelly
This is a preexisting issue that makes nsMultiplexInputStream multiple-inherit
from nsIInputStream: once via nsIMultipartInputStream and once via
nsIAsyncInputStream.  This causes problems once we end up with more multiplex
streams that are async streams, because then some assingments to
nsCOMPtr<nsIInputStream> start asserting.  This patch just removes the footgun
by getting rid of the multiple inheritance.
2017-09-19 16:26:21 +02:00
Sebastian Hengst 7973633f84 Backed out changeset 3c9e25405f59 (bug 1401204) an request from baku for landing with wrong bug number. r=backout 2017-09-19 16:25:20 +02:00
Boris Zbarsky 5c70c28414 Bug 1401204 - Make nsIMultiplexInputStream not inherit from nsIInputStream. r=bkelly
This is a preexisting issue that makes nsMultiplexInputStream multiple-inherit
from nsIInputStream: once via nsIMultipartInputStream and once via
nsIAsyncInputStream.  This causes problems once we end up with more multiplex
streams that are async streams, because then some assingments to
nsCOMPtr<nsIInputStream> start asserting.  This patch just removes the footgun
by getting rid of the multiple inheritance.
2017-06-11 00:07:23 -04:00
Gerald Squelart 7dbe315e25 Bug 1398999 - nsDequeFunctor::operator() doesn't need to return anything - r=froydnj
Its return value is never used, and most implementations return nullptr anyway.

MozReview-Commit-ID: 8rxC053mmE8

--HG--
extra : rebase_source : 61a0b8b1373396182efd27d3c01b96e5e5541364
2017-02-09 14:06:36 +11:00
Xidorn Quan 306241f7a1 Bug 1397130 - Use signed integer for gUnusedAtomCount. r=froydnj
MozReview-Commit-ID: 9KweZdyu5WF

--HG--
extra : rebase_source : 81981c706fbde89b18168e39b15dee0cbff27cca
2017-09-06 15:06:16 +10:00
Greg Mierzwinski a322b42abf Bug 1394989 - Prevent test_nsIProcess.js from running on linux64-ccov. r=Aryx
This patch skips test_nsIProcess.js when it is running on linux64-ccov.

MozReview-Commit-ID: EZaAcKsy0UA

--HG--
extra : transplant_source : %DD%05C%CD3h%95e%B9%05%F8%7C%D8ZWOh%DBj%CA
2017-09-03 17:46:57 -04:00
Xidorn Quan 749154c86c Bug 1397052 - Add gtest for concurrent accessing. r=froydnj
MozReview-Commit-ID: K3enhwjyGYE

--HG--
extra : rebase_source : 0c714a453e584ba3ceeef7e46e2c13bd6016a179
2017-09-07 10:08:31 +10:00
Nathan Froyd f21b0d5aee Bug 1362449 - part 0 - add test cases for base64 string encode/decode; r=erahm
We already had testcases for streaming encoding, but we didn't have any
for one-shot encoding and decoding.  Let's fix that.
2017-09-06 16:58:37 -04:00
Henri Sivonen 3e8b6b5f47 Bug 1395527 part 1 - Add microbenchmarks for IsASCII and IsUTF8. r=froydnj
MozReview-Commit-ID: 3oploVISQ3F

--HG--
extra : rebase_source : 08d184e9b09a6375f6c6ace2b3511d39e9b36691
2017-08-31 14:46:25 +03:00
Sebastian Hengst 427e06082d Backed out changeset 40934888ed06 (bug 1395527) for Android bustage at uriloader/exthandler/android/nsMIMEInfoAndroid.cpp:62: too many arguments to function 'bool IsUTF8(const nsACString&)'. r=backout 2017-09-02 10:39:06 +02:00
Henri Sivonen 521edd3c6a Bug 1395527 part 1 - Add microbenchmarks for IsASCII and IsUTF8. r=froydnj
MozReview-Commit-ID: 3oploVISQ3F

--HG--
extra : rebase_source : 08d184e9b09a6375f6c6ace2b3511d39e9b36691
2017-08-31 14:46:25 +03:00
Joel Maher d5fab2cf6d Bug 1394989 - Disable xpcom/tests/unit/test_nsIProcess_stress.js for coverage builds. r=froydnj 2017-08-31 15:38:49 -04:00
Michael Layzell eab07b465e Bug 1393581 - Name all IdleTaskRunner runnables, r=smaug 2017-08-25 11:24:27 -04:00
Jan de Mooij a5de55dced Bug 1389510 part 3 - Remove getProperty/setProperty hooks from ClassOps. r=evilpie 2017-08-25 10:12:16 +02:00
Nicholas Nethercote f582d96b98 Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm.
This is straightforward, with only two notable things.

- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
  throughout, because all nsXPIDLString.h did was include nsString.h. The
  exception is for files which already include nsString.h, in which case the
  patch just removes the nsXPIDLString.h inclusion.

- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
  cover some of its ground, e.g. testing Adopt(nullptr).

--HG--
extra : rebase_source : 452cc4a08046a1adb1a8099a7e85a1917de5add8
2017-08-17 15:29:03 +10:00
Nathan Froyd 4f91b7f41c Bug 1349821 - reduce iterations for 32-bit Windows to OOM in TestTArray.test_fallible; r=erahm 2017-08-22 16:08:18 -04:00
Nicholas Nethercote 4a623e6df4 Bug 1385172 - Replace nsEscapeHTML{,2}() with new nsAppendEscapedHTML() function. r=erahm.
The existing functions work with C strings but almost all the call sites use
Mozilla strings.

The replacement function has the following properties.

- It works with Mozilla strings, which makes it much simpler and also improves
  the call sites.

- It appends to the destination string because that's what a lot of the call
  sites need. For those that don't, we can just append to an empty string.

- It is declared outside the |extern "C"| section because there is no need for
  it to be in that section.

Note: there is no 16-bit variant of nsAppendEscapedHTML(). This is because
there are only two places that need 16-bit variants, both rarely executed,
and so converting to and from 8-bit is good enough.

The patch also adds some testing of the new function, renaming
TestEscapeURL.cpp as TestEscape.cpp in the process, because that file is now
testing other kinds of escaping.

--HG--
rename : xpcom/tests/gtest/TestEscapeURL.cpp => xpcom/tests/gtest/TestEscape.cpp
extra : rebase_source : 51145ae2c9b0b4573c7ea0c342dcb246f9f14fb9
2017-08-18 12:00:59 +10:00
Bill McCloskey a5168688f9 Bug 1382922 - Fix test bustage on a CLOSED TREE
MozReview-Commit-ID: D03XhT1oTP0
2017-08-16 21:27:14 -07:00
Bill McCloskey 9edd615af7 Bug 1382922 - Refactor event queue to allow multiple implementations (r=erahm)
This patch refactors the nsThread event queue to clean it up and to make it easier to restructure. The fundamental concepts are as follows:

Each nsThread will have a pointer to a refcounted SynchronizedEventQueue. A SynchronizedEQ takes care of doing the locking and condition variable work when posting and popping events. For the actual storage of events, it delegates to an AbstractEventQueue data structure. It keeps a UniquePtr to the AbstractEventQueue that it uses for storage.

Both SynchronizedEQ and AbstractEventQueue are abstract classes. There is only one concrete implementation of SynchronizedEQ in this patch, which is called ThreadEventQueue. ThreadEventQueue uses locks and condition variables to post and pop events the same way nsThread does. It also encapsulates the functionality that DOM workers need to implement their special event loops (PushEventQueue and PopEventQueue). In later Quantum DOM work, I plan to have another SynchronizedEQ implementation for the main thread, called SchedulerEventQueue. It will have special code for the cooperatively scheduling threads in Quantum DOM.

There are two concrete implementations of AbstractEventQueue in this patch: EventQueue and PrioritizedEventQueue. EventQueue replaces the old nsEventQueue. The other AbstractEventQueue implementation is PrioritizedEventQueue, which uses multiple queues for different event priorities.

The final major piece here is ThreadEventTarget, which splits some of the code for posting events out of nsThread. Eventually, my plan is for multiple cooperatively scheduled nsThreads to be able to share a ThreadEventTarget. In this patch, though, each nsThread has its own ThreadEventTarget. The class's purpose is just to collect some related code together.

One final note: I tried to avoid virtual dispatch overhead as much as possible. Calls to SynchronizedEQ methods do use virtual dispatch, since I plan to use different implementations for different threads with Quantum DOM. But all the calls to EventQueue methods should be non-virtual. Although the methods are declared virtual, all the classes used are final and the concrete classes involved should all be known through templatization.

MozReview-Commit-ID: 9Evtr9oIJvx
2017-08-16 20:55:43 -07:00
Carsten "Tomcat" Book eea1986e03 merge mozilla-inbound to mozilla-central a=merge 2017-08-16 11:23:24 +02:00
Nicholas Nethercote 4d15e13fc4 Bug 1390036 (part 3) - Remove nsXPIDLString. r=erahm.
--HG--
extra : rebase_source : 87094fef8b919094926ec1be26867985a7fe8708
2017-08-14 15:25:04 +10:00
Masatoshi Kimura f7fb96c7e5 Bug 1390106 - Stop using versioned scripts in tests. r=jmaher
MozReview-Commit-ID: ErqU4M1f7Oj

--HG--
extra : rebase_source : 968490c3f787949324c44ba75b6daf5c346f54c3
2017-08-14 20:46:55 +09:00
Wes Kocher 7651bde05c Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9Abf0fILvvK
2017-08-08 15:16:00 -07:00
Eric Rahm 65313fd340 Bug 1380154 - Part 1: Add the Chromium DAFSA generator. r=njn
This imports Chromium's `make_dafsa.py` script [1]. It takes in a gperf
formatted file (note: gperf is *not* required) and converts that to a compact
binary representation of the string data in the form of a deterministic
acyclic finite state automaton (DAFSA) [2].

The only change made to the script was to make it handle the arguments our
file generation script passes in to the `main` function.

It also imports the logic for traversing the DAFSA [3] almost verbatim in
`Dafsa.cpp`. A thin wrapper was added so that we can reuse the DAFSA structure
for multiple tables.

The only change made to the original logic was to swap in mozilla style
assertions and rename the not found constant from `kNotFound` to
`Dafsa::kKeyNotFound` in order to avoid a collision with `kNotFound` defined in
our nsString code.

[1] 6ba04a9056/tools/dafsa/make_dafsa.py
[2] https://en.wikipedia.org/wiki/Deterministic_acyclic_finite_state_automaton
[3] a2a90a35aa/net/base/registry_controlled_domains/registry_controlled_domain.cc (72)

MozReview-Commit-ID: Eion9POHZm5
2017-07-17 16:09:42 -07:00
Henry Chang 31e6f23f84 Bug 1355746 - Part 3. Test cases for IdleTaskRunner. r=smaug
MozReview-Commit-ID: 3RsC1pT9Fzc

--HG--
extra : rebase_source : 0e809780c75c9b8115e7242822ba1d44a1a0fe5d
extra : intermediate-source : 0a7daa942672d158b160b3e1af3ddbb88b36c953
extra : source : 08210ea8446bd222cda5c19ee326f8ffdbb65b3f
2017-07-12 14:13:44 +08:00
Sebastian Hengst a26fb8b04b Backed out changeset 9c41f1c5bcb8 (bug 1380154) for debug build bustage at xpcom/tests/gtest/TestExpirationTracker.cpp:83. r=backout on a CLOSED TREE 2017-08-07 21:43:08 +02:00
Eric Rahm 8075fcae90 Bug 1380154 - Part 1: Add the Chromium DAFSA generator. r=njn
This imports Chromium's `make_dafsa.py` script [1]. It takes in a gperf
formatted file (note: gperf is *not* required) and converts that to a compact
binary representation of the string data in the form of a deterministic
acyclic finite state automaton (DAFSA) [2].

The only change made to the script was to make it handle the arguments our
file generation script passes in to the `main` function.

It also imports the logic for traversing the DAFSA [3] almost verbatim in
`Dafsa.cpp`. A thin wrapper was added so that we can reuse the DAFSA structure
for multiple tables.

The only change made to the original logic was to swap in mozilla style
assertions and rename the not found constant from `kNotFound` to
`Dafsa::kKeyNotFound` in order to avoid a collision with `kNotFound` defined in
our nsString code.

[1] 6ba04a9056/tools/dafsa/make_dafsa.py
[2] https://en.wikipedia.org/wiki/Deterministic_acyclic_finite_state_automaton
[3] a2a90a35aa/net/base/registry_controlled_domains/registry_controlled_domain.cc (72)

MozReview-Commit-ID: Eion9POHZm5
2017-07-17 16:09:42 -07:00
Masatoshi Kimura f6b1dc1043 Bug 1375125 - Fix errors caused by mechanical replacement. r=froydnj
MozReview-Commit-ID: 1kOvLdeCJiR

--HG--
extra : rebase_source : 94b04b16ac5d951600d31d1cdb78b494d8275ad1
2017-08-05 08:21:55 +09:00
Masatoshi Kimura 8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Julian Seward 408d24da56 Bug 1382563 - Remove ns*String::AssignWithConversion. r=erahm.
This patch replaces four functions of the name AssignWithConversion which
are essentially wrappers around CopyASCIItoUTF16 and LossyCopyUTF16toASCII
with direct calls to the latter two functions.  The replaced functions are:

  void nsCString::AssignWithConversion( const nsAString& aData )
  void nsString::AssignWithConversion( const nsACString& aData )

  void nsTString_CharT::AssignWithConversion(
                            const incompatible_char_type* aData,
                            int32_t aLength = -1);

The last of the three exists inside the double-included nsTString* world and
so describes two functions, giving four in total.

This has two advantages:

* it removes code

* at the call points, it makes clear (from the replacement name) which
  conversion is being carried out.  The generic name "AssignWithConversion"
  doesn't make that obvious -- one had to infer it from the types.

The patch also removes two commented out lines from
editor/composer/nsComposerCommands.cpp, that appear to be related.  They are
at top level, where they would never have compiled.  They look like
leftovers from some previous change.

--HG--
extra : rebase_source : fb47bf450771c3c9ee3341dd14520f5da69ec4f5
2017-07-24 19:23:52 +02:00
Nathan Froyd a6c96367a7 Bug 1347963 - part 1 - introduce mozilla::RecursiveMutex; r=erahm
Having a proper recursively-acquirable mutex type makes intent clearer,
and RecursiveMutex also happens to be somewhat faster than
ReentrantMonitor.
2017-03-14 14:05:51 -04:00
Kris Maglione 8408f943c1 Bug 1383215: Follow-up: Fix straggler xpcshell test.
MozReview-Commit-ID: IhD2Kqtxtwu
2017-07-24 22:10:18 -07:00
Kris Maglione cd5c5d6f7f Bug 1383215: Part 5 - Update tests that relied on loading the same JSM from multiple URLs.
MozReview-Commit-ID: KEXGiMrauH7

--HG--
extra : rebase_source : c1b5a1e22c00bdc42cc7cdfae2f4718248c7965d
extra : histedit_source : 968e9daffc7505853aac4b892178f27c3386aec1
2017-07-21 18:01:42 -07:00
Sylvestre Ledru 7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
Marco Castelluccio 0f9d4e1985 Bug 1380665 - Define MOZ_CODE_COVERAGE for the entire tree. r=jmaher 2017-07-13 19:12:23 +02:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Nicholas Nethercote f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Wes Kocher ac0fd2038c Merge inbound to m-c a=merge
MozReview-Commit-ID: 3LXFVwSoMvs
2017-06-21 17:58:17 -07:00
Nathan Froyd b28fcc5c4b Bug 1372670 - part 5 - add nsIThreadManager::spinEventLoopUntilEmpty; r=erahm,florian
A number of places in JS need to drain the current thread's event queue,
which cannot be done with nsIThreadManager::spinEventLoopUntil, since we
need to not wait for an incoming event when attempting to process one.
2017-06-21 12:59:28 -04:00
Nathan Froyd 27c58cf89f Bug 1372670 - part 3 - add spinEventLoopUntil to nsIThreadManager; r=erahm,florian 2017-06-21 12:59:28 -04:00
Sebastian Hengst 0cbb4ac4e7 Backed out changeset 8cd0a75a643a (bug 1355746)
MozReview-Commit-ID: 1CxBzyDfpIP
2017-06-21 19:48:59 +02:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Henry Chang 2e272c0cd8 Bug 1355746 - Part 3. Test cases for IdleTaskRunner. r=smaug
MozReview-Commit-ID: 3RsC1pT9Fzc

--HG--
extra : rebase_source : d91cbd4da3c45c4d07159ecd80427d46fd10cd25
extra : intermediate-source : 59ea54d209ac6d47df340e9ff185b01f09afb995
extra : source : a14555b477d6c46d2ab75df7935d2af327e73cc3
2017-06-15 17:32:01 +08:00
Andreas Farre 43c18d7af3 Bug 1371274 - Add tests for NewIdleRunnable for classes without SetDeadline. r=froydnj
--HG--
extra : rebase_source : 9291a38f5533faf030b13d0c4e27dab06ddd5afe
2017-06-09 02:44:00 +02:00
Mats Palmgren e4f9fc369e Bug 1372317 part 3 - Remove nsBaseHashtable::LookupRemoveIf() since it's not used anymore. r=froydnj
Also, change the gtest to test Lookup() and Lookup().Remove()
in various forms.

MozReview-Commit-ID: 6AguNDhcR5W
2017-06-18 17:07:54 +02:00
Bill McCloskey 1158c7c282 Bug 1372733 - EventTargetFor should return an nsISerialEventTarget (r=bkelly)
MozReview-Commit-ID: Kchg4kqBERt
2017-06-15 20:16:25 -07:00
Jan de Mooij 83f290de99 Bug 1370608 part 1 - Move newEnumerate hook from ObjectOps to ClassOps. r=evilpie,bz 2017-06-14 10:37:44 +02:00
Wes Kocher 6c1a0ae549 Backed out 6 changesets (bug 1371699) for various failures including frequent img-blobURI-2.html failures and leaks a=backout
Backed out changeset 67a27cf0ab80 (bug 1371699)
Backed out changeset 7e494fa90087 (bug 1371699)
Backed out changeset 30405ec37e1e (bug 1371699)
Backed out changeset 2d67624a01dc (bug 1371699)
Backed out changeset 503c9d22e6bb (bug 1371699)
Backed out changeset eedcb67a9fb6 (bug 1371699)

MozReview-Commit-ID: 4HydLjK7Ond
2017-06-13 17:50:11 -07:00
Mats Palmgren efb3f5fa2f Bug 1371094 part 2 - Add some tests for the LookupForAdd/OrInsert/LookupRemoveIf methods. r=froydnj
MozReview-Commit-ID: 4TgtCwyvBQt
2017-06-14 01:03:38 +02:00
Bill McCloskey 5066de8593 Bug 1366072 - MozPromise tests (r=jwwang)
MozReview-Commit-ID: 69OQb1f3UTd
2017-06-13 14:51:07 -07:00
Boris Zbarsky 319fd7b3aa Bug 1371699 part 6. Implement nsIAsyncInputStream for nsStringInputStream. r=bkelly 2017-06-13 16:16:58 -04:00
Boris Zbarsky 5193353a61 Bug 1371699 part 4. Make nsIMultiplexInputStream not inherit from nsIInputStream. r=bkelly
This is a preexisting issue that makes nsMultiplexInputStream multiple-inherit
from nsIInputStream: once via nsIMultipartInputStream and once via
nsIAsyncInputStream.  This causes problems once we end up with more multiplex
streams that are async streams, because then some assingments to
nsCOMPtr<nsIInputStream> start asserting.  This patch just removes the footgun
by getting rid of the multiple inheritance.
2017-06-13 16:16:39 -04:00
Bill McCloskey 595e5d79c8 Bug 1361164 - Add nsISerialEventTarget (r=froydnj)
MozReview-Commit-ID: 8y1GdEGCPSB
2017-06-12 20:20:08 -07:00
Eric Rahm 32235488fc Bug 1370644 - Part 1: Only use NS_ERROR for an imminent failure. r=froydnj
This modifies the logic in |CheckAcquisition| to only call |NS_ERROR| if we're
really going to deadlock. Instead, if we detect a suspicious cycle, we just use
an |NS_WARNING|. This means that we'll still output warning text in debug
builds, but we won't cause the process to abort.

MozReview-Commit-ID: 71mFInWwbDY
2017-06-12 16:53:04 -04:00
Stephen A Pohl 630acd56de Bug 1364984 - Ensure that our sandbox and tests can handle temp directory paths using symlinks on macOS. r=haik,aswan 2017-06-07 20:40:58 -04:00
Olli Pettay e4559f5c3b Bug 1368493, TimerThread::FindNextFireTimeForCurrentThread should look at timers in order, r=bkelly
--HG--
extra : rebase_source : a86b344380cbcd34d8930688eb90192846636dd8
2017-06-05 16:49:54 +03:00
Bryce Van Dyk 5d382edc2b Bug 1272371 - Add gtest to cover nsMultiplexInputStream set seek. r=froydnj
MozReview-Commit-ID: b3kTP3rerq

--HG--
extra : rebase_source : 3c760baa52a409eaf371d966fdaa293d3d53f81a
2017-05-30 11:27:18 +12:00
Ryan VanderMeulen 25cb66b774 Merge m-c to autoland on a CLOSED TREE. a=merge 2017-05-26 15:45:41 -04:00
Milan Sreckovic 831111d1d7 Bug 1361724: Remove unused offset parameter from StripChar, StripChars, StripTaggedASCII, StripCRLF. r=froydnj
MozReview-Commit-ID: 3MV5TFMxGjn

--HG--
extra : rebase_source : de7ee1fd36e1b18427c67d9ac6e98f50f780a498
2017-05-17 13:49:52 -04:00
Olli Pettay d9d7f6e11e Bug 1311425 - gtests for NS_GetTimerDeadlineHintOnCurrentThread, r=ehsan
--HG--
extra : rebase_source : 3c0164dac2d12705838fc6663bc8f824f17bbbea
2017-05-25 21:20:00 -04:00
Olli Pettay 67c78feadf Bug 1358476, add support for timeout when doing idle dispatch, tests, p=farre,smaug, r=nfroyd
--HG--
extra : rebase_source : 054bb7a4b7fdb41f255199bdc60a210149957292
2017-05-24 15:36:49 -04:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Nathan Froyd d0e620966f Bug 1363172 - add mozilla::RWLock; r=erahm
This sort of lock is mostly useful in the context of Stylo right now,
but perhaps there are other applications waiting to be written.
2017-05-22 21:26:26 -04:00
Marco Castelluccio 11243e335a Bug 1353882 - Disable TestArenaAllocator.AllocationsPerChunk and TestArenaAllocator.MemoryIsValid tests in code coverage builds. r=jmaher
--HG--
extra : rebase_source : 7a77f473f4fde7794cd70c17d8fdc4e8aa847061
2017-05-16 10:39:22 +02:00
Milan Sreckovic 725d1c193f Bug 1358297: Part 3. Create special case for stripping CR and LF on TSubstring, and use it in all the places that it is called. Use ASCIIMask to make it fast. r=froydnj
MozReview-Commit-ID: 5ugh3Ma0OtH

--HG--
extra : rebase_source : 956a7a0535c3b7433fadfa65d0cfc26d9915f61a
2017-05-10 13:12:36 -04:00
Milan Sreckovic 40b6fdfb4b Bug 1358297: Part 2. Helper class to mask ascii characters, letting us do a faster test for membership in a string/character set. r=froydnj
MozReview-Commit-ID: 1s3mYNVThoD

--HG--
extra : rebase_source : d9c845addaa4a7a326b787a99f5cc83abb567848
2017-05-10 13:12:30 -04:00
Milan Sreckovic 0bf3678bac Bug 1358297: Part 1. Unit test, including performance, for Strip/CompressWhitespace. Also using AssignLiteral in other tests where appropriate. r=froydnj
MozReview-Commit-ID: 658BVB7TIRz

--HG--
extra : rebase_source : c39f1440bd80f912886d3574baedd2754e224d59
2017-05-10 13:12:24 -04:00
Tom Tromey 2a731f278c Bug 1362215 - use MOZ_FORMAT_PRINTF in TestHarness.h; r=froydnj
MozReview-Commit-ID: JtNSFoowLIv

--HG--
extra : rebase_source : 64b4151db74653b40822b31cd2a5136204d630d4
2017-05-05 14:23:00 -06:00
Wes Kocher 6d6d039d43 Backed out 4 changesets (bug 1358297) for hazard build failures a=backout
Backed out changeset 95211a496191 (bug 1358297)
Backed out changeset 3c1b426a5cce (bug 1358297)
Backed out changeset 9201d345a1d5 (bug 1358297)
Backed out changeset c926817dea60 (bug 1358297)

MozReview-Commit-ID: 874DF43K7Dp
2017-05-05 12:45:46 -07:00
Milan Sreckovic 196fb1a3bc Bug 1358297: Part 3. Create special case for stripping CR and LF on TSubstring, and use it in all the places that it is called. Use ASCIIMask to make it fast. r=froydnj
MozReview-Commit-ID: 3p97cCGfy6i

--HG--
extra : rebase_source : a91d9a5e6e61495cfe78b06959b200e48ca16535
2017-05-05 13:37:13 -04:00
Milan Sreckovic d26cf838c6 Bug 1358297: Part 2. Helper class to mask ascii characters, letting us do a faster test for membership in a string/character set. r=froydnj
MozReview-Commit-ID: Ht1HBggc6DI

--HG--
extra : rebase_source : 72f81e1fa588d7852c9b0b316a53e6274835526b
2017-05-05 13:37:05 -04:00
Milan Sreckovic 69d3bca435 Bug 1358297: Part 1. Unit test, including performance, for Strip/CompressWhitespace. Also using AssignLiteral in other tests where appropriate. r=froydnj
MozReview-Commit-ID: H7PZsLmTzkc

--HG--
extra : rebase_source : 208e781360d4c9dd1a39070a370466b9fc009f9b
2017-05-05 13:36:55 -04:00
Patrick McManus 72b59b72e3 Bug 1361601 - Remove nsSystemInfo.getProperty("host") r=froydnj
See also bug 1361495 - PR_SI_HOSTNAME is implemented in NSPR on
Windows as initializing winsock which can be janky. There don't seem
to be any users of this property, and it has tracker concerns anyhow -
so remove it.

MozReview-Commit-ID: S2AwzMUgYk

--HG--
extra : rebase_source : 552bed219913f40c002b807be3239d4666a5284b
2017-05-02 16:54:46 -04:00
Tom Tromey 99f4608655 Bug 1334278 - change mozilla::Smprintf to return a UniquePtr; r=froydnj
Change mozilla::Smprintf and friends to return a UniquePtr, rather than
relying on manual memory management.  (Though after this patch there are
still a handful of spots needing SmprintfFree.)

MozReview-Commit-ID: COa4nzIX5qa

--HG--
extra : rebase_source : ab4a11b4d2e758099bd0794d5c25d799a7e42680
2017-03-03 08:17:27 -07:00
Florian Queze 4c6a68d1c9 Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00
Florian Queze 37f2343b9a Bug 1356569 - Remove appendElement's last parameter when it is false, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze 37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst 159215e6f4 Backed out changeset 18d45aa984d6 (bug 1355161) 2017-04-14 23:39:23 +02:00
Sebastian Hengst a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Sebastian Hengst 9e0ecf32c5 Backed out changeset e1f191aad863 (bug 1356569) 2017-04-14 23:39:17 +02:00
Florian Queze 93a734a3ce Bug 1356569 - Remove appendElement's last parameter when it is false, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze 95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Florian Queze a363fb8c8b Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00
Andrea Marchesini 7998eae548 Bug 1355369 - gtests for SlicedInputStream and ASyncWait, r=me 2017-04-12 13:49:08 +02:00
Eric Rahm f4d91001fe Bug 1351732 - Part 1: Add an ArenaAllocator strdup extension. r=froydnj
This adds an extension to ArenaAllocator that provides strdup-like
functionality for various string types.

MozReview-Commit-ID: 87SHTs6flHY
2017-03-30 16:46:56 -07:00
Eric Rahm 131c4c002f Bug 943156 - Add a templated ArenaAllocator. r=froydnj
This adds an arena allocator that can be used as a drop-in replacement for
NSPR's PLArena. Example usage for defining an 8-byte aligned allocator that
uses a 4K arena size:

mozilla::ArenaAllocator<4096,8> a;
void* memory = a.Allocate(200);
2017-03-30 16:46:55 -07:00
Carsten "Tomcat" Book 48d1be80d3 Merge mozilla-central to mozilla-inbound 2017-03-27 12:59:33 +02:00
Andrea Marchesini 5b7d646332 Bug 1350239 - SlicedInputStream::Seek must set correct position in the source stream, r=smaug 2017-03-27 11:48:06 +02:00
JW Wang b45a420b3e Bug 1318226. P2 - add gtest TestTaskQueue to test the order of regular tasks. r=bholley
MozReview-Commit-ID: 9Eg2ALRsV9j

--HG--
extra : rebase_source : 7245dc59749598f631bae3be46e46661e11642f6
extra : intermediate-source : 4fd827e0797d7bc1ac19c81a6e0b7915cf154bfe
extra : source : a96d4417c994020fa8d3df33a894a89192033fe4
2016-11-17 14:25:53 +08:00
David Major dc67bfc9a3 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo

--HG--
extra : rebase_source : c21a65694d6e1c42fd88f73632f7ac8f38d005ae
2017-03-14 15:26:27 +13:00
Iris Hsiao 5cece96e1c Backed out 12 changesets (bug 1344629) for stylo build bustage
Backed out changeset cf4273d3ac30 (bug 1344629)
Backed out changeset a96390e044e0 (bug 1344629)
Backed out changeset d9b330f9bc24 (bug 1344629)
Backed out changeset 2b460fe020af (bug 1344629)
Backed out changeset 0ada91b0452e (bug 1344629)
Backed out changeset 083304fcd6bd (bug 1344629)
Backed out changeset 53d7d1ce2c97 (bug 1344629)
Backed out changeset 55eee7078ae4 (bug 1344629)
Backed out changeset 7d3c06b3eca9 (bug 1344629)
Backed out changeset e5df14c3db61 (bug 1344629)
Backed out changeset 636095ff2815 (bug 1344629)
Backed out changeset 0be052ad24c1 (bug 1344629)
2017-03-14 11:52:24 +08:00