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

724681 Коммитов

Автор SHA1 Сообщение Дата
Narcis Beleuzu b4560d9e94 Backed out 2 changesets (bug 1661897) for mochitest failures on test_group_mouseevents.html . CLOSED TREE
Backed out changeset 34ee0403ab1e (bug 1661897)
Backed out changeset f83db4b41bf6 (bug 1661897)
2020-09-01 07:47:59 +03:00
Zibi Braniecki f16141c258 Bug 1662309 - Update fluent-rs to 0.12. r=kamidphish
Differential Revision: https://phabricator.services.mozilla.com/D88942
2020-09-01 04:15:51 +00:00
Mike Hommey 98ba1e8eaf Bug 1662305 - Remove workaround for shortcomings from kaniko < 1. r=taskgraph-reviewers,aki
Older versions of kaniko didn't handle $PATH correctly in `RUN`
commands, and we worked around this by using full paths for the
executables. Now that the base image builder is upgraded to kaniko 1,
we can remove those workarounds.

Differential Revision: https://phabricator.services.mozilla.com/D88932
2020-09-01 00:35:22 +00:00
Masayuki Nakano c8894e5ea6 Bug 1658702 - part 3: Make `AutoDeleteRangesHandler::ComputeRangesToDelete()` quit without modifying the ranges when it shouldn't delete adjacent character(s) in bidi text r=m_kato
This change is corresponding to the part:
https://searchfox.org/mozilla-central/rev/73a14f1b367948faa571ed2fe5d7eb29460787c1/editor/libeditor/HTMLEditSubActionHandler.cpp#3143-3155

When caret is not adjacent the deleting character in bidi text, we may do
nothing except putting caret to the character.  So, `ComputeRangesToDelete()`
shouldn't update the caret position since the caret position will be check
by its `Run()` later if `beforeinput` event is not canceled.  For avoiding
the code duplication, this patch reimplements
`EditorBase::SetCaretBidiLevelForDeletion()` as a stack only class and
split the check and updating part from correcting the data.

Note that by the default pref, the new tests failed since it won't be
canceled, and the method still don't compute for deleting a character.

Differential Revision: https://phabricator.services.mozilla.com/D88378
2020-09-01 02:03:23 +00:00
Mark Striemer d0e57cde18 Bug 1661361 - Show print tab modal while waiting on printer data r=Jamie,pbz
Show the print dialog as soon as the content is ready, rather than after
the printer and print settings have been retrieved, then focuses the first
form element.

Differential Revision: https://phabricator.services.mozilla.com/D88355
2020-09-01 02:26:04 +00:00
Gijs Kruitbosch cfd34797bb Bug 1660277 - adjust when we save per-filetype download preferences in the helper app dialog for types handled internally, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D88695
2020-09-01 02:52:20 +00:00
Masayuki Nakano f94c0a973f Bug 1658702 - part 2: Make `AutoDeleteRangesHandler::ComputeRangesToDelete()` handle the case deleting empty ancestor(s) r=m_kato
This patch implements computation of target ranges for this part:
https://searchfox.org/mozilla-central/rev/73a14f1b367948faa571ed2fe5d7eb29460787c1/editor/libeditor/HTMLEditSubActionHandler.cpp#3099-3141

This patch adds some utility methods for computing the ranges.  Currently,
it's not yet standardized, but the other browser engines look for leaf content
of another block when blocks are joined (or a block is deleted like this case).
Therefore, we follow the behavior basically, but different from the other
browsers, we should include invisible white-spaces into the range when they
are included.  That avoids the invisible white-spaces become visible when
web apps do something instead of us.  Note that utility methods have the code,
but this patch does not use it because in this case, we just delete a empty
block ancestor, not join it with previous/next block.

