Граф коммитов

236 Коммитов

Автор SHA1 Сообщение Дата
Michal Novotny 389fb7d883 Bug 1606643 - Race condition in ZipArchiveLogger r=valentin
A global instance of ZipArchiveLogger is used on multiple threads when the logging is turned on. This patch adds a lock to synchronize the access.

Differential Revision: https://phabricator.services.mozilla.com/D60537

--HG--
extra : moz-landing-system : lando
2020-01-22 08:41:39 +00:00
Michal Novotny ef9ac4c5c0 Bug 1550815 - Handle SIGBUS error when accessing mmapped file, r=aklotz,haik
This patch adds mmap page fault handling to linux/android.

Differential Revision: https://phabricator.services.mozilla.com/D42010

--HG--
extra : moz-landing-system : lando
2019-10-10 14:07:06 +00:00
Bogdan Tara 47a59026b0 Backed out changeset 6a5d823c5ae4 (bug 1579859) for causing build bustages CLOSED TREE 2019-09-10 00:10:40 +03:00
Gijs Kruitbosch 8235dd4b0d Bug 1579859 - don't use nsDirectoryService::Get to get gre dir on a non-main thread, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45209

--HG--
extra : moz-landing-system : lando
2019-09-09 18:27:33 +00:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

Differential Revision: https://phabricator.services.mozilla.com/D28956

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Doug Thayer 5f3d1ecd2e Bug 1546498 - Split out MaybePrefetchMemory's check into two functions r=aklotz
Temporarily just sidestep the issue in bug 1546498 (crash with latest SDK
on startup in Windows 7) by just continuing to use the old method in
Windows 7. We saw no wins in telemetry for Windows 7 anyway, so we should
investigate why that is, and why we see a mysterious crash in the fallback
code, in a followup bug.

Differential Revision: https://phabricator.services.mozilla.com/D29239

--HG--
extra : moz-landing-system : lando
2019-05-01 02:08:28 +00:00
Dorel Luca 4ef932ea01 Backed out changeset 1c79adcd8483 (bug 1546498) for build bustage. CLOSED TREE
--HG--
extra : rebase_source : aae1090ddfd8445a8cf03385dc200c65f4acd2e0
2019-04-30 22:59:23 +03:00
Doug Thayer 2d10fab858 Bug 1546498 - Split out MaybePrefetchMemory's check into two functions r=aklotz
Temporarily just sidestep the issue in bug 1546498 (crash with latest SDK
on startup in Windows 7) by just continuing to use the old method in
Windows 7. We saw no wins in telemetry for Windows 7 anyway, so we should
investigate why that is, and why we see a mysterious crash in the fallback
code, in a followup bug.

Differential Revision: https://phabricator.services.mozilla.com/D29239

--HG--
extra : moz-landing-system : lando
2019-04-30 05:59:53 +00:00
Doug Thayer ebd6ab40a3 Bug 1538279 - Extract nsZipArchive's madvise and similar to a helper r=glandium,froydnj
This is just to make it simpler to use PrefetchVirtualMemory in subsequent patches.

Differential Revision: https://phabricator.services.mozilla.com/D26016

--HG--
extra : moz-landing-system : lando
2019-04-13 18:46:04 +00:00
Cosmin Sabou c64f16b342 Backed out 3 changesets (bug 1538279) for mass test failures. CLOSED TREE
Backed out changeset af07f58d18cc (bug 1538279)
Backed out changeset 508ee4cf9ea2 (bug 1538279)
Backed out changeset 6f2e7c819c11 (bug 1538279)
2019-04-12 07:47:53 +03:00
Doug Thayer 358b289ecc Bug 1538279 - Extract nsZipArchive's madvise and similar to a helper r=glandium,froydnj
This is just to make it simpler to use PrefetchVirtualMemory in subsequent patches.

Differential Revision: https://phabricator.services.mozilla.com/D26016

--HG--
extra : moz-landing-system : lando
2019-04-12 02:17:18 +00:00
Mike Hommey f42cec8f44 Bug 1534209 - Do not readahead when PrefetchVirtualMemory is not available. r=aklotz
Re-enabling the PGO jarlog, which was unexpectedly disabled since Firefox 56
showed a regression on Windows 7, due to the use of mozilla::ReadAhead,
which on Windows 7 does explicit I/O on the caller thread.

While there may be some benefit from doing so, evidence says the
opposite, which is presumably due to the amount of data being loaded not
being relevant in every case: the jarlog is gathered from a first-run,
which has a different jar-loading profile from subsequent runs of
Firefox.

