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

19481 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez ad56e58826 Bug 1595212 - Use MaybeUninit in nsString tests. r=SimonSapin
Differential Revision: https://phabricator.services.mozilla.com/D52824

--HG--
extra : moz-landing-system : lando
2019-11-13 12:39:23 +00:00
Simon Giesecke 28f1dd4c5b Bug 1595750 - Add MakeBackInserter function to create a back-inserting output iterator for nsTArray. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D52685

--HG--
extra : moz-landing-system : lando
2019-11-13 09:06:42 +00:00
Mirko Brodesser 9997183bdd Bug 1591417: part 3) Add `nsTStringRepr<T>::EqualsLatin1`. r=froydnj
Needed to compare with `nsTextFragment::Get1b()` which returns latin1-encoded
characters. Used in a subsequent review.

Differential Revision: https://phabricator.services.mozilla.com/D52343

--HG--
extra : moz-landing-system : lando
2019-11-12 15:20:25 +00:00
Noemi Erli 985bd5675a Backed out changeset 9b131da7e0cc (bug 1595750) for causing Windows build bustages CLOSED TREE 2019-11-12 20:08:09 +02:00
Andrew McCreight f922f43922 Bug 1595828 - Fix some include guards. r=froydnj
The formatting change presumably happens because clang-format treats
include guards differently.

Differential Revision: https://phabricator.services.mozilla.com/D52698

--HG--
extra : moz-landing-system : lando
2019-11-12 17:27:20 +00:00
Andrew McCreight b6345fe53d Bug 1595812 - Fix include guard in IntentionalCrash.h. r=froydnj
The include guard needs to happen before any non-trivial tokens.

I guess this change made clang-format decide the other ifdefs aren't
actually nested, so it dropped the indents.

Differential Revision: https://phabricator.services.mozilla.com/D52691

--HG--
extra : moz-landing-system : lando
2019-11-12 16:13:14 +00:00
Simon Giesecke e0f8b73760 Bug 1595750 - Add MakeBackInserter function to create a back-inserting output iterator for nsTArray. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D52685

--HG--
extra : moz-landing-system : lando
2019-11-12 15:52:24 +00:00
John Dai 790ed5a490 Bug 1552313 - Implement disableShadow; r=smaug,edgar
Differential Revision: https://phabricator.services.mozilla.com/D52157

--HG--
extra : moz-landing-system : lando
2019-11-12 11:27:52 +00:00
John Dai 128e81de25 Bug 1552313 - Implement custom element disabledFeatures and disableInternals; r=smaug,edgar
- Introduce `dom.webcomponents.elementInternals.enabled` for custom element's elementInternals.
- Implement disabledFeatures static field and disableInternals.
- Refactor get observedAttributes sequence.

Differential Revision: https://phabricator.services.mozilla.com/D52156

--HG--
extra : moz-landing-system : lando
2019-11-12 11:27:45 +00:00
Sylvestre Ledru d2eabf8906 Bug 1562642 - add missing license in xpcom/ r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D52579

--HG--
extra : moz-landing-system : lando
2019-11-11 21:44:32 +00:00
Dorel Luca cbf2994b14 Backed out 3 changesets (bug 1552313) for WPT failures in custom-elements/CustomElementRegistry.html. CLOSED TREE
Backed out changeset 27a01989152a (bug 1552313)
Backed out changeset 5f8c6c9f2d36 (bug 1552313)
Backed out changeset f26d61e06a9d (bug 1552313)
2019-11-11 20:55:58 +02:00
John Dai 708988da6b Bug 1552313 - Implement disableShadow; r=smaug,edgar
Differential Revision: https://phabricator.services.mozilla.com/D52157

--HG--
extra : moz-landing-system : lando
2019-11-11 15:42:58 +00:00
John Dai e95dd01125 Bug 1552313 - Implement custom element disabledFeatures and disableInternals; r=smaug,edgar
- Introduce `dom.webcomponents.elementInternals.enabled` for custom element's elementInternals.
- Implement disabledFeatures static field and disableInternals.
- Refactor get observedAttributes sequence.