Differential Revision: https://phabricator.services.mozilla.com/D88377
2020-09-01 02:02:50 +00:00
Brindusan Cristian 891f3554a7 Backed out 20 changesets (bug 1646266) for build bustages at TestBaseProfiler.cpp. CLOSED TREE
Backed out changeset e2e161965ad3 (bug 1646266)
Backed out changeset 5d8691cb0edb (bug 1646266)
Backed out changeset 119344e72ed8 (bug 1646266)
Backed out changeset da8ae4c7615c (bug 1646266)
Backed out changeset d5a7d5139d59 (bug 1646266)
Backed out changeset 1eba69baac1f (bug 1646266)
Backed out changeset 33da5fe6d185 (bug 1646266)
Backed out changeset 60a54b5d7bad (bug 1646266)
Backed out changeset 8e65fa28b768 (bug 1646266)
Backed out changeset 678a7c5d8a83 (bug 1646266)
Backed out changeset 3c1f350a07d5 (bug 1646266)
Backed out changeset d091750b1b14 (bug 1646266)
Backed out changeset de4d9ab1a6e1 (bug 1646266)
Backed out changeset 9eff1a8c358e (bug 1646266)
Backed out changeset db3bdff5e4d7 (bug 1646266)
Backed out changeset be8fd5f6d335 (bug 1646266)
Backed out changeset 220f96d1e3a2 (bug 1646266)
Backed out changeset 092c89f164ba (bug 1646266)
Backed out changeset ddec14555d7e (bug 1646266)
Backed out changeset 8c9ceb8f8dc8 (bug 1646266)
2020-09-01 05:24:52 +03:00
Gerald Squelart 7b632d04a8 Bug 1646266 - Profiler Markers 2.0 tests - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D87260
2020-09-01 01:38:49 +00:00
Gerald Squelart 3980c1d522 Bug 1646266 - {,Base}ProfilerMarkerTypes.h - r=gregtatum
This patch ports existing ProfilerMarkerPayload types to draft struct definitions that may be used with the new markers API.
This is just a starting point, they may be changed later on as needed, see meta-bug 1661394.

Differential Revision: https://phabricator.services.mozilla.com/D87259
2020-09-01 01:38:26 +00:00
Gerald Squelart 5e53131645 Bug 1646266 - {BASE_,}PROFILER_MARKER{,_TEXT} - r=gregtatum
This is the main public marker API:
- `AddMarkerToBuffer` can be used to store a marker to any buffer. This could be useful to code that wants to store markers outside of the default profiler buffers.
- `baseprofiler::AddMarker`/`profiler_add_marker` store a marker in the appropriate profiler buffer.
- BASE_PROFILER_MARKER and PROFILER_MARKER do the same, but are also defined (and empty) when MOZ_GECKO_PROFILER is not #defined.
All these take a name, marker options, a marker type, and the type's expected arguments if any (as expected by the `StreamJSONMarkerData` function).

Extra helpers for the most common types:
- BASE_PROFILER_MARKER_UNTYPED and PROFILER_MARKER_UNTYPED store a marker with no data payload.
- BASE_PROFILER_MARKER_TEXT and PROFILER_MARKER_TEXT store a text marker. `baseprofiler::markers::Text` is an example of how new marker types can be defined.

Differential Revision: https://phabricator.services.mozilla.com/D87257
2020-09-01 01:37:53 +00:00
Gerald Squelart 0e73eb1657 Bug 1646266 - AddMarkerToBuffer - r=gregtatum
Main marker serialization function, which accepts the same arguments (with implicit conversions) as the marker type's `StreamJSONMarkerData(JSONWriter&, ...)` function, and stores them in a ProfileChunkedBuffer after the marker name and options.

Differential Revision: https://phabricator.services.mozilla.com/D87255
2020-09-01 01:37:32 +00:00
Gerald Squelart 75bfba7dd8 Bug 1646266 - Marker Deserialization - r=gregtatum
`DeserializeAfterKindAndStream()` is the main function that extracts all the marker data (past the already-read entry kind), and streams it to JSON using the user-provided `Stream(JSONWriter&, ...)` function in the appropriate marker type definition.

It currently requires two external functions to stream the name and the optional backtrace, because these are different between the two profilers. This may change in the future.

