This patch attempts to record the reason why we fall back to DNS.
I considered using categorical probes for this, but they have a max limit of
20 categories, so we have to use a linear probe. I chose 50 buckets to allow
us to add more failure reasons in the future.
The recorded values are defined in nsHostRecord::TRRSkippedReason.
nsHostRecord::RecordReason is called whenever we encounter a condition that
will cause us to skip TRR in nsHostResolver.
For failures that occur inside TRR.cpp, each TRR object holds its own reason
that is recorded in a similar way. When all TRR requests are complete we
report the one that failed (or if both failed we report the one for the A
request).
Due to the fact that we might also follow CNAME requests, and the final
TRR request might not be the one that was issued at first, TRR requests
must pass back the reason as an argument to CompleteLookup.
Finally, this patch records the reason in two probes:
TRR_SKIP_REASON_TRR_FIRST - only reported in TRR-first mode
TRR_SKIP_REASON_DNS_WORKED - only reported in TRR-first mode when the
fallback DNS request succeeded. This allows us to filter for complete
network failures.
Differential Revision: https://phabricator.services.mozilla.com/D82168
- Add macOS-specific function to retrieve the paper list for a given printer.
- Add JS test to ensure papers are initialized with valid values.
Differential Revision: https://phabricator.services.mozilla.com/D82598
This fixes two issue.
First, the code shouldn't be dispatching these events every time it gets a new
Print or PrintPreview call. It only needs to dispatch the events to the
original document that we're going to clone from. When cloning from existing
static clones any changes made by 'beforeprint' will be present in the existing
static clone.
Second, the code tries to delay the 'afterprint' event until after
mozPrintCallback callbacks have been invoked, but those callbacks are invoked
in the cloned document, whereas the events are sent to the original document!
So there is no reason to do this.
Differential Revision: https://phabricator.services.mozilla.com/D34280
This also only updates per-category block information in the protections panel
while it's open or when it's about to be shown. To do this, the patch:
1. changes the `categoryItem` getter on all blockers to avoid memo'izing null when the popup is unavailable;
2. changes the `updateCategoryItem` method on all blockers to deal with `categoryItem` being null;
3. stops calling `updateCategoryItem` from the blockers' `init` method, instead delegating this responsibility
to gProtectionsHandler doing so when the popup first becomes available. Note that we still need (2) because
pref changes can trip us calling into `updateCategoryItem` anyway. We cannot avoid instantiating the pref
getters because they are relied on by some of the `isDetected` and `isBlocking` implementations.
4. reorganizes `onContentBlockingEvent` so it updates the icon, reports telemetry, and updates internal state -
but only updates the panel if it's visible, and otherwise simply memorizes the last event (which is just
a number!);
5. ensures showing the panel updates the panel's category data based on the memorized state from (4).
Differential Revision: https://phabricator.services.mozilla.com/D81926
`ValueToId` turned out to be a pitfall we want to avoid, it looks quite similar
to `ToPropertyKey`, but is subtly different to that function.
Let's rename it to `PrimitiveValueToId` and assert its input is a primitive,
that should prevent any accidental use of that function when `ToPropertyKey`
should have been used instead.
Differential Revision: https://phabricator.services.mozilla.com/D83060
These changes should result in no observable behaviour for their current usage.
intrinsic_DefineDataProperty:
- Using `ToPropertyKey` also is a better match for the inlined, three argument
form of `_DefineDataProperty`.
JS_ValueToId:
- It looks like this function is only called with String values, so changing it
to use `ToPropertyKey` won't result in any observable difference.
js::ValueToIdentifier:
- This function will throw an error when symbols are encountered anyway, so we
might as well change it to use `ToPropertyKey`.
Differential Revision: https://phabricator.services.mozilla.com/D83058
`ValueToId()` calls `ToAtom()` for objects, which isn't correct per spec,
instead `ToPropertyKey()` needs to be used here.
Differential Revision: https://phabricator.services.mozilla.com/D83052
The `plain` builds are intended to make sure that building with an empty mozconfig doesn't break. Since an empty mozconfig build wouldn't have wasm sandboxing, neither should the `plain` builds.
While here, also remove wasi/lucet dependencies from the base-toolchain tasks, since they don't enable sandboxing either.
Differential Revision: https://phabricator.services.mozilla.com/D83011
Also we drop support for an independent-of-scroll/viewport capture, which
the old Tab Sharing supported, for security reasons (and we don't need it).
Differential Revision: https://phabricator.services.mozilla.com/D80974
This fixes two issue.
First, the code shouldn't be dispatching these events every time it gets a new
Print or PrintPreview call. It only needs to dispatch the events to the
original document that we're going to clone from. When cloning from existing
static clones any changes made by 'beforeprint' will be present in the existing
static clone.
Second, the code tries to delay the 'afterprint' event until after
mozPrintCallback callbacks have been invoked, but those callbacks are invoked
in the cloned document, whereas the events are sent to the original document!
So there is no reason to do this.
Differential Revision: https://phabricator.services.mozilla.com/D34280
Also: adjust include paths to be consistent for usages of various SVG headers,
and remove unused SVG includes (mostly for "utils" classes),
and drop stray "ns" from already-renamed SVG classes in various code comments.
Differential Revision: https://phabricator.services.mozilla.com/D83140
Previously we were calling it at 60fps for 30fps video. This meant that
any bias would be cancelled out on the vsyncs where we didn't present
anything. This also makes us match the non-WebRender path which only
calls UpdateBias after a frame has actually been drawn.
Differential Revision: https://phabricator.services.mozilla.com/D83211
Additionally, we make access to mTextureClientRecycler, mHandle and mIsAsync thread-safe as they are accessed and set from different threads
Differential Revision: https://phabricator.services.mozilla.com/D82339