Commit Graph

724637 Commits

Author SHA1 Message Date
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
Gerald Squelart
ff5ebd5a6f 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-08-31 23:30:28 +00:00
Gerald Squelart
8670e62694 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-08-31 23:30:17 +00:00
Gerald Squelart
c2665d4e9d 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-08-31 23:30:12 +00:00
Gerald Squelart
959178815b 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-08-31 23:30:07 +00:00
Gerald Squelart
8ff41618d2 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-08-31 23:28:56 +00:00
Gerald Squelart
4e9b0b4d1f 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-08-31 23:28:22 +00:00
Gerald Squelart
3cb4ee0995 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-08-31 23:27:54 +00:00
Tooru Fujisawa
6eecdba324 Bug 1662140 - Add javascript.options.off_thread_parse_global pref and --no-off-thread-parse-global shell option. r=tcampbell
This adds the preference, JS shell option, and {ContextOptions,CompileOptions} fields,
but the value isn't read and the code always acts as it's set to true.

Differential Revision: https://phabricator.services.mozilla.com/D88922
2020-08-31 23:32:14 +00:00
Narcis Beleuzu
a7cd806311 Backed out 2 changesets (bug 1659530, bug 1657476) for bustages on check.svg. CLOSED TREE
Backed out changeset 761a09f4d153 (bug 1659530)
Backed out changeset c8afdd9434bb (bug 1657476)
2020-09-01 02:30:36 +03:00
Narcis Beleuzu
5777c93648 Backed out changeset 84e7233d29a6 (bug 1638422) for xpcshell failures on test_ext_webRequest_responseBody.js . CLOSED TREE 2020-09-01 02:23:00 +03:00
Shane Caraveo
6f359e0bea Bug 1659530 skip 3rd party panel when installing recommended addons r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D87326
2020-08-31 21:38:13 +00:00
Shane Caraveo
fb21940df8 Bug 1657476 support multiple recommendation badges r=fluent-reviewers,rpl,flod
Differential Revision: https://phabricator.services.mozilla.com/D86124
2020-08-31 21:35:58 +00:00
Ricky Stewart
f339ca9f42 Bug 1660831 - Reference the standalone bootstrap.py script in windows_build.rst and prefer mozilla-unified to mozilla-central where relevant r=mhentges,froydnj
Today the docs tell you to directly clone `mozilla-central`, which is a weird departure from what we do in the other per-platform documents for no real reason. Instead, reference the standalone `bootstrap.py` script as we do for Linux and macOS.

Also, do a little scan and replace references to `mozilla-central` with `mozilla-unified` where appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D88051
2020-08-31 17:51:14 +00:00
Ryan VanderMeulen
d912656d9c Bug 1662118 - Update pdf.js to version 2.6.336. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D88856
2020-08-31 21:59:19 +00:00
Robert Helmer
2107e42238 Bug 1661803 - ensure default study is installed before unlocking studies r=fluent-reviewers,flod,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D88669
2020-08-31 21:55:11 +00:00
Shane Caraveo
5c31932e0a Bug 1638422 test multipart responses with filterResposeData r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D85638
2020-08-27 01:41:33 +00:00
Erik Nordin
a35b29686a Bug 1661993 - Use PWG Standardized paper names for GTK r=sfoster
This patch ensures that our fallback paper list (used for print saving
as PDF) will use PWG standardized names for the paper sizes for GTK
print settings.

Differential Revision: https://phabricator.services.mozilla.com/D88736
2020-08-31 21:03:36 +00:00
manas
7268313809 Bug 1660818 - Add telemetry to track the number of times the scrollable badge is clicked. r=gl
Differential Revision: https://phabricator.services.mozilla.com/D88049
2020-08-31 21:21:29 +00:00
Jed Davis
7bf48bbf12 Bug 1660901 - Add some test cases for fstatat inside the content sandbox. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D88500
2020-08-28 09:33:53 +00:00
Jed Davis
08c45b9f68 Bug 1660901 - Support the fstat-like subset of fstatat in the Linux sandbox policies. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D88499
2020-08-28 09:23:58 +00:00
Henrik Skupin
271c9183fa Bug 1661495 - [marionette] Reset content browsing context if new chrome window is not a browser window. r=marionette-reviewers,maja_zf
Fixes a regression from bug 1661495, which missed to reset the
current content browsing context if the new chrome window isn't
a browser window.