(Deserialization is implemented before serialization, because the `Deserialize()` function is needed during serialization to get a marker type tag.)

Differential Revision: https://phabricator.services.mozilla.com/D87254
2020-09-01 01:37:25 +00:00
Gerald Squelart f2bb5042b4 Bug 1646266 - ProfileBufferEntryKind::Marker - r=gregtatum
A new entry kind is needed to serialize the new markers, because they are not encoded the same way.

Differential Revision: https://phabricator.services.mozilla.com/D87253
2020-09-01 01:37:23 +00:00
Gerald Squelart f3ea5dc029 Bug 1646266 - NoPayload default type, with specialized empty helper - r=gregtatum
`NoPayload` will be mostly used internally when adding markers without payload data.
It has an empty specialization of the MarkerTypeHelper (mainly to catch misuses), and the add-marker code will need to have different compile-time paths to handle it.

Differential Revision: https://phabricator.services.mozilla.com/D87252
2020-09-01 01:37:20 +00:00
Gerald Squelart 3b560590cb Bug 1646266 - MarkerType::Stream function helpers - r=gregtatum
Marker types will be defined with a simple struct that contains (amongst other things) one `StreamJSONMarkerData(JSONWriter&, ...)` function.
This patch introduces a type-traits-like helper to examine that function. This will be used to check the arguments given to the upcoming add-marker function, to serialize and deserialize them.

Differential Revision: https://phabricator.services.mozilla.com/D87251
2020-09-01 01:36:01 +00:00
Gerald Squelart 460b249d40 Bug 1646266 - Deserializers and Tags - r=gregtatum
This is similar to the existing deserializer table in ProfilerMarkerPayload.*:
Each type of marker (except the `NoPayload` one) has its corresponding deserializer in a table, and the index is used as a tag in the serialization buffer.

Differential Revision: https://phabricator.services.mozilla.com/D87250
2020-09-01 01:35:43 +00:00
Gerald Squelart f3e4e60d25 Bug 1646266 - MarkerOptions - r=gregtatum
A `MarkerOptions` must be constructed from a MarkerCategory, e.g.: `mozilla::baseprofiler::category::OTHER`. This will be required for all markers.
`MarkerOptions` also contains defaulted `MarkerThreadId`, `MarkerTiming`, `MarkerStack`, and `MarkerInnerWindowId`. They may be set by calling `WithOptions()` on the MarkerCategory, e.g.:
`PROFILER_MARKER<...>("name", OTHER.WithOptions(MarkerThreadId(otherThread), MarkerStack::Capture()), ...);`

Differential Revision: https://phabricator.services.mozilla.com/D87249
2020-09-01 01:35:21 +00:00
Gerald Squelart 1935200d9b Bug 1646266 - Marker option: MarkerInnerWindowId - r=gregtatum
This option can take an inner window id.

Differential Revision: https://phabricator.services.mozilla.com/D87248
2020-09-01 01:34:58 +00:00
Gerald Squelart 4ddaa53a92 Bug 1646266 - Marker option: MarkerStack - r=gregtatum
This marker option allows three cases:
- By default, no stacks are captured.
- The caller can request a stack capture, and the add-marker code will take care of it in the most efficient way.
- The caller can still provide an existing backtrace, for cases where a marker reports something that happened elsewhere.

Differential Revision: https://phabricator.services.mozilla.com/D87247
2020-09-01 01:34:40 +00:00
Gerald Squelart 0338f0c407 Bug 1646266 - Rework backtrace-capture functions - r=gregtatum
`profiler_capture_backtrace(ProfileChunkedBuffer&)` renamed to `profiler_capture_backtrace_into(ProfileChunkedBuffer&)` (notice "_into"), which is clearer.

New function `profiler_capture_backtrace()` creates a buffer, uses `profiler_capture_backtrace_into()`, and returns a `UniquePtr<ProfileChunkedBuffer>`, which can later be given to `MarkerStack::TakeBacktrace`.