Differential Revision: https://phabricator.services.mozilla.com/D52156

--HG--
extra : moz-landing-system : lando
2019-11-11 15:42:56 +00:00
Ehsan Akhgari 4e7fddabcb Bug 1542885 - Make some event related atoms static in order to reduce content process memory usage; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D51488

--HG--
extra : moz-landing-system : lando
2019-11-04 18:04:14 +00:00
Bogdan Tara 80377e90ee Backed out 6 changesets (bug 1552176) for causing Hazard bustages CLOSED TREE
Backed out changeset c79b90bae420 (bug 1552176)
Backed out changeset 4b970cc771ca (bug 1552176)
Backed out changeset de7aa0eaf4c8 (bug 1552176)
Backed out changeset c8e692a40cd3 (bug 1552176)
Backed out changeset 68882d1eccac (bug 1552176)
Backed out changeset 692e5e51e19e (bug 1552176)
2019-11-11 12:11:36 +02:00
Valentin Gosu 0680f64f28 Bug 1552176 - Generate rust methods from cenum idl r=nika
This patch changes the xpidl parser to generate the rust trait code for
methods that take or return a cenum value.
Previously this would return an error, which means that adding a method
that uses cenums to an existing interface could cause rust code that
implements that interface to fail to build.

The generated methods take or return u8/u16/u32 depending on the width of the
enum. While this is not optimal (the parameter could contain values that are
not actually part of the enum), this is similar to what we do for nsLoadFlags.
In the future it would be nice to generate code that actually checks the
values are present in the enum, and to use a typedef instead of a plain
unsigned int.

Differential Revision: https://phabricator.services.mozilla.com/D51838

--HG--
extra : moz-landing-system : lando
2019-11-10 17:12:32 +00:00
Randell Jesup 4be7858359 Bug 1572337: Make GetRunningEventDelay handle threadpools r=froydnj
Threadpools run an event that then runs other events, so we need to tweak
things for GetRunningEventDelay()

Differential Revision: https://phabricator.services.mozilla.com/D44058

--HG--
extra : moz-landing-system : lando
2019-11-08 21:07:45 +00:00
Randell Jesup 6cc1163786 Bug 1572337: Monitor running event delays and start times r=froydnj
This lets us determine the time that an event has been running, and the time
that the event spent queued - which can be used to figure out 'jank' at the
time the event was queued. For PrioritizedEventQueues, only if such queuing
would delay an input event then the queuing delay is reported.

Differential Revision: https://phabricator.services.mozilla.com/D41279

--HG--
extra : moz-landing-system : lando
2019-11-08 21:07:36 +00:00
Randell Jesup 48ca7ca3d8 Bug 1572337: ensure MainThread is registered with the profiler properly r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D41619

--HG--
extra : moz-landing-system : lando
2019-11-08 21:07:29 +00:00
Bogdan Tara 8f38f4a3fb Backed out 6 changesets (bug 1552176) for bustages complaining about ServiceWorkerManager.cpp CLOSED TREE
Backed out changeset bff9110e434e (bug 1552176)
Backed out changeset ac8f8a6dbd98 (bug 1552176)
Backed out changeset 8dd630e7534a (bug 1552176)
Backed out changeset 7ce9e220cdb9 (bug 1552176)
Backed out changeset ee9911acfcd4 (bug 1552176)
Backed out changeset 652b3bd6848d (bug 1552176)
2019-11-08 22:18:05 +02:00
Valentin Gosu b5ca94720e Bug 1552176 - Generate rust methods from cenum idl r=nika
This patch changes the xpidl parser to generate the rust trait code for
methods that take or return a cenum value.
Previously this would return an error, which means that adding a method
that uses cenums to an existing interface could cause rust code that
implements that interface to fail to build.