Depends on D88827

Differential Revision: https://phabricator.services.mozilla.com/D88900
2020-08-31 20:23:43 +00:00
Henrik Skupin
509137452c Bug 1661495 - [marionette] Update content browsing context for remoteness changes. r=marionette-reviewers,maja_zf
If a navigation in the current browser causes a remoteness change,
the current content browsing context needs to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D88827
2020-08-31 19:57:04 +00:00
Henrik Skupin
4a2822310c Bug 1661495 - [marionette] Don't always set the current content browsing context when registering a new browser. r=marionette-reviewers,maja_zf
Since the patch on bug 1652932 landed in Firefox 80 we always
update the current content browsing context and that now only
when switching to a new window. That leads to an unexpected
change of the current window handle, and as such breaks tests.

Differential Revision: https://phabricator.services.mozilla.com/D88771
2020-08-31 19:56:40 +00:00
Narcis Beleuzu
7a6bc811fb Backed out changeset 39ee74362843 (bug 1643448) for failures on test_presentation_sender_on_terminate_request.html. CLOSED TREE 2020-09-01 00:37:23 +03:00
Narcis Beleuzu
390c295af2 Backed out changeset 0f0b1fa85339 (bug 1662124) for morchitest failures on test_bug1080361.html . CLOSED TREE 2020-09-01 00:07:28 +03:00
Ted Campbell
d10b7e7d13 Bug 1662127 - Add ParseTask::runtime field. r=djvj
Instead of relying on the parseGlobal to determine the runtime, store it
directly.

Differential Revision: https://phabricator.services.mozilla.com/D88862
2020-08-31 21:07:49 +00:00
Ted Campbell
50fc073890 Bug 1662127 - Avoid needing active Realm for ScriptSource initialization. r=djvj
The SharedImmutableStrings cache is not tied to gc::Zone so use the JSRuntime
directly from the JSContext instead.

Differential Revision: https://phabricator.services.mozilla.com/D88861
2020-08-31 20:51:30 +00:00
Ted Campbell
63fd40e9dd Bug 1662127 - Remove AutoKeepAtoms argument from TokenStream. r=djvj
After Bug 1660798, the TokenStreamPosition no longer uses JSAtoms and the
AutoKeepAtoms argument is not needed.

Differential Revision: https://phabricator.services.mozilla.com/D88860
2020-08-31 20:52:46 +00:00
Micah Tigley
64abc77bc3 Bug 1661776 - Prevent pasting invalid input into ScaleInput UI. r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D88670
2020-08-31 20:50:43 +00:00
Ted Campbell
20f76e64bf Bug 1662113 - The dumpStencil shell function must emplace top stencil. r=arai
Since the `dumpStencil` duplicates part of the BytecodeCompiler code, we must
explicitly instantiate the top-level stencil before parse is run. Also add a
test case for this.

Differential Revision: https://phabricator.services.mozilla.com/D88898
2020-08-31 20:30:33 +00:00
Emma Malysz
b7a61a4533 Bug 1661374, save default printer name and allow user to open system dialog when saving to pdf is selected r=jwatt,mstriemer
If "save to pdf" is the only printer option, we will hide the system dialog, except on mac
that supports saving to PDF in the native dialog.

Differential Revision: https://phabricator.services.mozilla.com/D88362
2020-08-31 20:08:47 +00:00
Emilio Cobos Álvarez
28231ea1e1 Bug 1662204 - Prevent all printed documents, not just print preview, from getting a regular non-print presentation. r=jwatt
Before bug 1636728 this couldn't happen because print documents weren't
hosted in an <browser>. The presentation of documents that are being
printed should be managed by the print job.

