Commit Graph

20703 Commits

Author SHA1 Message Date
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
Barret Rennie
e0e9d2d31b Bug 1660841 - Provide file creation time via nsIFile::creationTime{,ofLink} r=nika
Differential Revision: https://phabricator.services.mozilla.com/D96889
2020-12-03 04:10:47 +00:00
Karl Tomlinson
5e0ca15c1e Bug 1119956 add CancelableRunnable documentation to clarify expectations r=sg
Differential Revision: https://phabricator.services.mozilla.com/D98288
2020-12-01 10:05:21 +00:00
Karl Tomlinson
fe53cdd395 Bug 1119956 introduce DiscardableRunnable for tasks that might not run but might not implement cancellation r=asuth,sg
Classes that inherit from DiscardableRunnable are only promising that it is OK
for Run() to be skipped, rather than promising that Cancel() is effective.

Differential Revision: https://phabricator.services.mozilla.com/D98117
2020-12-02 09:36:25 +00:00
Andrew McCreight
0652b2582f Bug 1680040 - Remove failure check for CheckAndCreateBloatView() and rename it. r=xpcom-reviewers,nika
CheckAndCreateBloatView() is infallible, so there's no need to check if it
worked.

I also renamed the function to EnsureBloatView() because that better matches the
common practice, and what the function is actually doing.

Finally, I added a small grammar fix.

Differential Revision: https://phabricator.services.mozilla.com/D98342
2020-12-01 21:27:19 +00:00
Byron Campen [:bwc]
f8ab1fb0f7 Bug 1626278: Test case for MozPromise::AllSettled. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D92652
2020-11-19 18:46:22 +00:00
Byron Campen [:bwc]
e0c988cd55 Bug 1626278: Implement MozPromise::AllSettled, based on JS Promise API. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D91467
2020-11-19 18:50:08 +00:00
Karl Tomlinson
c308c16f1e Bug 1119956 add override and use NS_IMETHOD for in-class definition r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D98116
2020-12-01 07:11:44 +00:00
Jon Coppeard
234f97f9c5 Bug 1678309 - Type header pointer when shrinking nsTArray storage r=mccr8
This gives the pointer to the new header the type |Header*| and renames the
pointer and size to newHeader and newSize for clarity.

Differential Revision: https://phabricator.services.mozilla.com/D97607
2020-11-30 09:30:14 +00:00
Simon Giesecke
e1afffcd87 Bug 1676372 - Avoid including PlatformDecoderModule.h in header files. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D96544
2020-11-26 13:20:59 +00:00
Valentin Gosu
fbac36fa65 Bug 1667581 - Ensure there's only one nsSegmentedBuffer::FreeOMT pending at any time r=sg
Differential Revision: https://phabricator.services.mozilla.com/D97368
2020-11-26 08:15:03 +00:00
Valentin Gosu
6fe922232a Bug 1667581 - Batch calls to nsSegmentedBuffer::FreeOMT when dispatching to a background thread r=baku,sg,KrisWright
This is a workaround for bug 1670737 to avoid spamming a saturated
thread pool with too many events.
Also converts some unused code to a gtest.

Differential Revision: https://phabricator.services.mozilla.com/D93995
2020-11-25 18:21:38 +00:00