While we may want to improve the situation later on, the immediate thing
we can do is stop doing this explicit read, while keeping the OS
readahead hints on other platforms, which don't imply explicit I/O.

All this does is effectively get us back to the same state as if jarlogs
were disabled like it was since Firefox 56, for Windows 7 only.

aFd not being used anymore, the code could be cleaned up a lot, but we
may reintroduce the readahead later, so keep the status quo for now.

Differential Revision: https://phabricator.services.mozilla.com/D23642

--HG--
extra : moz-landing-system : lando
2019-03-18 22:39:44 +00:00
Sylvestre Ledru 4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Mike Hommey baba0e3cec Bug 1529894 - Change jar log content. r=aklotz,chmanchester
The jar log is used for optimization of the packaged jar files according
to their usage patterns during a profile run. The current content of the
file currently come with 2 caveats:
- it contains entries for jar archives that aren't relevant to
  packaging, which is not a problem in itself, but see below.
- it contains full paths for jar archives that may not correspond to the
  location of the packaged directory (on e.g. Android, where the build
  almost certainly doesn't happen in the same directory on the host as
  Fennec runs in the emulator/on the device).

The current JarLog code does somehow handle the various ways paths are
currently presented, but it's clearly missing code to map the paths in
the log to packaged paths. Instead of requiring manual work and extra
build options to handle this mapping, and considering the caveats above,
it's just simpler to log archive paths as if they were relative to the
packaged application directory in a build, and use that during
packaging.

Depends on D21655

Differential Revision: https://phabricator.services.mozilla.com/D21656

--HG--
extra : moz-landing-system : lando
2019-03-07 20:46:52 +00:00
Mike Hommey 1e519dde78 Bug 1529894 - Change zip logging initialization. r=aklotz
Instead of checking the MOZ_JAR_LOG_FILE for each log entry, only check
it once, and only check whether to log once per archive rather than once
per item.

Differential Revision: https://phabricator.services.mozilla.com/D21655

--HG--
extra : moz-landing-system : lando
2019-03-07 22:54:53 +00:00
Gurzau Raul fe771d472a Backed out 4 changesets (bug 1529894) for xperf failures on a CLOSED TREE.
Backed out changeset d31f88692394 (bug 1529894)
Backed out changeset e2d7b59776a2 (bug 1529894)
Backed out changeset 3c37fd9d30d5 (bug 1529894)
Backed out changeset e93f4871731b (bug 1529894)

--HG--
extra : rebase_source : ae317f856e08d09ec655cb7b7a87c120f3c626a5
2019-03-06 13:06:13 +02:00
Mike Hommey bef82f111d Bug 1529894 - Change jar log content. r=aklotz,chmanchester
The jar log is used for optimization of the packaged jar files according
to their usage patterns during a profile run. The current content of the
file currently come with 2 caveats:
- it contains entries for jar archives that aren't relevant to
  packaging, which is not a problem in itself, but see below.
- it contains full paths for jar archives that may not correspond to the
  location of the packaged directory (on e.g. Android, where the build
  almost certainly doesn't happen in the same directory on the host as
  Fennec runs in the emulator/on the device).

The current JarLog code does somehow handle the various ways paths are
currently presented, but it's clearly missing code to map the paths in
the log to packaged paths. Instead of requiring manual work and extra
build options to handle this mapping, and considering the caveats above,
it's just simpler to log archive paths as if they were relative to the
packaged application directory in a build, and use that during
packaging.

Depends on D21655

Differential Revision: https://phabricator.services.mozilla.com/D21656

--HG--
extra : moz-landing-system : lando
2019-03-06 01:18:10 +00:00
Mike Hommey 738d1f49f9 Bug 1529894 - Change zip logging initialization. r=aklotz
Instead of checking the MOZ_JAR_LOG_FILE for each log entry, only check
it once, and only check whether to log once per archive rather than once
per item.

Differential Revision: https://phabricator.services.mozilla.com/D21655

--HG--
extra : moz-landing-system : lando
2019-03-05 23:33:21 +00:00
Mike Hommey 7927abed4b Bug 1530818 - PrefetchVirtualMemory is WINAPI. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D21304

--HG--
extra : moz-landing-system : lando
2019-02-27 00:45:57 +00:00
Mike Hommey f266fa9039 Bug 1529558 - Use PrefetchVirtualMemory in nsZipArchive::BuildFileList when supported. r=aklotz
instead of ReadAhead, which does active reading on Windows.

The PrefetchVirtualMemory is a system call that is new to Windows 8.