We should, in fact, probably just make mDocument->IsStaticDocument() the
condition, or such.

Differential Revision: https://phabricator.services.mozilla.com/D88901
2020-08-31 20:16:11 +00:00
David Major
1c9486e139 Bug 1660340 - Switch builds to clang 11.0.0 rc2 r=froydnj
This changes most of our automation builds to clang 11.0.0 rc2.

Not included:
* code coverage builds, per bug 1660341
* mingw builds, which have traditionally been on their own update cadence, and in this case are blocked anyway by bug 1658632

This will leave some unused clang-9 task definitions. I intend to clean them up, but at a later date. For now I want to focus on making sure this update sticks, since patches like this have a tendency to bounce.

Differential Revision: https://phabricator.services.mozilla.com/D88313
2020-08-29 10:13:28 +00:00
David Major
46d1d82652 Bug 1660896 - Adjust test expectations for editing WPT on Linux debug r=jgraham
A few test cases fail under clang-11 on Linux debug builds only. As described in the bug, we unfortunately don't have the bandwidth to investigate, so this patch accepts the failures.

Differential Revision: https://phabricator.services.mozilla.com/D88363
2020-08-28 20:38:47 +00:00
David Major
1b886dfdf3 Bug 1641674 - Don't use --gc-sections during profile generation r=froydnj
For not-well-understood reasons, ld's `--gc-sections` discards a large number of the PGO bookkeeping structures that enable us to keep track of function counters, and the effect gets worse in object files generated by clang-10.

As much as I'd like to understand this better, the investigations take way too much time. As a path of least resistance, we can disable `--gc-sections` for the instrumentation phase of PGO builds. It won't harm anything since users never see those builds, and it will improve the performance of the optimized phase greatly.

Differential Revision: https://phabricator.services.mozilla.com/D78112
2020-08-28 20:38:45 +00:00
Lee Salzman
16b168d133 Bug 1661427 - Allow SWGL SwCompositor to split up compositing work between SwComposite and render threads. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D88392
2020-08-31 18:26:20 +00:00
Edgar Chen
259f4671dd Bug 1662124 - element.setPointerCapture should throw NotFoundError if the pointer id is invalid; r=smaug
https://github.com/w3c/pointerevents/issues/256

Differential Revision: https://phabricator.services.mozilla.com/D88859
2020-08-31 19:10:23 +00:00
Emma Malysz
defa918a51 Bug 1661618, update shortcut in app menu and toolbar tip for the toolbarbutton r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D88521
2020-08-31 19:14:11 +00:00
Luca Greco
bdd2a97960 Bug 1661860 - RemoteWorkerManager should transmit blobs and permissions when spawning any remote worker type. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D88884
2020-08-31 17:47:38 +00:00
Jeff Gilbert
5ebfd8fd7e Bug 1662214 - Add docstring for HoldJSObjects. r=mccr8 DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D88891
2020-08-31 19:01:45 +00:00
Kris Maglione
b050c2c657 Bug 1650257: Part 3 - Remove obsolete diagnostic crash annotations and assertions. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87487
2020-08-31 18:51:54 +00:00
Kris Maglione
c2c6945169 Bug 1650257: Part 2 - Abort SetNewDocument() if ancestors are discarded/cached. r=nika,smaug,sg
Differential Revision: https://phabricator.services.mozilla.com/D87486
2020-08-31 18:51:56 +00:00
Kris Maglione
5f2d674982 Bug 1650257: Part 1 - Stop discarding BCs from the parent on WindowGlobal destruction. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87485
2020-08-31 18:51:45 +00:00
Narcis Beleuzu
d70f39e819 Backed out 2 changesets (bug 1661495) as req by whimboo . CLOSED TREE
Backed out changeset c5cdfb592493 (bug 1661495)
Backed out changeset 46f9aa946264 (bug 1661495)
2020-08-31 21:47:32 +03:00