The generated methods take or return u8/u16/u32 depending on the width of the
enum. While this is not optimal (the parameter could contain values that are
not actually part of the enum), this is similar to what we do for nsLoadFlags.
In the future it would be nice to generate code that actually checks the
values are present in the enum, and to use a typedef instead of a plain
unsigned int.

Differential Revision: https://phabricator.services.mozilla.com/D51838

--HG--
extra : moz-landing-system : lando
2019-11-08 17:13:59 +00:00
Nathan Froyd bc5cca4b95 Bug 1594730 - fix silly bug for the background event target; r=KrisWright
The static analysis caught this for me in Bug 1593812, I was just to
dumb to actually apply this change prior to commit.

Differential Revision: https://phabricator.services.mozilla.com/D52170

--HG--
extra : moz-landing-system : lando
2019-11-07 16:04:45 +00:00
Matt Woodrow 1ec616f192 Bug 1593560 - Only return false from NS_InputStreamIsBuffered if the underlying object doesn't implement ReadSegments. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D51549

--HG--
extra : moz-landing-system : lando
2019-11-06 22:37:07 +00:00
Razvan Maries cb87085ec4 Backed out 3 changesets (bug 1572337) ford perma fails. CLOSED TREE
Backed out changeset 00da7156d3fa (bug 1572337)
Backed out changeset 4eda65e054d8 (bug 1572337)
Backed out changeset ea6d5b4b038b (bug 1572337)
2019-11-07 17:29:46 +02:00
Randell Jesup 95192d13e3 Bug 1572337: Make GetRunningEventDelay handle threadpools r=froydnj
Threadpools run an event that then runs other events, so we need to tweak
things for GetRunningEventDelay()

Differential Revision: https://phabricator.services.mozilla.com/D44058

--HG--
extra : moz-landing-system : lando
2019-11-07 12:53:32 +00:00
Randell Jesup 0be1d80429 Bug 1572337: ensure MainThread is registered with the profiler properly r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D41619

--HG--
extra : moz-landing-system : lando
2019-11-07 12:53:26 +00:00
Randell Jesup 10353eba91 Bug 1572337: Monitor running event delays and start times r=froydnj
This lets us determine the time that an event has been running, and the time
that the event spent queued - which can be used to figure out 'jank' at the
time the event was queued. For PrioritizedEventQueues, only if such queuing
would delay an input event then the queuing delay is reported.

Differential Revision: https://phabricator.services.mozilla.com/D41279

--HG--
extra : moz-landing-system : lando
2019-11-07 12:53:28 +00:00
Nathan Froyd 1b72ad9705 Bug 1593812 - add I/O awareness for the background thread target; r=KrisWright
We need some way of differentiating "tasks that just consume CPU"
vs. "tasks that block on some external resource" like reading from a
socket or a file.  If we didn't have this, we'd either a) have a thread
pool sized for the number of CPUs where having all the threads blocked
on I/O--and therefore no new tasks are able to run--or b) have a thread
pool that tries to increase the number of working threads based on the
number of submitted tasks and winds up having too many tasks running
with not enough CPUs to run them on.

This flag enables us to theoretically get the best of both worlds: we
can set aside `~#CPUs` threads for CPU-intensive work, and
`$SOME_NUMBER` threads for I/O work.  The latter number can be adjusted
up if the I/O load on the system is particularly heavy.

The implementation strategy of this patch is to use two separate thread
pools for the two different kinds of work.  It's entirely possible that
we'll want to use a single thread pool to coordinate thread create
between the two kinds of work, or even migrate threads from one kind of
work to the other, but such improvements can be future work.  The focus
right now is providing the rest of Gecko with a common funnel to put
tasks into, and we can adjust what's at the end of the funnel at a later
point.

Differential Revision: https://phabricator.services.mozilla.com/D51708