Back when the readahead code for jar was added, in bug 810151, Windows 8
was still fresh out of the oven. 6 years later, we can do a runtime
check and use the PrefetchVirtualMemory function.

One downside is that the IOInterposer doesn't know about it (but it
doesn't know about madvise on other platforms anyways).

Differential Revision: https://phabricator.services.mozilla.com/D20807

--HG--
extra : moz-landing-system : lando
2019-02-26 00:14:20 +00:00
Mike Hommey 3b28460f33 Bug 1529551 - Only readahead jars in the parent process. r=aklotz
Consequently, since we don't readahead jars in child processes, we
don't record jar accesses from child processes. In fact, intertwining
jar accesses from child processes with those from the parent process was
arguably making things less efficient for the parent process. But this
code was written at a time e10s was barely a thing, so it wasn't really
thought for a multi-process world.

Differential Revision: https://phabricator.services.mozilla.com/D20752

--HG--
extra : moz-landing-system : lando
2019-02-25 23:40:55 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Cameron McCormack e8db2c5f88 Bug 1194856 - Remove UA style sheet load crash report annotations r=gsvelto,dbaron
This backs out the main patch landed earlier in bug 1194856 and the
patch from bug 1225004.

Differential Revision: https://phabricator.services.mozilla.com/D14050

--HG--
extra : moz-landing-system : lando
2018-12-15 00:02:56 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andi-Bogdan Postelnicu 95c7df13d3 Bug 1453795 - LibJAR - Initialize member fields in classes/ structures. r=aklotz
--HG--
extra : rebase_source : c11b3f112ec543178d9356e523ecd5fc962dee49
extra : amend_source : 0bbe3fb4390c4fef6b72715e57753223e4d26796
2018-06-16 14:03:28 +03:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Jeff Walden ed3e951980 Bug 1443342 - Blacklist nsZipArchive.cpp's entry-name hashing function from being checked for unsigned integer overflows, because it knowingly relies on them. r=froydnj
--HG--
extra : rebase_source : f71e49bcb679b1c3d3a1a8e48f2d6bffd320e876
2018-03-01 17:11:39 -08:00
Masatoshi Kimura eb51cbc6c9 Bug 1428568 - Stop using GetNativePath in libjar. r=mayhemer
mZips key is used only for internal hashtable lookups, so GetPersistentDescriptor is suitable.

MozReview-Commit-ID: 48wDOSjyo3r

--HG--
extra : rebase_source : 03c4b47812dade1d3e321727aafacfbc12bcbf32
extra : intermediate-source : 85a0b6bc25a1f960767ac28ff23a8c26829946a2
extra : source : 544bf26e258d42c835c80672416b0e29a48ba33b
2017-12-15 20:58:51 +09:00
Gijs Kruitbosch 01809dc8fa Bug 1417093 - remove symlink support from our nsZipArchive extract implementation because it's unused and has issues, r=mossop
MozReview-Commit-ID: FZ7hy3ATw1i

--HG--
extra : rebase_source : 531b46c24db1791a0dd8ca4afd4021cb2ce4f126
2017-11-21 16:25:46 +00:00
Jonathan Kew 009efa5e70 Bug 1340910 - pt 2+3 - Import Brotli 0.6.0 from upstream, and Gecko updates required to work with Brotli 0.6.0 API changes. r=glandium 2017-08-09 11:45:39 +01:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Petr Sumbera 0605d73786 Bug 1183273 - posix_madvise() should be used instead of madvise on Solaris; r=froydnj 2017-06-29 02:37:30 -07:00
Paul Bignier 500ecab8d6 Bug 1354920 - Typo fixes around 'algorithm'. r=MattN
MozReview-Commit-ID: IwFb43y8Dxm
2017-06-06 17:50:25 -07:00
Chris Peterson 870028fdbf Bug 1356843 - Fix -Wcomma warning in modules/libjar/nsZipArchive.cpp. r=aklotz
clang's -Wcomma warning warns about suspicious use of the comma operator such as between two statements or to call a function for side effects within an expression.

modules/libjar/nsZipArchive.cpp:651:25 [-Wcomma] possible misuse of comma operator here

MozReview-Commit-ID: 9PjB915D81f

--HG--
extra : rebase_source : c494c2f4a8291d6c08f02765e988c1fd14079e54
extra : source : 3643e37b615c4461b6a9359856731252acc36465
2017-03-27 21:39:36 -07:00
Mike Hommey 8f667a0d22 Bug 1355661 - Add support for brotli streams in Jar archives. r=aklotz
Modern compression algorithms are better than zlib both in terms of
space and time. The jar format, used for e.g. omni.ja, addons, etc.
could benefit from using such modern algorithms, but the format only
allows a limited set of compression algorithms.