`profiler_get_backtrace()` (returning a `UniqueProfilerBacktrace`) now uses `profiler_capture_backtrace()`.

This patch reduces most duplicate code between these functions.

Differential Revision: https://phabricator.services.mozilla.com/D88280
2020-09-01 01:34:17 +00:00
Gerald Squelart b44f966142 Bug 1646266 - ProfileChunkedBuffer::IsEmpty() and Serializer<ProfileChunkedBuffer*> - r=gregtatum
`IsEmpty()` makes it easier for users to determine if there is anything stored in the `ProfileChunkedBuffer`.

And `ProfileChunkedBuffer` can now be serialized from a raw pointer, which will be useful when adding markers with an optional stack.
Deserialization should be done to a `UniquePtr<ProfileChunkedBuffer>`, which is already implemented.

Differential Revision: https://phabricator.services.mozilla.com/D87246
2020-09-01 01:33:44 +00:00
Gerald Squelart 718ef431b3 Bug 1646266 - Marker option: MarkerTiming - r=gregtatum
This moves the existing MarkerTiming class introduced in bug 1640969 to the BaseProfilerMarkersPrerequesites.h header, and can be used as a marker option.

Some minor clarifying changes:
- `Instant()` is split into two functions: `InstantNow()` and `InstantAt(TimeStamp)`.
- `Interval(TimeStamp, TimeStamp)` must be given both start and end, otherwise `IntervalUntilNowFrom(TimeStamp)` takes the start only and ends "now".

Also the default construction is now reserved for internal marker usage, the private member function `IsUnspecified()` will be used by the add-marker code will replace it with `InstantNow()`.

The serialization contains the phase, and only one or two timestamps as needed, to save space for non-interval timings.

Differential Revision: https://phabricator.services.mozilla.com/D87245
2020-09-01 01:33:26 +00:00
Gerald Squelart bd1aaa5796 Bug 1646266 - Marker option: MarkerThreadId - r=gregtatum
This marker option captures a given thread id.
If left unspecified (by default construction) during the add-marker call, the current thread id will be used then.

Differential Revision: https://phabricator.services.mozilla.com/D87244
2020-09-01 01:32:53 +00:00
Gerald Squelart f1e3a40788 Bug 1646266 - Marker option: MarkerCategory - r=gregtatum
The main, and only compulsory, marker option is the `MarkerCategory`, which captures the "category pair", as well as the parent category.

Differential Revision: https://phabricator.services.mozilla.com/D88154
2020-09-01 01:32:35 +00:00
Gerald Squelart 56dc2f7c14 Bug 1646266 - CorePS buffer access - r=gregtatum
The upcoming profiler-specific add-marker function will need to know which `ProfileChunkedBuffer` to serialize to, `profiler_get_core_buffer()` give access to the profiler's buffer, and `CachedCoreBuffer()` keeps it stored in a function-static object.

Differential Revision: https://phabricator.services.mozilla.com/D87256
2020-09-01 01:32:13 +00:00
Gerald Squelart 80e6ec3baf Bug 1646266 - ProfilerString{,8,16}View - r=gregtatum
These string views are similar to `std::string_view`, but they are optimized to be serialized in the profiler buffer, and later deserialized and streamed to JSON.
They accept literal strings, and keep them as unowned raw pointers and sizes.
They also accept any substring reference, assuming that they will only be used as parameters during function calls, and therefore the dependent string will live during that call where these `StringView`'s are used.

Internally, they also allow optional string ownership, which is only used during deserialization and streaming.
This is hidden, so that users are not tempted to use potentially expensive string allocations during profiling; it's only used *after* profiling, so it's less of an impact to allocate strings then. (But it could still be optimized later on, as part of bug 1577656.)

Differential Revision: https://phabricator.services.mozilla.com/D87242
2020-09-01 01:31:45 +00:00
Gerald Squelart 5dd7e84aa2 Bug 1646266 - ProfilerMarkers skeleton files - r=gregtatum
This patch introduces all new files that contain the new markers C++ API and implementation.
They are mostly empty at this time, only including each other as eventually needed, and with `#ifdef MOZ_GECKO_PROFILER` guards.