--HG--
extra : moz-landing-system : lando
2019-11-05 18:33:25 +00:00
Coroiu Cristina cbdbc8bc4b Backed out 7 changesets (bug 1593560) for crashtest failures at tests/layout/base/crashtests/446328.html on a CLOSED TREE
Backed out changeset 7dfae085a4cb (bug 1593560)
Backed out changeset 9842c80c98d8 (bug 1593560)
Backed out changeset d67a10437af7 (bug 1593560)
Backed out changeset 3e3948e9531c (bug 1593560)
Backed out changeset a7d04e276b44 (bug 1593560)
Backed out changeset 9f52c9f6dc54 (bug 1593560)
Backed out changeset 90572c49d464 (bug 1593560)
2019-11-07 00:32:53 +02:00
Dorel Luca 819a6c47e8 Merge mozilla-central to autoland. CLOSED TREE 2019-11-07 00:08:31 +02:00
Dorel Luca a0370f2bc4 Backed out changeset 955256297d6d (bug 1579367) for causing a top crash in Bug 1594404. a=backout 2019-11-06 23:19:09 +02:00
Sebastian Hengst 401f1ce710 Merge mozilla-inbound to mozilla-central. a=merge 2019-11-06 14:54:44 +01:00
Matt Woodrow 8e9f3c627d Bug 1593560 - Only return false from NS_InputStreamIsBuffered if the underlying object doesn't implement ReadSegments. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D51549

--HG--
extra : moz-landing-system : lando
2019-11-06 18:22:30 +00:00
Emilio Cobos Álvarez 785ebbeab9 Bug 1594275 - Parse the exportparts attribute. r=bzbarsky
But don't hook it into style yet, that'll be a follow-up patch.

I had this patch in my local queue for a bit and there was no point in not
landing it I guess.

The value of this attribute could be stored only in the shadow root (as this
only applies to shadow hosts), but that would make invalidation harder, I think,
so do the obvious thing for now.

Differential Revision: https://phabricator.services.mozilla.com/D51963

--HG--
extra : moz-landing-system : lando
2019-11-06 18:03:51 +00:00
Nicholas Nethercote af281df032 Bug 1587176 - Fix UBSAN complaints about nsCOMArray. r=erahm
nsCOMArray currently casts a function that takes two `void` pointers into a
function that takes two `nsISupports` pointers. UBSAN doesn't like this.

This commit introduces an extra level of casting machinery. As a result, each
comparison done while sorting goes through an extra level, to get from `(T*,
T*)` comparisons to `(nsISupports*, nsISupports*)` comparisons to `(void*,
void*)` comparisons, as required by `NS_QuickSort()`. It's a bit annoying but I
can't see how else to solve this within the constraint imposed by the existing
`nsCOMArray_base`/`nsCOMArray` split.

Differential Revision: https://phabricator.services.mozilla.com/D51223

--HG--
extra : moz-landing-system : lando
2019-11-05 00:14:10 +00:00
Nicholas Nethercote aa1586413a Bug 1587176 - Rename some nsCOMArray internal stuff. r=erahm
This makes the subsequent commit easier to understand.

Differential Revision: https://phabricator.services.mozilla.com/D51222

--HG--
extra : moz-landing-system : lando
2019-11-05 00:12:06 +00:00
Nathan Froyd 892767cef9 Bug 1593802 - don't drop dispatch flags in TaskQueue's EventTargetWrapper; r=erahm
`TaskQueue` wraps an `nsIEventTarget` to provide "one runnable at a
time" execution policies regardless of the underlying implementation of
the wrapped `nsIEventTarget` (e.g. a thread pool).  `TaskQueue` also
provides a `nsISerialEventTarget` wrapper, `EventTargetWrapper`, around
itself (!) for consumers who want to continue to provide a more
XPCOM-ish API.

One would think that dispatching tasks to `EventTargetWrapper` with a
given set of flags would pass that set of flags through, unchanged, to
the underlying event target of the wrapped `TaskQueue`.

