This reverts commit 85b2d0d3dd.
Revert "Bug 2022763 - Propagate owner global from input element to DOM files properly. r=dom-core,win-reviewers,smaug,gstoll"
This reverts commit ff40c521b2.
And also for types with very simple constructors, following adjustment
to the GlobalVariableInitialization pass.
This basically means flagging some default constructors constexpr, and
the global variable declaration constinit.
Maybe<...> types are left without annotation, marking them constinit is
incompatible with Bug 1992162.
In some cases, this depends on libstdc++ version which lags behind
other standard library we use, then MOZ_GLIBCXX_CONSTINIT is used.
Differential Revision: https://phabricator.services.mozilla.com/D284267
And also for types with very simple constructors, following adjustment
to the GlobalVariableInitialization pass.
This basically means flagging some default constructors constexpr, and
the global variable declaration constinit.
Maybe<...> types are left without annotation, marking them constinit is
incompatible with Bug 1992162.
In some cases, this depends on libstdc++ version which lags behind
other standard library we use, then MOZ_GLIBCXX_CONSTINIT is used.
Differential Revision: https://phabricator.services.mozilla.com/D284267
This reverts commit fbb2488509.
Revert "Bug 2017377 - Improve GlobalVariableInitialization pass to catch common patterns r=firefox-static-analysis-reviewers,sylvestre"
This reverts commit c4d03b539a.
And also for types with very simple constructors, following adjustment
to the GlobalVariableInitialization pass.
This basically means flagging some default constructors constexpr, and
the global variable declaration constinit.
Maybe<...> types are left without annotation, marking them constinit is
incompatible with Bug 1992162.
In some cases, this depends on libstdc++ version which lags behind
other standard library we use, then MOZ_GLIBCXX_CONSTINIT is used.
Differential Revision: https://phabricator.services.mozilla.com/D284267
In the modern era of user-customizable Quick Access sidebars on every
file dialog, navigating via `.lnk` files is rather less useful than it
was twenty years ago.
Disable link-following in file-open dialogs by default, to prevent any
of the usual security issues involving symlink smuggling. Allow
overriding this behavior via a pref, for users who don't care.
(File-save dialogs have a more nuanced guard against that sort of thing;
this patch doesn't affect that.)
Differential Revision: https://phabricator.services.mozilla.com/D239833
AnalyzeContentRequest* calls now require fewer fields. For example, the
URI is, by default, now obtained from the request's WindowGlobalParent's
BrowsingContext.
browser-custom-element.js needed to re-get service for tests, since it was
sometimes getting an old mock version from a previous test.
ContentAnalysisCallback does what SafeContentAnalysisResultCallback used to do.
Differential Revision: https://phabricator.services.mozilla.com/D236631
MOZ_RUNINIT => initialized at runtime
MOZ_CONSTINIT => initialized at compile time
MOZ_GLOBINIT => initialized either at runtime or compile time, depending on template parameter, macro parameter etc
This annotation is only understood by our clang-tidy plugin. It has no
effect on regular compilation.
Differential Revision: https://phabricator.services.mozilla.com/D223341
It would have been easier to intercept these at the time of making the
Content Analysis call, but moving these checks outward saves any time
in creating the data to analyze.
Differential Revision: https://phabricator.services.mozilla.com/D227182
Converts folder scan requests, from any content analysis interception point,
into file scan requests for each file in the folder (recursively). Folder CA
approval is given iff all files were approved. Otherwise the folder analysis
result is denial, issued as soon as that is known.
This still has the issue that only the first file will be given busy and verdict
dialogs. The entire CA check may silently block because of this. See bug
1915351.
Differential Revision: https://phabricator.services.mozilla.com/D224344
Remove the `FOS_SHAREAWARE` flag, which tells Windows that we'll be
providing it with an `IFileDialogEvents` object with `.OnShareViolation()`
implemented. (We do no such thing, nor ever have.)
Differential Revision: https://phabricator.services.mozilla.com/D221273
As a followup to the content patches of a couple of months ago: document
the meaning of the values of AsyncExecute's `enum Strategy`, and in
particular the reasoning behind the last strategy's heuristic.
No functional changes; this patch only adds comments.
Differential Revision: https://phabricator.services.mozilla.com/D222730
... and set this as the new default strategy on Nightly.
Note that the file-picker failure UI will still be displayed if, e.g.,
the file-dialog encounters a nonfatal local failure after a nonfatal
remote failure.
Differential Revision: https://phabricator.services.mozilla.com/D215559
Fire a signal (via the observer service) when the file-dialog crashes or
otherwise fails.
Set up a listener for that signal which reports the failure to the
end-user via the NotificationBox.
Differential Revision: https://phabricator.services.mozilla.com/D214192
If the user is trying to save a file, don't discard that file on
failure; instead, write it to some default location on the filesystem.
Differential Revision: https://phabricator.services.mozilla.com/D214190
Propagate error signal up into nsFilePicker::Open(), to unify error
handling between files and folders.
No functional changes (yet).
Differential Revision: https://phabricator.services.mozilla.com/D214188
Additionally, fix a schema error: `data-sensitivity` was under
`metadata`, and also should have been spelled with an underscore.
Differential Revision: https://phabricator.services.mozilla.com/D213834
* Adjust UtilityProcess{Host,Manager} to propagate ipc::LaunchErrors for
their clients, or to create new ones where none previously existed.
* Adjust the various clients of the above to to handle the additional
information -- mostly by adding the additional failure-location data
to log messages.
* Fix an unrelated bug wherein the return type of `LaunchProcess` was
declared as exclusive, despite being cached and reused.
In particular, filedialog::Error objects should now contain -- and report
to telemetry without further adjustment -- the actual error code from
`ipc::LaunchError`s.
(Reporting the original failure location as well will occur in bug
1884221.)
Differential Revision: https://phabricator.services.mozilla.com/D209715
We used to use GetDomFileOrDirectory(), but that creates a mozilla::dom::Directory which needs to be able to get a DOMWindow. Getting that DOMWindow is now failing, perhaps because of the out-of-process file picker?
Anyway, all we care about is getting the contents of the directory, so we can just use GetDirectoryEntries() to sidestep this, and it also makes the code a bit simpler.
Unfortunately there isn't a good way to test code that's in nsFilePicker.cpp right now, as MockFilePicker mocks all of this out.
Differential Revision: https://phabricator.services.mozilla.com/D209056
Instead of passing potentially-dynamic strings over the IPDL interface,
pass an integer which corresponds to one of a fixed set of static
strings. (This is basically an enum with more steps -- or with fewer
steps, depending on which side of it you're standing on.)
This ensures that the set of possible location-strings is fixed, which
in turn both ensures that aggregation of telemetry stays relatively
simple and guards against accidental leakage of PII thereinto. (Or,
alternatively and equivalently, this minimizes the code region that
data-review needs to consider once the location string is reported to
telemetry.)
Note that we do not yet actually report the location-string via
telemetry; that's planned to occur in bug 1884221.
Differential Revision: https://phabricator.services.mozilla.com/D205169
Don't crash the file-picker host process just because a nonfatal failure
occurred. Instead, report the failure location and code over the IPDL
interface.
Differential Revision: https://phabricator.services.mozilla.com/D205168
Replace most promise-types in widget/windows/filedialog with something
capable of carrying the initial cause and location of a failure.
This does not properly convey that metadata across the IPDL connection
where possible; that will be done in an upcoming commit.
Differential Revision: https://phabricator.services.mozilla.com/D205167
The `Show{File,Folder}Picker{Local,Remote}` functions don't depend on
anything in `nsFilePicker` itself except the mostly-vestigial promise
type. Pull all of them into nsFilePicker.cpp as static functions in an
anonymous namespace.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D205166