Rough inclusion diagram: (header <-- includer)

    BaseProfilerMarkerPrerequesites.h <-- ProfilerMarkerPrerequesites.h  (Useful types: Input string view, marker options)
                  ^                                    ^
       BaseProfilerMarkerDetail.h     <--    ProfilerMarkerDetail.h      (Implementation details)
                  ^                                    ^
         BaseProfilerMarkers.h        <--      ProfilerMarkers.h         (Main API)
                  ^      ^---------                    ^   ^---------
       BaseProfilerMarkerTypes.h  |   <--    ProfilerMarkerTypes.h   |   (Common marker types)
                  ^         BaseProfiler.h        <--         GeckoProfiler.h  (Existing main profiler headers)

Differential Revision: https://phabricator.services.mozilla.com/D87241
2020-09-01 01:31:17 +00:00
Alphan Chen 500f5e4d7c Bug 1585074 - Audit usage of nsIDocShellTreeItem in PendingFullscreenChangeList::Iterator::Iterator r=smaug,nika,xidorn
Differential Revision: https://phabricator.services.mozilla.com/D85988
2020-09-01 01:48:06 +00:00
Daisuke Akatsuka a16d25d9f6 Bug 1659589: Remove error event listener that set to stylesheet actor. r=ochameau
Depends on D87047

Differential Revision: https://phabricator.services.mozilla.com/D88531
2020-09-01 01:44:28 +00:00
Daisuke Akatsuka b9e65b07d6 Bug 1659589: Implement update method in stylesheets actor. r=ochameau,devtools-backward-compat-reviewers
Depends on D87046

Differential Revision: https://phabricator.services.mozilla.com/D87047
2020-08-28 06:27:53 +00:00
Daisuke Akatsuka e9b12ccb1d Bug 1659589: Implement getText in stylesheets actor. r=ochameau,devtools-backward-compat-reviewers
Depends on D87044

Differential Revision: https://phabricator.services.mozilla.com/D87045
2020-08-28 06:07:33 +00:00
Daisuke Akatsuka f8c36ace27 Bug 1659589: Implement toggleDisabled in stylesheets actor. r=ochameau,devtools-backward-compat-reviewers
Depends on D87043

Differential Revision: https://phabricator.services.mozilla.com/D87044
2020-08-20 08:27:47 +00:00
Narcis Beleuzu 6d1bdc6124 Backed out 20 changesets (bug 1646266) for bustages on TestBaseProfiler.cpp . CLOSED TREE
Backed out changeset 0871a6eb61bb (bug 1646266)
Backed out changeset c797da0d5b1b (bug 1646266)
Backed out changeset 5e8954913748 (bug 1646266)
Backed out changeset 9bc0276c9260 (bug 1646266)
Backed out changeset fa6a89f9eba2 (bug 1646266)
Backed out changeset 9a1cd7b6c1ca (bug 1646266)
Backed out changeset d193a9f84702 (bug 1646266)
Backed out changeset ecfc47fc2444 (bug 1646266)
Backed out changeset 7ecc9ee961b6 (bug 1646266)
Backed out changeset e482a2568f27 (bug 1646266)
Backed out changeset 1a17cf6e6b4d (bug 1646266)
Backed out changeset 08dd6220f0dd (bug 1646266)
Backed out changeset 4189499ea599 (bug 1646266)
Backed out changeset df82ad015f84 (bug 1646266)
Backed out changeset 1c1501cfa02b (bug 1646266)
Backed out changeset 9001175e7475 (bug 1646266)
Backed out changeset c25cdf173894 (bug 1646266)
Backed out changeset e01bc772d669 (bug 1646266)
Backed out changeset 35166588a684 (bug 1646266)
Backed out changeset f05f6a52bd7e (bug 1646266)
2020-09-01 03:31:28 +03:00
Kartikaya Gupta 714241d600 Bug 1661897 - Add a test. r=botond
The new promiseMouseDragEvent function is an async promise-returning copy of
the code in dragVerticalScrollbar. Eventually we should just make all this code
using async/promise but that's for another day.

