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

20714 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 9758d919eb Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-17 14:58:18 +00:00
Simon Giesecke 78678eab21 Bug 1679987 - Implement nsTSubstring::Split using nsTokenizedRange. r=xpcom-reviewers,necko-reviewers,nika
nsTSubstring::Split used to heap-allocate an array to store all tokens.
However, most uses of Split just use it to iterate in a range-based for loop.
The few remaining uses also don't need to iterate multiple times over all
tokens, so it's better to just use nsTokenizedRange, which tokenizes lazily.

Differential Revision: https://phabricator.services.mozilla.com/D99234
2020-12-17 12:36:47 +00:00
Masatoshi Kimura ecae686d70 Bug 1682103 - Allow typedef of CEnum types. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D99579
2020-12-16 15:35:39 +00:00
Masatoshi Kimura dc422d9edd Bug 1682103 - Stop parsing the same IDL files twice when resolving includes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D99876
2020-12-16 15:39:18 +00:00
Csoregi Natalia d8c9489b13 Backed out changeset 16d174e7c342 (bug 1583109) for bustage on nsReadableUtils.h. CLOSED TREE 2020-12-16 22:51:26 +02:00
Simon Giesecke 72babae175 Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-16 19:38:23 +00:00
Simon Giesecke 4a023dd2aa Bug 1679987 - Make nsTokenizerFlags a scoped enum and make them a template argument to nsTCharSeparatedTokenizer. r=xpcom-reviewers,necko-reviewers,nika
There are no uses of nsTCharSeparatedTokenizer that require run-time
configuration of the flags, so having them a compile-time template
argument allows for generation of more efficient code.

This might not matter that much now, but a subsequent patch will add another
flag to allow merging the implementation of nsTSubstring::Split with
nsTCharSeparatedTokenizer, through which the compile-time evaluation will
become more relevant.

Differential Revision: https://phabricator.services.mozilla.com/D99368
2020-12-16 19:10:21 +00:00
Simon Giesecke ae63265100 Bug 1679987 - Add nsTokenizedRange adapter to enable range-based for with tokenizers. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D98307
2020-12-16 19:10:13 +00:00
Simon Giesecke fe1c53bd2d Bug 1679987 - Convert tokenizer specializations from classes to type aliases. r=xpcom-reviewers,nika,necko-reviewers
Currently, the tokenizer specializations are subclasses of the generic base
template nsTCharSeparatedTokenizer. This is unnecessary with C++11 type aliases,
as those subclasses only delegate to the base constructor.

NS_TokenizerIgnoreNothing is introduced to replace several functions with
the same effect across the codebase.

Differential Revision: https://phabricator.services.mozilla.com/D98306
2020-12-16 19:10:06 +00:00
Anny Gakhokidze 0ce6e91045 Bug 1682694 - Add maxFrames arg to nsTraceRefcnt::WalkTheStack, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D99848
2020-12-16 17:44:28 +00:00
Steve Fink a1215827bb Bug 1673756 - Add GCCC subcategories for several phases of CC r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D99737
2020-12-15 16:48:23 +00:00
Sean Feng 12424aa6b0 Bug 1662265 - Fix input events handling for sync XHR when both TaskController and e10s are enabled r=smaug
There are two issues in our current setup

1) Input events which are occurring in the same tab are going to be lost
because sync XHR. We have event handling suppression for synx XHR, so input
events are going to be discarded.

2) Input events that are happening in another tab (same process as the
synx XHR tab) are not going to be delayed. This is not correct since
sync XHR should block the Javascript execution.

This patches fixes the above cases for when both TaskController and e10s are
enabled by suspending the InputTaskManager during sync XHR, which
delays the input event handling and keeps the events around.

Differential Revision: https://phabricator.services.mozilla.com/D90780
2020-12-15 01:33:24 +00:00
Kartik Gautam f7ffcd09fb Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-15 10:34:54 +00:00
Jon Coppeard e9109cd545 Bug 1681268 - Remove destroyed zones from the set of zones waiting for GC r=mccr8
This takes account of the fact that zones may be added to the waiting set
during an incremental GC, after the set has been cleared in
CycleCollectedJSRuntime::PrepareWaitingZonesForGC. I considered disallowing
zones to be added to the set during a GC but decided it would be better not to
lose track of poked zones in the usual case where they don't end up getting
destoryed by the current GC.

Differential Revision: https://phabricator.services.mozilla.com/D99072
2020-12-15 09:36:38 +00:00
Jon Coppeard a3c605929b Bug 1681268 - Check zone pointers passed into the API and add a callback for zone destruction r=sfink
This adds assertions that zone pointers passed in refer to zones we know about
and adds and API that's called when zones are destroyed. It also adds some
standard assertions for other related APIs.