However, the format in itself is flexible, in that it can be extended
with arbitrary compression algorithms. This breaks compatibility with
programs like unzip, obviously, but we've never promised the files
shipped with Firefox will always remain "valid" zips (which they already
aren't, but they currently work with most zip readers).

With this change, we allow those archives to contain brotli streams,
using an arbitrary large value for the compression type in the Zip local
file header. This only allows to read such archives, but not to produce
them, and, for now, support for brotli streams is kept Nightly-only,
until everything is pieced together and we're happy to ship it.

--HG--
extra : rebase_source : fa637251f460ad0d91d5f5bec392c6e59555e80d
2017-04-07 14:48:25 +09:00
Eric Rahm 863c5ed327 Bug 1351801 - Switch libjar over to ArenaAllocator. r=bsmedberg
This converts libjar over to using ArenaAllocator instead of plarena.h. All
files can now be built in unified mode.

MozReview-Commit-ID: Ev8yyhxqRr7
2017-04-05 11:16:43 -07:00
Eric Rahm d98d879754 Bug 1353143 - Part 3: Switch PR_ASSERT usage to MOZ_ASSERT. r=froydnj 2017-04-04 14:36:17 -07:00
Sylvestre Ledru 83bb719105 Bug 1338086 - Remove useless else blocks in order to reduce complexity in modules/libjar/ r=froydnj
MozReview-Commit-ID: LvDRxqoEAoY

--HG--
extra : rebase_source : 3a06f61ebf0a61fd50995ca7563a8da1e86d0747
2017-02-09 10:54:30 +01:00
Sylvestre Ledru 2ca789788b Bug 1337358 - Converts for(...; ...; ...) loops to use the new range-based loops in C++11 in modules/libjar/ r=froydnj
MozReview-Commit-ID: AZtieJz44uD

--HG--
extra : rebase_source : bd63fbebce66a2f5553f702b01b1cece1c77280c
2017-02-08 12:06:26 +01:00
Andrew McCreight fccb0645ed Bug 1323042 - forbid MOZ_COUNT_{CTOR,DTOR} for nsISupports classes; r=froydnj 2016-12-12 09:27:58 -05:00
Nathan Froyd 826598caba Backout aba6c73511a2 (bug 1307961) for massive test bustage resulting in a CLOSED TREE; r=alltheorange 2016-12-12 08:45:46 -05:00
Andrew McCreight e31b5489da Bug 1307961 - require consistent bloatview reporting for nsISupports classes; r=froydnj 2016-12-12 07:58:33 -05:00
Nicholas Nethercote 04be8d005a Bug 1296164 (part 1) - Use [must_use] on nsIFile.{create,createUnique}. r=froydnj.
And fix numerous missing checks that this change identifies.

--HG--
extra : rebase_source : 97b0a6e8f9375c937dadb59c1110bb54b7633134
2016-08-18 13:30:12 +10:00
Kyle Huey 6baa905da7 Bug 1282527: Remove remaining PR_ASSERTs outside of NSPR/NSS. r=dbaron
--HG--
extra : rebase_source : a9dd69c772ef2641ee300d57d2a4d4c83003726c
2016-06-28 10:47:22 -07:00
Patrick McManus e42c45b58b Bug 1215319 - zip archive fix part 2 r=dragana 2016-05-23 17:06:44 -04:00
Patrick McManus 89eb82cf26 Bug 1215319 - zipArchive fix r=dragana 2016-05-12 11:33:47 -04:00
Kirk Steuber 5e03f29369 Bug 1269185 - Prevent crashes in Windows when zip files cannot be read. r=spohl
MozReview-Commit-ID: 32uEegoKL4J

--HG--
extra : transplant_source : %2BN%22%E7%D0%A2%E8%BD%90%A6%E5%F3%F0J%9Ceg%25%FBc
2016-05-04 12:57:21 -07:00
Kirk Steuber a5ac9bebd2 Bug 1260836 - Add functionality to allow CRX files to be handled as ZIP files. r=spohl
MozReview-Commit-ID: 9JeSC6L4x6Z
2016-04-06 18:28:24 -07:00
Cameron McCormack fa1a36783a Bug 1225004 - Record reason for NS_ERROR_FILE_CORRUPTED in nsLayoutStylesheetCache::LoadSheet in crash reports. r=roc 2015-11-16 19:18:45 +11:00