Differential Revision: https://phabricator.services.mozilla.com/D88894
2020-09-01 00:05:31 +00:00
Kartikaya Gupta 447dd12c94 Bug 1661897 - Acknowledge pending visual scroll updates for any RSF. r=botond
We set pending visual scroll updates even for RSFs that are on subdocuments,
so we should ensure they get acknowledged and cleared on paints. Otherwise
the pending visual scroll update can get "stuck" and it affects things that
depend on it, such as the drag-selection code.

Differential Revision: https://phabricator.services.mozilla.com/D88893
2020-08-31 20:34:34 +00:00
Emma Malysz 70acdd65af Bug 1662145, make form interactable when switching to page range all and fix page count for invalid ranges r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D88879
2020-08-31 23:48:15 +00:00
Gerald Squelart 12fefb1ee0 Bug 1646266 - Profiler Markers 2.0 tests - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D87260
2020-08-31 23:36:11 +00:00
Gerald Squelart c626d815bc Bug 1646266 - {,Base}ProfilerMarkerTypes.h - r=gregtatum
This patch ports existing ProfilerMarkerPayload types to draft struct definitions that may be used with the new markers API.
This is just a starting point, they may be changed later on as needed, see meta-bug 1661394.

Differential Revision: https://phabricator.services.mozilla.com/D87259
2020-08-31 23:35:05 +00:00
Gerald Squelart 680bd83298 Bug 1646266 - {BASE_,}PROFILER_MARKER{,_TEXT} - r=gregtatum
This is the main public marker API:
- `AddMarkerToBuffer` can be used to store a marker to any buffer. This could be useful to code that wants to store markers outside of the default profiler buffers.
- `baseprofiler::AddMarker`/`profiler_add_marker` store a marker in the appropriate profiler buffer.
- BASE_PROFILER_MARKER and PROFILER_MARKER do the same, but are also defined (and empty) when MOZ_GECKO_PROFILER is not #defined.
All these take a name, marker options, a marker type, and the type's expected arguments if any (as expected by the `StreamJSONMarkerData` function).

Extra helpers for the most common types:
- BASE_PROFILER_MARKER_UNTYPED and PROFILER_MARKER_UNTYPED store a marker with no data payload.
- BASE_PROFILER_MARKER_TEXT and PROFILER_MARKER_TEXT store a text marker. `baseprofiler::markers::Text` is an example of how new marker types can be defined.

Differential Revision: https://phabricator.services.mozilla.com/D87257
2020-08-31 23:34:33 +00:00
Gerald Squelart 8b8b5cd070 Bug 1646266 - AddMarkerToBuffer - r=gregtatum
Main marker serialization function, which accepts the same arguments (with implicit conversions) as the marker type's `StreamJSONMarkerData(JSONWriter&, ...)` function, and stores them in a ProfileChunkedBuffer after the marker name and options.

Differential Revision: https://phabricator.services.mozilla.com/D87255
2020-08-31 23:34:11 +00:00
Gerald Squelart 8d3604614a Bug 1646266 - Marker Deserialization - r=gregtatum
`DeserializeAfterKindAndStream()` is the main function that extracts all the marker data (past the already-read entry kind), and streams it to JSON using the user-provided `Stream(JSONWriter&, ...)` function in the appropriate marker type definition.

It currently requires two external functions to stream the name and the optional backtrace, because these are different between the two profilers. This may change in the future.

(Deserialization is implemented before serialization, because the `Deserialize()` function is needed during serialization to get a marker type tag.)

Differential Revision: https://phabricator.services.mozilla.com/D87254
2020-08-31 23:33:53 +00:00
Gerald Squelart a6a68c6141 Bug 1646266 - ProfileBufferEntryKind::Marker - r=gregtatum
A new entry kind is needed to serialize the new markers, because they are not encoded the same way.