Differential Revision: https://phabricator.services.mozilla.com/D99071
2020-12-15 09:36:12 +00:00
Sebastian Hengst d24e073b75 Merge mozilla-central to autoland 2020-12-15 00:16:27 +01:00
Sebastian Hengst e59716e5d9 Merge autoland to mozilla-central. a=merge 2020-12-15 00:02:05 +01:00
Mozilla Releng Treescript 200cd613bc Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2020-12-14 15:48:03 +00:00
Bas Schouten 23c25cd32a Bug 1675073: Manually set the stack size for TaskController pool threads. r=aosmond,smaug
Differential Revision: https://phabricator.services.mozilla.com/D99611
2020-12-14 01:07:59 +00:00
Dorel Luca 7320ae982a Backed out changeset f3aaf04fce3b (bug 1679758) for Devtool failures in browser_styleeditor_syncAddProperty.js. CLOSED TREE 2020-12-13 16:38:21 +02:00
Kartik Gautam caf549c200 Bug 1679758 - Remove trailing empty lines r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-13 13:28:30 +00:00
Dan Glastonbury d22631c4d7 Bug 1679094 - Resolve dom::Promise from Rust. r=nika
A very limited interface to allow resolving dom::Promises from Rust code by
marshaling values via nsIVariant.

Differential Revision: https://phabricator.services.mozilla.com/D97905
2020-12-12 02:55:49 +00:00
Csoregi Natalia 3b68bf27c8 Backed out changeset cccdff68c790 (bug 1679094) for causing build bustage. CLOSED TREE 2020-12-12 03:18:44 +02:00
Simon Giesecke 792f5c1317 Bug 1583109 - Add StringJoin(Append) utility functions that join a sequence of items into a string. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D98749
2020-12-14 09:44:53 +00:00
Dan Glastonbury 27752e15a3 Bug 1679094 - Resolve dom::Promise from Rust. r=nika
A very limited interface to allow resolving dom::Promises from Rust code by
marshaling values via nsIVariant.

Differential Revision: https://phabricator.services.mozilla.com/D97905
2020-12-12 00:47:23 +00:00
Dan Glastonbury 6c151a3362 Bug 1679095 - Extend nsstring to support creating void strings. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D97904
2020-12-12 00:43:30 +00:00
Nika Layzell 6d17703514 Bug 1678463 - Part 1: Add _WITH_DELETE_ON_EVENT_TARGET macros to nsISupportsImpl, r=mccr8
This also migrates all existing users of _WITH_MAIN_THREAD_DESTRUCTION to the
new macro in nsISupportsImpl.

Differential Revision: https://phabricator.services.mozilla.com/D97825
2020-12-14 18:30:51 +00:00
Andrew McCreight 4ae7e718f0 Bug 1539948, part 3 - Only allow nostdcall methods and attributes on builtinclass interfaces. r=nika
We don't properly implement them in JS, so only allow them for C++.

This patch also makes the only remaining non-builtinclass interface
with a nostdcall method, nsIBinaryOutputStream, builtinclass.

This also changes the isScriptable() method to be consistent,
though I think the change doesn't matter because the only
place that calls it also checks if the interface is builtinclass.

Differential Revision: https://phabricator.services.mozilla.com/D98863
2020-12-09 02:41:19 +00:00
Razvan Maries 35ccea0325 Backed out 3 changesets (bug 1539948) for build bustages on nsISocketTransport.h. CLOSED TREE
Backed out changeset 81bed88d0adf (bug 1539948)
Backed out changeset 8bf24bdf431f (bug 1539948)
Backed out changeset ef4e49b3701d (bug 1539948)
2020-12-09 02:47:52 +02:00
Andrew McCreight d7be14b9d2 Bug 1539948, part 3 - Only allow nostdcall methods and attributes on builtinclass interfaces. r=nika
We don't properly implement them in JS, so only allow them for C++.

This patch also makes the only remaining non-builtinclass interface
with a nostdcall method, nsIBinaryOutputStream, builtinclass.

This also changes the isScriptable() method to be consistent,
though I think the change doesn't matter because the only
place that calls it also checks if the interface is builtinclass.

Differential Revision: https://phabricator.services.mozilla.com/D98863
2020-12-08 21:19:08 +00:00
Simon Giesecke 7d166ee1a3 Bug 1680217 - Allow NewRunnableMethod to move in the this pointer from a RefPtr. r=xpcom-reviewers,KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D98440
2020-12-07 21:43:43 +00:00
Simon Giesecke 1c53236b70 Bug 1679272 - Include ScopeExit.h exactly where used. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D98888
2020-12-07 14:25:59 +00:00
Xidorn Quan 8799a09b16 Bug 1661961 - Upgrade cstr to 0.2.x. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D98839
2020-12-07 08:01:04 +00:00
Karl Tomlinson 3dc3be09ee Bug 1677888 adjust IncrementalFinalizeRunnable no-op test r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D98121
2020-12-04 14:43:08 +00:00
Karl Tomlinson d508bddd4f Bug 1119956 implement IdleRunnableWrapper::OnDiscard() r=sg
This causes no behavior changes in the current code because existing runnables
passed to NS_DispatchToThreadQueue() are either run on the main thread where
OnDiscard() is not called or they have only a no-op OnDiscard().