This pass-through is not the case.  `TaskQueue` supports a "tail
dispatch" mode of operation that is somewhat underdocumented.  Roughly,
tail dispatch to a `TaskQueue` says (with several other conditions) that
dispatched tasks are held separately and not passed through to the
underlying event target.  If a given `TaskQueue` supports tail dispatch
and the dispatcher also supports tail dispatch, any tasks dispatched to
said `TaskQueue` are silently converted to tail dispatched tasks.  Since
tail dispatched tasks can't meaningfully have flags associated with
them, the current implementation simply drops any passed flags on the floor.

These flags, however, might be meaningful, and we should attempt to
honor them in the cases we're not doing tail dispatch.  (And when we are
doing tail dispatch, we can verify that the requested flags are not
asking for peculiar things.)

Differential Revision: https://phabricator.services.mozilla.com/D51702

--HG--
extra : moz-landing-system : lando
2019-11-05 16:59:30 +00:00
Nathan Froyd f64f04d6ef Bug 1593803 - rename NS_DispatchToBackgroundThread to NS_DispatchBackgroundTask; r=KrisWright
The current API name is bad: we want it to be read "some background
thread", but it could just as easily be read "a singular background
thread", which would lead people to assume that for:

```
NS_DispatchToBackgroundThread(...);
NS_DispatchToBackgroundThread(...);
```

the dispatched tasks will necessarily run in the order they are
dispatched, which is not the case.

Let's try to head off that interpretation by renaming this function.

Differential Revision: https://phabricator.services.mozilla.com/D51703

--HG--
extra : moz-landing-system : lando
2019-11-05 21:19:18 +00:00
Andrew McCreight 634c8dd169 Bug 1591174 - Fix some references to nsIDOMWindow. r=bzbarsky
nsIDOMWindow is now an empty interface. There are two references to
nsIDOMWindow::openDialog in comments which needed to be updated. There
were also a few forward declarations of nsIDOMWindow that were unused.

Differential Revision: https://phabricator.services.mozilla.com/D51738

--HG--
extra : moz-landing-system : lando
2019-11-05 04:52:53 +00:00
Bob Owen 71c23a88fd Bug 1593007: Allow for moz_log suffix in sandbox policy rules. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D51431

--HG--
extra : moz-landing-system : lando
2019-11-05 13:05:36 +00:00
Edgar Chen 6e2bd552ea Bug 1578241 - Get rid of dom.promise_rejection_events.enabled; r=mccr8
promise rejection event was enabled by default on 69 (bug 1525554).
We could get rid of this preference.

Differential Revision: https://phabricator.services.mozilla.com/D51491

--HG--
extra : moz-landing-system : lando
2019-11-04 18:08:54 +00:00
Jan de Mooij 96cc0b5247 Bug 1579367 - Initialize XPCJSContext explicitly, after loading user prefs. r=kmag
This way we get the correct values for start-up prefs in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D51061

--HG--
extra : moz-landing-system : lando
2019-11-05 06:29:13 +00:00
Emilio Cobos Álvarez fe10c35ad2 Bug 1591191 - Move compare and EqualsIgnoreAsciiCase to nsTStringRepr. r=erahm
Zibi is working on replacing some string based APIs with some things that return
substrings, so we could use this.

Alternatively he'd have to do something like:

  Compare(myCSubstring, nsDependentCSubstring(aTag, strlen(aTag)))

or something of that sort, which looks a bit uglier.

Differential Revision: https://phabricator.services.mozilla.com/D50523

--HG--
extra : moz-landing-system : lando
2019-11-04 11:27:05 +00:00
Dorel Luca d8264bf6a7 Backed out changeset eb3d67637a9b (bug 1591191) for build bustage on build/src/xpcom/string/precompiled_templates.cpp. CLOSED TREE 2019-11-04 12:40:57 +02:00
Emilio Cobos Álvarez 7d302de427 Bug 1591191 - Move compare and EqualsIgnoreAsciiCase to nsTStringRepr. r=erahm
Zibi is working on replacing some string based APIs with some things that return
substrings, so we could use this.