Differential Revision: https://phabricator.services.mozilla.com/D87253
2020-08-31 23:33:25 +00:00
Gerald Squelart 95eb9ec051 Bug 1646266 - NoPayload default type, with specialized empty helper - r=gregtatum
`NoPayload` will be mostly used internally when adding markers without payload data.
It has an empty specialization of the MarkerTypeHelper (mainly to catch misuses), and the add-marker code will need to have different compile-time paths to handle it.

Differential Revision: https://phabricator.services.mozilla.com/D87252
2020-08-31 23:33:07 +00:00
Gerald Squelart 54c35aa7f1 Bug 1646266 - MarkerType::Stream function helpers - r=gregtatum
Marker types will be defined with a simple struct that contains (amongst other things) one `StreamJSONMarkerData(JSONWriter&, ...)` function.
This patch introduces a type-traits-like helper to examine that function. This will be used to check the arguments given to the upcoming add-marker function, to serialize and deserialize them.

Differential Revision: https://phabricator.services.mozilla.com/D87251
2020-08-31 23:32:39 +00:00
Gerald Squelart 3ef4a84159 Bug 1646266 - Deserializers and Tags - r=gregtatum
This is similar to the existing deserializer table in ProfilerMarkerPayload.*:
Each type of marker (except the `NoPayload` one) has its corresponding deserializer in a table, and the index is used as a tag in the serialization buffer.

Differential Revision: https://phabricator.services.mozilla.com/D87250
2020-08-31 23:32:22 +00:00
Gerald Squelart d0d7950fb3 Bug 1646266 - MarkerOptions - r=gregtatum
A `MarkerOptions` must be constructed from a MarkerCategory, e.g.: `mozilla::baseprofiler::category::OTHER`. This will be required for all markers.
`MarkerOptions` also contains defaulted `MarkerThreadId`, `MarkerTiming`, `MarkerStack`, and `MarkerInnerWindowId`. They may be set by calling `WithOptions()` on the MarkerCategory, e.g.:
`PROFILER_MARKER<...>("name", OTHER.WithOptions(MarkerThreadId(otherThread), MarkerStack::Capture()), ...);`

Differential Revision: https://phabricator.services.mozilla.com/D87249
2020-08-31 23:31:59 +00:00
Gerald Squelart fd497a7bf1 Bug 1646266 - Marker option: MarkerInnerWindowId - r=gregtatum
This option can take an inner window id.

Differential Revision: https://phabricator.services.mozilla.com/D87248
2020-08-31 23:31:36 +00:00
Gerald Squelart aee45f966e Bug 1646266 - Marker option: MarkerStack - r=gregtatum
This marker option allows three cases:
- By default, no stacks are captured.
- The caller can request a stack capture, and the add-marker code will take care of it in the most efficient way.
- The caller can still provide an existing backtrace, for cases where a marker reports something that happened elsewhere.

Differential Revision: https://phabricator.services.mozilla.com/D87247
2020-08-31 23:31:18 +00:00
Gerald Squelart 71abce20e5 Bug 1646266 - Rework backtrace-capture functions - r=gregtatum
`profiler_capture_backtrace(ProfileChunkedBuffer&)` renamed to `profiler_capture_backtrace_into(ProfileChunkedBuffer&)` (notice "_into"), which is clearer.

New function `profiler_capture_backtrace()` creates a buffer, uses `profiler_capture_backtrace_into()`, and returns a `UniquePtr<ProfileChunkedBuffer>`, which can later be given to `MarkerStack::TakeBacktrace`.

`profiler_get_backtrace()` (returning a `UniqueProfilerBacktrace`) now uses `profiler_capture_backtrace()`.

This patch reduces most duplicate code between these functions.

Differential Revision: https://phabricator.services.mozilla.com/D88280
2020-08-31 23:30:53 +00:00