Win32 errors ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL need a mapping.
NS_ERROR_FILE_DISK_FULL is duplicate to NS_ERROR_FILE_NO_DEVICE_SPACE
Drive by: RejectJSPromise lacked some NS_ERROR_* mappings
Differential Revision: https://phabricator.services.mozilla.com/D113974
This patch updates the call-site in WebBrowserPersist to pass the
correct enum according to if it is in the private browsing mode.
Differential Revision: https://phabricator.services.mozilla.com/D109051
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.
Differential Revision: https://phabricator.services.mozilla.com/D105473
In this patch, we add cookieJarSettings in WebBrowserPersistDocument.
This is needed if we want to use the correct cookieJarSettings when
download the page or URI.
Differential Revision: https://phabricator.services.mozilla.com/D95612
In this patch, we add cookieJarSettings in WebBrowserPersistDocument.
This is needed if we want to use the correct cookieJarSettings when
download the page or URI.
Differential Revision: https://phabricator.services.mozilla.com/D95612
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Thanks for asking me to add a test ;)
Using the image responsive selector works for scanning the srcset images, but
since we wouldn't rewrite the <source> uris the invalid urls would still have
preference.
Differential Revision: https://phabricator.services.mozilla.com/D92264
Rewrite the srcset URIs appropriately...
This code was completely untested (modulo one test for forms...) I added a
generic reftest framework to compare original vs. persisted document, so that
testing changes to this code is easier next time.
Differential Revision: https://phabricator.services.mozilla.com/D92133
Thanks for asking me to add a test ;)
Using the image responsive selector works for scanning the srcset images, but
since we wouldn't rewrite the <source> uris the invalid urls would still have
preference.
Differential Revision: https://phabricator.services.mozilla.com/D92264
Rewrite the srcset URIs appropriately...
This code was completely untested (modulo one test for forms...) I added a
generic reftest framework to compare original vs. persisted document, so that
testing changes to this code is easier next time.
Differential Revision: https://phabricator.services.mozilla.com/D92133
This fixes a few causes of firing EndDownload twice:
1. firing it from OnDataAvailable if the download was already canceled when the
method was initially invoked, rather than if we are ourselves wanting to
cancel the download because we encountered issues inside OnDataAvailable.
2. firing it from FinishDownload, dispatched from SerializeNextFile, after the
download has already been ended elsewhere.
3. calling Cancel() multiple times.
It also adds some code to avoid the re-entrancy on the Promise code that the
bug was originally filed for, and a diagnostic assert to check if there are any
other cases of repeated EndDownload calling that we've missed.
As a driveby, it adds a few thread assertions to help with code clarity.
Differential Revision: https://phabricator.services.mozilla.com/D90186
This patch was generated by running:
```
perl -p -i \
-e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF8toUTF16\((.*)\);/\1CopyUTF8toUTF16(\3, \2);/;' \
-e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF16toUTF8\((.*)\);/\1CopyUTF16toUTF8(\3, \2);/;' \
$FILE
```
against every .cpp and .h in mozilla-central, and then fixing up the
inevitable errors that happen as a result of matching C++ expressions with
regexes. The errors fell into three categories:
1. Calling the convert functions with `std::string::c_str()`; these were
changed to simply pass the string instead, relying on implicit conversion
to `mozilla::Span`.
2. Calling the convert functions with raw pointers, which is not permitted
with the copy functions; these were changed to invoke `MakeStringSpan` first.
3. Other miscellaneous errors resulting from over-eager regexes and/or the
replacement not being type-aware. These changes were reverted.
Differential Revision: https://phabricator.services.mozilla.com/D88903