Alternatively he'd have to do something like:

  Compare(myCSubstring, nsDependentCSubstring(aTag, strlen(aTag)))

or something of that sort, which looks a bit uglier.

Differential Revision: https://phabricator.services.mozilla.com/D50523

--HG--
extra : moz-landing-system : lando
2019-10-29 20:09:00 +00:00
Noemi Erli 35873cfc31 Backed out changeset 9fccb38453a4 (bug 1586236) for causing mass devtools failures 2019-11-03 05:17:02 +02:00
Gijs Kruitbosch 608f3e7539 Bug 1545123 - simplify how we get directory information for plugins, r=handyman,mconley
In this change we:
- stop treating the nsPluginDirServiceProvider as a directory provider, as its
  GetFile implementation was a no-op anyway - registering it didn't make any
  difference.
- stop treating it as a class entirely, because the PLID getters were already
  static, so instantiating it also didn't do anything.
- move IO from the plugin directory list provider and the Windows-only PLID
  getters into nsPluginHost. This enables us to move it off of the main thread
  later - the directory getting has to happen on the main thread, but we can
  postpone further checks on the nsIFile instances.
- in the process, stop doing exists() calls on files because we can fail more
  lazily. This allows us to remove more allowlist entries from
  browser_startup_mainthreadio, though the `isDirectory` calls will actually
  still cause IO - they don't seem to create IO markers in the profiler.
  We will move this IO away from the main thread in subsequent commits.

Depends on D48328

Differential Revision: https://phabricator.services.mozilla.com/D48329

--HG--
extra : moz-landing-system : lando
2019-11-02 22:33:42 +00:00
Ciure Andrei fdfd0105e6 Backed out 5 changesets (bug 1545123) for causing nsPluginTags.cpp build bustages CLOSED TREE
Backed out changeset 91313cceae8c (bug 1545123)
Backed out changeset d91549e68229 (bug 1545123)
Backed out changeset 269d89e09fbb (bug 1545123)
Backed out changeset a139ee115519 (bug 1545123)
Backed out changeset eb454f238f45 (bug 1545123)
2019-11-02 14:00:38 +02:00
Gijs Kruitbosch c04f0a7345 Bug 1545123 - simplify how we get directory information for plugins, r=handyman,mconley
In this change we:
- stop treating the nsPluginDirServiceProvider as a directory provider, as its
  GetFile implementation was a no-op anyway - registering it didn't make any
  difference.
- stop treating it as a class entirely, because the PLID getters were already
  static, so instantiating it also didn't do anything.
- move IO from the plugin directory list provider and the Windows-only PLID
  getters into nsPluginHost. This enables us to move it off of the main thread
  later - the directory getting has to happen on the main thread, but we can
  postpone further checks on the nsIFile instances.
- in the process, stop doing exists() calls on files because we can fail more
  lazily. This allows us to remove more allowlist entries from
  browser_startup_mainthreadio, though the `isDirectory` calls will actually
  still cause IO - they don't seem to create IO markers in the profiler.
  We will move this IO away from the main thread in subsequent commits.

Depends on D48328

Differential Revision: https://phabricator.services.mozilla.com/D48329

--HG--
extra : moz-landing-system : lando
2019-10-29 05:30:29 +00:00
Gabriele Svelto f34ffda7e2 Bug 1586236 - Use memory resource notifications to detect low memory scenarios on Windows; r=dmajor
This patch uses the low memory resource notification facility to detect
scenarios where physical memory is running low without polling. This is a
significant change compared to the previous behavior which measured both
available virtual memory (only on 32-bit builds) and available commit space.

Since we're not trying to avoid OOMs anymore we don't save memory reports
anymore when hitting a low-memory condition.

Differential Revision: https://phabricator.services.mozilla.com/D50471

--HG--
extra : moz-landing-system : lando
2019-11-01 23:08:59 +00:00