Avoid unregistering the JS Process actor ASAP on DevTools closing
as it may throw many exception if any RDP Request or JSProcess Actor
query is still pending after the devtools closing.
It required some tweaks in the parent process as WatcherActor.conn
may now be null because of shifted executions and we weren't correctly
unregistering it because of lack of `connectionPrefix`.
As well as some tweaks around `sharedData` to force persisting it across
processes, otherwise the content process may still hold now destroyed
watcher actor sessionData and keep instantiating actor.
Last, but not least, because there is some shift in precise execution
timings, I had to tweak docshell DOM event listeners as we may leave
listeners on docshell's window object when the cleanup method
is call after the docshell starts being destroyed and docshell.domWindow
is already null.
Differential Revision: https://phabricator.services.mozilla.com/D306953
Picking a switch-to-tab result switches to the target tab and closes the emptied
one from UrlbarInput's pick handling; over the actor message path that runs after
the synthesized keys return, so the test raced it by reading the tab count
synchronously. Await the switch before asserting.
Differential Revision: https://phabricator.services.mozilla.com/D310449
`_setValue` is now part of the controller's actor-facing surface: on the message
path a parent-side provider hook reaches it through `controller.input`, which
forwards to the real input as an `InvokeContentAction` message. The underscore
"internal, don't call from outside" convention no longer fits, so drop it.
Pure mechanical rename of the method on `UrlbarInput`/`SmartbarInput` and every
caller (`UrlbarProviderAutofill`, the test utils and tests), plus the message-
path `InputProxy` forwarder and its allowed-method set.
Differential Revision: https://phabricator.services.mozilla.com/D310364
The onboarding result's search mode was confirmed by the provider's
onEngagement, which reached the input through the picked result's DOM element
(element.documentGlobal.gURLBar). That element doesn't cross the actor boundary,
so the confirmation never ran over the message path and the content-side
searchMode stayed null.
Confirm it in UrlbarInput's pick handling instead -- next to the record() call
in the DYNAMIC branch, gated on providesSearchMode, mirroring the
RESULT_TYPE.SEARCH branch that already confirms its search mode there. It runs
against the live input, so there's no round-trip and no dependence on the DOM
element crossing the boundary; the provider's onEngagement is dropped.
Behavior-neutral on the direct path: same confirmation call, same Glean events
(verified against the urlbar.searchmode telemetry).
Differential Revision: https://phabricator.services.mozilla.com/D311027
Provider `onEngagement` hooks run parent-side (in `UrlbarProvidersManager`, from
the parent controller). On the actor message path the parent controller has no
child, so `controller.input`/`controller.view` are undefined and `details.element`
is dropped on the wire, breaking the hooks that reach them (`GlobalActions`,
`Autofill`, `ActionsSearchMode`, `Calculator`, `ContextualSearch`,
`UnitConversion`).
Resolve the element reads from data that survives the wire: `GlobalActions` reads
the picked action key from `details.pickedActionKey` (resolved content-side by
the telemetry snapshot); `QuickActions`' `pickAction` and `ActionsSearchMode`
take the action key and input length from the result payload instead of the
picked element, and `ActionsSearchMode` recomputes the disabled state from the
action; `UnitConversion` copies its conversion output from the result payload
instead of the picked element's text.
Route the input/view side effects to the content side: the parent-side
`UrlbarChildControllerProxy` exposes `input`/`view` stand-ins whose allowed
methods (`search`, `_setValue`, `startQuery`, `close`, `startTail150`) forward to
the real content objects as an `InvokeContentAction` message, so providers keep
calling `controller.input.X()`/`controller.view.X()` unchanged. `ContextualSearch`
passes the engine's name and aliases (all `search()` reads) as a plain object so
it stays structured-cloneable.
`this.input` is now a forwarding stand-in on the message path, so the
`receiveResults` first-result guard checks for the `onFirstResult` method rather
than mere truthiness (it only runs on the in-process input; the content side runs
`onFirstResult` itself).
The underscore-prefixed `UrlbarInput._setValue` is forwarded as-is here; a
follow-up renames it to `setValue` now that it's part of the actor-facing
surface.
`browser_glean_telemetry_reenter.js` exercises a provider `onEngagement` that
blurs the input. On the message path the hook fires only after the pick's
engagement has been recorded and its session cleared, so the blur's abandonment
record is a no-op rather than the synchronous `record()` re-entry the direct path
sees; the re-entry assertion is gated to the direct path. Both paths still record
exactly one engagement and no abandonment.
The default in-process path is unaffected.
Differential Revision: https://phabricator.services.mozilla.com/D310360
The test expects the number of registered script sources to stay the
same across a profiler disable/enable cycle. On sm-compacting builds a
zeal GC can run between the two enableGeckoProfiling calls and discard
the JitScripts of scripts that are no longer on the stack (prologue.js
and self-hosted), so their sources don't get re-registered on the second
enable and the counts no longer match. Disable GC zeal at the start of
the test to keep it deterministic.
Differential Revision: https://phabricator.services.mozilla.com/D312038
Adds a third "small" size to the Nova Focus Timer widget on New Tab, alongside
the existing medium and large sizes. Small is a compact, vertically centered
layout matching the Figma design: a progress ring with the play/pause control,
a single editable duration row when idle, and just the ring plus remaining time
while running or paused. It has no manual Focus/Break toggle (the timer
auto-cycles) and no reset control; the completion celebration reuses the shared
animation but shows only the headline.
The classic (non-Nova) layout is untouched.
Differential Revision: https://phabricator.services.mozilla.com/D309283
This renames count that was previously only used to check for background
sweeping to something more generic, and increments/decrements it appropriately
when concurrent marking is running. The effect is that we need to take the lock
when marking large buffers concurrently.
Differential Revision: https://phabricator.services.mozilla.com/D311026
Currently this can race on kind_ being updated. It's simplest to trace all the
fields as the ones used for different kinds do not overlap.
Differential Revision: https://phabricator.services.mozilla.com/D311025
This function was updated to make the intial read atomic but it can still read
the edge target later when checking whether the target was moved.
Differential Revision: https://phabricator.services.mozilla.com/D311022
JSObject::zone() read's the object's shape and then gets the zone from its
chunk (because it's unconditional and works regardless of whether the object is
in the nursery). We want to avoid the shape read here though and we know the
object will always be tenured.
Differential Revision: https://phabricator.services.mozilla.com/D311021
These don't have GC lifetime so HeapPtr is the natural choice. However the
chosen cut point is to make writes to GCPtrs atomic and leave HeapPtr alone. As
these are part of the core datastructures that will be traced concurrently we
do need to make these writes atomic though.
We can make these into GCPtrs as long as we manually trigger the post barrier
by clearing them before they are freed outside of GC.
Differential Revision: https://phabricator.services.mozilla.com/D311019
This adds a separate lock to IonScript and uses it for mutual exclusion between
tracing and updating its state. This does mean that tracing a JitScript can
take two separate locks however.
It's tempting to try and make this use the same lock as the ICScript (probalby
moving it to the JitScript) but it's not always convient to get to either of
those when you need it. What do you think - I can try and combine them if you
think that would be better?
Differential Revision: https://phabricator.services.mozilla.com/D311018
TSAN doesn't like the current attempt to more relaxed memory ordering here. I
wasn't able to pinpoint exactly why but it's unlikely to make much difference
so we can go with a slightly stronger ordering here. This also simplifies this
code which is a good thing.
Differential Revision: https://phabricator.services.mozilla.com/D311014
This updates GCStructPtr in line with the other barrier wrappers (e.g.
GCBuffer).
This wrapper will be removed eventaully when everything is migrated
to buffer allocator buffers but in the mean time this silences some warnings in
TSAN builds.
Differential Revision: https://phabricator.services.mozilla.com/D311013
This can be read by concurrent marking, which skips marking in chunks that are
allocated during collection. This is only ever written on the main thread so
it's not possible that this ends up with the wrong value. There is a separate
flag stolenFromSweepList that ensures stolen chunks get their mark bits cleared
after concurrent marking has finished, so it's not a problem if concurrent
marking marks some buffers before noticing that this flag has changed.
Differential Revision: https://phabricator.services.mozilla.com/D311012
When stock data cannot be loaded, the widget now shows a "Stock data is not
available." message instead of sitting on loading placeholders. It retries once
in the background about a minute later and recovers on its own if that attempt
succeeds. Showing the error records a widgets_error telemetry event (error_type
"load_error"), and the message text is a new localizable string.
Differential Revision: https://phabricator.services.mozilla.com/D311484
The subview chevron (the subviewbutton-nav class) is only added to view
widgets created with SOURCE_BUILTIN. The Developer button is created by
devtools through CustomizableUI.createWidget(), which always marked widgets
as SOURCE_EXTERNAL, so it never got the indicator in the overflow menu even
though it opens a subview.
Add an optional source argument to the public and internal createWidget()
(defaulting to SOURCE_EXTERNAL so existing callers are unaffected), and have
DevToolsStartup create the Developer button with SOURCE_BUILTIN.
Differential Revision: https://phabricator.services.mozilla.com/D311830
Objdir entries in `OBJDIR_FILES` and `FINAL_TARGET_FILES` were installed with
`nsinstall`, which forces a fixed mode and installs only by basename, so it
drops the executable bit and cannot rename. Add a
`(source, target_basename)` tuple form to the `*_FILES` lists and install
those entries with a new `install_objdir_file` action that copies the file
preserving its mode, renaming to `target_basename`. Generated headers
under `dist/include` are the exception and keep the `nsinstall` bulk export,
where a fixed mode is fine.
This is the same rename that `RenamedSourcePath` already performed
internally for jar manifests, now expressible from `moz.build` and
supported by the RecursiveMake backend.
Differential Revision: https://phabricator.services.mozilla.com/D303698
With media.webrtc.hw.h264.enabled off (the desktop default), WebRTC prefers the
software H.264 decoder. That works when software decode is available, but since
bug 2044499 made codec support reporting accurate, platforms where H.264 is
hardware-only (e.g. the Windows GPU process) have no software decoder to use.
This leaves an empty support set if the pref is set to false, causing
the OpenH264 fallback path to be used which currently has compatibility issues.
Differential Revision: https://phabricator.services.mozilla.com/D310224
D308122 regressed the height of the preonboarding splash screen because the `height` in `content.screen_style` was moved to affect the <main> screen rather than the section-main component. This patch reverts that specific change but still ensures that the asrouter-newtab-multistage wrapper height can be customized in order to keep the flexible height of that newtab message type.
Differential Revision: https://phabricator.services.mozilla.com/D311142