Differential Revision: https://phabricator.services.mozilla.com/D98120
2020-12-06 21:51:01 +00:00
Bas Schouten d7db260690 Bug 1680544 - Part 3: Do not log runnables coming from TaskController. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98646
2020-12-04 18:59:45 +00:00
Bas Schouten e9ccb2eec1 Bug 1680544 - Part 2: Specialize LogTaskBase<Task>::Run::Run. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98645
2020-12-04 19:14:12 +00:00
Bas Schouten 3f4d736062 Bug 1680544 - Part 1: Introduce a GetName member for Tasks and implement this for RunnableTask. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D98644
2020-12-04 19:54:18 +00:00
Steve Fink 6a927752ef Bug 1678416 - Minor comment fixes r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90901
2020-12-04 16:03:24 +00:00
Steve Fink 68bc625380 Bug 1678416 - Implement IdleTaskRunner::SetBudget() and add some comments. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97670
2020-12-04 16:02:52 +00:00
Razvan Maries c3c2eaa18e Backed out changeset 975163dad54f (bug 1680402) for causing leaks. CLOSED TREE 2020-12-04 07:06:30 +02:00
Razvan Maries 016881a724 Backed out 5 changesets (bug 1678416) for build bustages on CCGCScheduler.h. CLOSED TREE
Backed out changeset cc5f7ecb3922 (bug 1678416)
Backed out changeset 61d9f960b80e (bug 1678416)
Backed out changeset 882f7ebe33fe (bug 1678416)
Backed out changeset e845a32a60bd (bug 1678416)
Backed out changeset 85f35f5749a0 (bug 1678416)
2020-12-04 04:55:39 +02:00
Jeff Muizelaar 62e7969d1a Bug 1680402. Use stderr in printf_stderr instead of reopening fd 2. r=glandium
Currently, printf_stderr doesn't show up when running with ./mach run.
This is because we run with -attach-console and that redirects stderr
to a different file descriptor using freopen in UseParentConsole.

The change from just using stderr directly happened in bug 340443 and was done
to avoid some linking issues. That problem doesn't seem to apply anymore so we
should be able to go back to the straightforward implemention that works even
if stderr has been redirected. The mozglue implementation was cargo culted from
xpcom, and there wasn't a reason other than that for the fdopen(dup()) there.

Differential Revision: https://phabricator.services.mozilla.com/D98550
2020-12-04 02:46:57 +00:00
Steve Fink f5c9716fcb Bug 1678416 - Minor comment fixes r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90901
2020-12-04 02:40:29 +00:00
Steve Fink cd97876818 Bug 1678416 - Implement IdleTaskRunner::SetBudget() and add some comments. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97670
2020-12-04 02:40:00 +00:00
Dave Townsend 486e6c4fae Bug 1675329: Add an API for returning an exit code from the application. r=dthayer,necko-reviewers,dragana,nika
Callers can pass an exit code to nsIAppStartup::Quit and it will be returned from the process when
it exits.

Note that I have using uint16_t as the exit code because on Windows the exit code can be a uint and
elsewhere it is an int. A uint16_t will safely convert to either of those and no-one will ever need
more than 64k exit codes!

Differential Revision: https://phabricator.services.mozilla.com/D96857
2020-12-03 20:19:47 +00:00
Karl Tomlinson b0be138f26 Bug 1119956 don't pretend to implement nsICancelableRunnable::Cancel() r=gsvelto,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D98119
2020-12-02 06:32:39 +00:00
Karl Tomlinson 88c7f3ad66 Bug 1119956 derive from DiscardableRunnable instead of CancelableRunnable when Cancel() is not supported r=asuth,sg
Differential Revision: https://phabricator.services.mozilla.com/D98118
2020-12-03 09:04:44 +00:00
Razvan Maries fd89df3f6d Backed out changeset 432c83951167 (bug 1662265) for perma failures on test_sync_xhr_event_handling_switch_bcg.html. CLOSED TREE 2020-12-03 23:03:05 +02:00
Sean Feng f521450d39 Bug 1662265 - Fix input events handling for sync XHR when both TaskController and e10s are enabled r=smaug
There are two issues in our current setup

1) Input events which are occurring in the same tab are going to be lost
because sync XHR. We have event handling suppression for synx XHR, so input
events are going to be discarded.

2) Input events that are happening in another tab (same process as the
synx XHR tab) are not going to be delayed. This is not correct since
sync XHR should block the Javascript execution.

This patches fixes the above cases for when both TaskController and e10s are
enabled by suspending the InputTaskManager during sync XHR, which
delays the input event handling and keeps the events around.

Differential Revision: https://phabricator.services.mozilla.com/D90780
2020-12-03 03:13:04 +00:00