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

604224 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione c15ee94ddc Bug 1475612: Fix double file close on background thread. r=erahm
LSBUtils closes a file descriptor twice, once with fclose and then again with
close. It also does this on a background thread, during startup, which means
it tends to race with main thread code which opens files.

This patch fixes that, and also removes a work-around for the issue in the
MemMapSnapshot code.

MozReview-Commit-ID: JdDHt9ayFEl

--HG--
extra : rebase_source : 2000ede41108d6312734d8df7db98272b33528fa
extra : amend_source : 1443a596fab3e3126a22d44787adaf5e12e4587c
2018-07-12 23:13:04 -07:00
Gerald Squelart 846c1a6377 Bug 1459937 - In DEBUG mode, verify that reparenting direction is correct - r=dbaron
MozReview-Commit-ID: JPfg9YtBm6M

--HG--
extra : rebase_source : d648adaad1d8cc03d7d246fedc3095ba8553f3c8
2018-07-10 15:35:48 +10:00
Gerald Squelart 1c1d2d71b5 Bug 1459937 - Mark pulled floats (from pulled lines) dirty - r=dbaron
Similar to lines (see previous patch), floats from next-in-flow or overflow
frames have probably not been marked dirty (as ReflowInput hasn't dealt with
them when it was constructed), so we need to mark them dirty for proper reflow.

If we don't do that, and they don't fit in the current column, the next column
will only mark its current children dirty, so when pulling back its first
floats from the previous column they will not be reflowed as needed.

MozReview-Commit-ID: KKrwtzeQMrI

--HG--
extra : rebase_source : 2b1abb27e9a6ef248a90254b8b56c05207ae25e6
2018-07-10 11:36:33 +10:00
Gerald Squelart 51058bcdb8 Bug 1459937 - Mark pulled lines (from n-i-f or overflow) dirty - r=dbaron
Lines pulled from next-in-flow or overflow frames have probably not been marked
dirty (as ReflowInput hasn't dealt with them when it was constructed), so we
need to mark them dirty for proper reflow.

If we don't do that, and they don't fit in the current column, the next column
will only mark its current children dirty, so when pulling back its first lines
from the previous column they will not be reflowed as needed, which causes this
bug.

MozReview-Commit-ID: 8GFO1ZWuZ1b

--HG--
extra : rebase_source : 0198b291a1b50441188e050dd5bcb2c06694df81
2018-07-09 11:42:47 +10:00
Chris Pearce 848dee9a6f Bug 1472580 - Ensure we always get a allow/cancel response to an autoplay media permission request. r=smaug
The front end code can't always guarantee to give us an allow/cancel response
to a permission request. In particular in these cases:
* if we close a tab while showing a doorhanger, or
* if we navigate a tab while showing a doorhanger, or
* if the permission prompt requested in a background tab and never shown.

Handling all of these cases is problematic; we don't get events for all of
these where it's easy and cheap to determine that we should cancel the
permission request.

Canceling the permission request is important in the autoplay-media permission
request case as there's objects waiting on the resolution of the permission
request, and they leak in ASan builds while running chrome tests if the Gecko
size of the permission request doesn't get a notification telling it to stop
waiting.

But we can however rely on the doorhanger code to drop its reference to the
nsIContentPermissionRequest object that we pass to it when the doorhanger goes
away. So we can cancel the permission request in our
nsIContentPermissionRequest's implementation's destructor in order to easily
catch all the above cases.

In order to do that, we need to split AutoplayRequest into two; one part being
the implementation of nsIContentPermissionRequest (AutoplayPermissionRequest),
and the other part being the code to own the PromiseHolder and manage the
permission request (AutoplayPermissionManager).

AutoplayPermissionRequest keeps a weak reference to AutoplayPermissionManager,
so that it can tell the AutoplayPermissionManager to reject the request promise
when it's destroyed.

This fixes the ASan leak for which I got backed out from earlier in this bug,
and also fixes the cases above.

MozReview-Commit-ID: KoVkgIqDleW

--HG--
rename : dom/html/AutoplayRequest.cpp => dom/html/AutoplayPermissionManager.cpp
rename : dom/html/AutoplayRequest.h => dom/html/AutoplayPermissionManager.h
extra : rebase_source : dbca520a93d8c416f6d64c2da027630181bb5910
2018-07-06 21:15:20 +12:00
Kris Maglione 0fb080d242 Bug 1471025: Part 8 - Add tests for shared memory preferences. r=njn
MozReview-Commit-ID: 8452JoTBHCU

--HG--
extra : rebase_source : dadc22ef0909102f93f6de3afb99f5b6e65db2f5
extra : absorb_source : 62a77303c36c3af308ee5529d81c637f81449370
2018-07-03 20:17:15 -07:00
Kris Maglione e9a980f931 Bug 1471025: Part 7c - Clear the dynamic hashtable in the parent process after snapshotting. r=njn
The preference storage in the shared memory snapshot is much more compact than
the dynamic hashtable, and is already mapped in memory, so there's no need to
keep the full hashtable in memory in the parent process after the snapshot is
created.

This patch empties the hashtable and the name string arena after the snapshot.
It also removes the accounting for preferences which have changed after init,
since those are, by definition, exactly the set of entries in the dynamic
hashtable.

MozReview-Commit-ID: L6VGq2z4foH

--HG--
extra : rebase_source : d4ba3b6a0ae3d46cf797fd6aaf4502d7a74f49c9
extra : absorb_source : e8b2648578a880d43a5a3a075e60ce1433c737ce
2018-07-02 22:48:40 -07:00
Kris Maglione c1de3fe2de Bug 1471025: Part 7b - Don't load preference files in the content process. r=njn
With the parent sending a snapshot of its preference state at content process
startup, we're guaranteed to have the full set of built-in preferences in the
shared map at initialization time, so there's no need to load them again.

This also applies to static preference default values, so we skip setting
those, as well.

However, we do need to make sure that we update static preference cache
entries whose default values don't match the value in the shared map, since
they may have been changed by user preference files. In order to deal with
that, we iterate over all preferences in the map, and dispatch callbacks for
any that have user values.

MozReview-Commit-ID: DlRUbg7Qor3

--HG--
extra : rebase_source : 93cad19e27d3aaf5d4cad358cdebd6d80b76f668
extra : absorb_source : 06cb8911c92b66f8863b5e184d88b923cdbd6adc
2018-07-07 12:45:57 -07:00
Kris Maglione 9128f02116 Bug 1471025: Part 7a - Look up preferences from both dynamic and shared preference tables. r=njn
This patch changes our preference look-up behavior to first check the dynamic
hashtable, and then fall back to the shared map.

In order for this to work, we need to make several other changes as well:

- Attempts to modify a preference that only exists in the shared table
  requires that we copy it to the dynamic table, and change the value of the
  new entry.

- Attempts to clear a user preference with no default value, but which also
  exists in the shared map, requires that we keep an entry in the dynamic
  table to mask the shared entry. To make this work, we change the type of
  these entries to None, and ignore them during look-ups and iteration.

- Iteration needs to take both hashtables into consideration. The
  serialization iterator for changed preferences only needs to care about
  dynamic values, so it remains unchanged. Most of the others need to use
  PrefsIter() instead.

MozReview-Commit-ID: 9PWmSZxoC9Z

--HG--
extra : rebase_source : 054f4dcd534b41da889304c3c6d3365d56e8edda
extra : absorb_source : de81199e174f2d3604c803a5c016ba2f3baf3558
2018-07-02 22:52:53 -07:00
Kris Maglione 50cbc3c826 Bug 1471025: Part 6 - Optimize preference lookups while dispatching callbacks. r=njn
Since lookups in the snapshotted hashtable are currently O(log n) rather than
O(1), they're expected to be slightly more expensive than the previous
purely-dynamic lookups.

In general, I expect this not to be a major issue. The main concern is pref
cache lookups while initializing the database. Initialization in the parent
process will still always use only a dynamic hashtable, so the performance
characteristics there won't change.

In the child process, though, we'll still need to notify observers of
preferences in the snapshot when they have user values, which could require
any number of lookups at startup (though in practice probably will not).

This patch solves that problem by caching the wrapper for the current known
preference value when dispatching callbacks, and optimizing lookups for that
value when it is present.

MozReview-Commit-ID: 2CAn0rM0bE9

--HG--
extra : rebase_source : 4a7e9611efe5b554309df18f7b18ba9c807b72b2
extra : absorb_source : 185442bd69d616c2d2512df954dde7d1b54f2c30
2018-07-07 12:47:34 -07:00
Kris Maglione f1dd4a1a40 Bug 1471025: Part 5 - Add a range iterator helper for iterating both static and dynamic preferences. r=njn
For memory efficiency in content processes, we need to be able to store
changed preferences in a separate dynamic hashtable when their values don't
match the snapshot values.

That makes iteration over the full set of preferences somewhat more
complicated, since not only do we need to iterate over two tables, but we also
need to ignore preferences in the snapshot table if they also exist in the
dynamic hashtable.

This patch solves that problem by adding an iterator helper which iterates
over values in both tables, and skips values in the static table if they also
exist in the dynamic table.

In order to support completely deleting preferences that exist in the base
table, it also ignores all dynamic entries with the None type, so that they
can completely mask deleted base table values.

MozReview-Commit-ID: LCIwyPJMByj

--HG--
extra : rebase_source : 833abea0620f75410f9922e5d4b5cf36b84e9e50
extra : absorb_source : 89690c674120eb99ad25804408b1c3864c7b1fc8
2018-07-02 18:17:48 -07:00
Luca Greco ede4ac5025 Bug 1474557 - Clear the dbPromise cached by ext-storage when IndexedDB raises an exception while opening the db. r=mixedpuppy
MozReview-Commit-ID: 9qsDYI0wgmI

--HG--
extra : rebase_source : f7ee4469841559d166f0b7c48b49a729ceabdec0
2018-07-02 21:37:58 +02:00
Luca Greco f49ffe6940 Bug 1474557 - Prevent ExtensionStorageIDB and child/ext-storage from caching a stale or rejected selectBackend promise. r=mixedpuppy
MozReview-Commit-ID: Kgwtm7QXW9o

--HG--
extra : rebase_source : dc28d2f622876a359592d8e44a6cf449237acc30
2018-07-09 22:35:12 +02:00
Ian Moody 266d0a4703 Bug 1474379 - Match regex against the entire panel ID. r=miker,rpl
So panels provided by extensions with IDs that contain words like "inspector"
don't break.
Include test in existing panel creation test.

MozReview-Commit-ID: JerMCaKRgkl

--HG--
extra : rebase_source : 56c0262597c4070c7e16b32ebf824ef1fdd1fd8d
2018-07-10 17:38:35 +01:00
Alexis Beingessner a8977d3600 Bug 1465948 - factor in the BuildingRect for filters and masks. r=jrmuizel
MozReview-Commit-ID: BABKDG5U0UB
2018-07-13 13:50:39 -04:00
Brendan Dahl afd85398a2 Bug 1460691 - Support tooltips in top level non-XUL windows. r=enndeakin+6102,mats+6102
Add an anonymous XUL tooltip node to toplevel non-XUL windows. Setup a
nsXULTooltipListener on non-XUL nsXULWindows. Make nsXULTooltipListener
always use the default tooltip in the non-XUL case.

MozReview-Commit-ID: Koe5m8PwMQM

--HG--
extra : rebase_source : 242180e957758b51c589452e35deadac5ab06d9e
2018-07-03 14:20:43 -07:00
Andrew Halberstadt 5935acc8f0 Bug 1475649 - [mozversioncontrol] Make vcs.working_directory_clean() ignore untracked files by default r=jgraham
The doc string for the "working_directory_clean" function states:
> By default, untracked and ignored files are not considered.

But the git implementation for this function used to run:
git status --porcelain

Which *does* consider untracked files by default. Instead, we need to run:
git status --porcelain --untracked-files=no

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

--HG--
extra : moz-landing-system : lando
2018-07-13 20:54:08 +00:00
Nazım Can Altınova 7dd60d07b7 Bug 1475006 - Remove mAutoProfilerLabel from AutoEntryScript in non-MOZ_GECKO_PROFILER builds r=mstange
MozReview-Commit-ID: 66mZK4q2ATK

--HG--
extra : rebase_source : ae72897b128731b8d721a3db230009a605b1560a
2018-07-12 11:01:08 +02:00
Erica Wright 23af908b2c Bug 1471514 - Add fxa endpoint pref for top-of-funnel metrics, and turn it off for testing. r=ursula
MozReview-Commit-ID: BLycdhPSVlk

--HG--
extra : rebase_source : f3083154cf142e871dd503cb5950afb1cecc3a89
2018-07-13 10:45:43 -04:00
Mike Conley ff9485d612 Bug 1456843 - Compute FormLike elements lazily on <form>-less fields. r=MattN
MozReview-Commit-ID: 3blElMxkejf

--HG--
extra : rebase_source : 62a43ecb879bd033fb72436dc3a23d488cf32e52
2018-07-13 12:41:06 -04:00
David Keeler 4cb1fcaa51 bug 1475105 - refactor platform-specific enterprise root code into its own file r=franziskus
By separating the platform-specific code that finds enterprise roots to load
into its own file, we can make it easier to both add support for other
platforms and maintain the implementations going forward.

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

--HG--
extra : moz-landing-system : lando
2018-07-13 17:30:16 +00:00
Byron Campen [:bwc] 0df53d9bd5 Bug 1471697: Stop unsetting mListener on main. r=mjf
MozReview-Commit-ID: 1swVwMyRatC

--HG--
extra : rebase_source : 0c8a95de625b10b460cdfc54f2c6c9cf6dbe8adc
2018-07-02 10:43:26 -05:00
Ting-Yu Lin 5f1b665033 Bug 1286882 - Make SVG basic shape elements unselectable. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D2038

--HG--
extra : moz-landing-system : lando
2018-07-13 18:01:48 +00:00
Ting-Yu Lin 3eb470a022 Bug 1475385 - Unprefix -moz-column-* in w3c-submitted reftests. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D2112

--HG--
extra : moz-landing-system : lando
2018-07-13 15:57:41 +00:00
Alexis Beingessner ae6bb80dd4 Bug 1474970 - mark wrap lists as ContainersLayerItems. r=mstange
MozReview-Commit-ID: KDz50Xlp0Ps

--HG--
extra : rebase_source : b2b1dfc96aa9639ee6af6cfb669551208fbe02bb
2018-07-11 13:20:58 -04:00
Mike Conley 8fa1ee6473 Bug 1471107 - Get rid of assertion and handle the already-unsuppressed displayport case in PresShell. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D2130

--HG--
extra : moz-landing-system : lando
2018-07-13 17:31:00 +00:00
ahillier 659bda3774 Bug 1475012 - fix ordering of getTopFrecentSites in ActivityStreamProvider r=ursula
MozReview-Commit-ID: Eymz3kAoHuX

--HG--
extra : rebase_source : af84f35c0674679b17a09eacca518cc62793a499
2018-07-11 12:26:39 -07:00
Masayuki Nakano 5c3723acb2 Bug 1475461 - part 2: Make callers of PLDHashTable::Search() const methods if possible r=Ehsan
Some callers of PLDHashTable::Search() use const_cast, some others are not
const methods due to non-const PLDHashTable::Search().

This patch removes const_cast from the former and mark some methods of the
latter const.

MozReview-Commit-ID: C8ayoi7mXc1

--HG--
extra : rebase_source : 2cba0339756e3278ba6e5f0e8a11e68217a61d34
2018-07-13 19:01:53 +09:00
Masayuki Nakano 78077d5b3c Bug 1475461 - part 1: Mark PLDHashTable::Search() and called by it as const r=Ehsan
PLDHashTable::Search() does not modify any members.  So, this method and
methods called by it should be marked as const.

MozReview-Commit-ID: 6g4jrYK1j9E

--HG--
extra : rebase_source : eda6c50c538fec0e8c09cb2ba629735eea6ec711
2018-07-13 16:56:29 +09:00
Tanushree Podder e8cc1dc6df Bug 1470267 - Store the visual viewport offset in nsIPresShell. r=botond
Added a data member to nsIPresShell to store the visual viewport offset. APZ
will update the visual viewport offset in the presShell for root scroll frames
on every repaint request.

MozReview-Commit-ID: Ksou43hrE6H

--HG--
extra : rebase_source : 812c88efc7556c4bff2a62834cfaaec6e6945093
2018-07-11 17:24:56 -04:00
Gurzau Raul 1e95ba963d Backed out changeset 24a8cf2131d1 (bug 1384236) for failing at extensions/test/xpcshell/test_webextension_langpack.js on a CLOSED TREE 2018-07-13 20:02:32 +03:00
Mike de Boer d3b8d2bdfe Bug 1463860 - Don't play a beep when the find string is not find when Whole Word matching is enabled; it simply beeps too much. r=Ehsan
MozReview-Commit-ID: S6dvbV5Q5d

--HG--
extra : rebase_source : 5852765bee02e4fae1370050db84b608dea3c0da
2018-07-13 13:25:02 +02:00
Mark Banner 25a14e80df Bug 1475504 - Don't change package-lock.json when running 'npm install' due to Lint setup. r=ahal
This prevents accidental changes to package-lock.json when ESLint's setup runs 'npm install'.

Also revert the recent accidental changes to package-lock.json.

MozReview-Commit-ID: 21ebhOlQcMv

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

--HG--
extra : moz-landing-system : lando
2018-07-13 15:53:32 +00:00
Lina Cambridge 699fdba348 Bug 1472963 - Add a `totalSyncChanges` counter and use it in the bookmarks mirror. r=mak
This patch:

* Exposes a global Sync change counter on `nsINavBookmarksService`.
  This is similar to SQLite's `total_changes()`, but just for changes
  to bookmarks that affect Sync, and accounts for changes from multiple
  threads and connections.
* Adds a SQL function to bump the counter, and extends the
  `moz_bookmarks` triggers to call it.
* Moves merging outside the transaction in the bookmarks mirror, and
  checks that the counters match before applying.

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

--HG--
extra : moz-landing-system : lando
2018-07-13 15:03:40 +00:00
Kris Maglione 62e557b598 Bug 1471025: Part 4 - Add a wrapper class that can access either static or dynamic prefs. r=njn
The in-memory format of shared-memory preferences is significantly different
from the format used by dynamic preferences, which means that we need
different classes to access their properties.

Virtual classes would be a potential solution to this problem, but I don't
think the performance characteristics would be acceptable for preferences
code. And since the wrapper classes used for static prefs are temporary, they
would add the additional snag of figuring out how to keep a valid pointer
alive.

So, instead, this patch adds a wrapper class that can access either type of
preference, based on known type flags in a Variant. It also moves some of the
logic for deciding which preference value to return to the wrapper, so that it
doesn't need to be duplicated for each representation.

MozReview-Commit-ID: LameIIbYcD3

--HG--
extra : rebase_source : bf986b6008123661547949f615c8416403321835
extra : absorb_source : e86aae959325a9c3198e0259468a47a656739278
2018-07-01 23:23:48 -07:00
Kris Maglione 6c6960d4c8 Bug 1471025: Part 3c - Also pass the shared preference map handle to Android content processes. r=jld
MozReview-Commit-ID: CTjDzVC9gcD

--HG--
extra : rebase_source : c06aa38ff4bc2bdfa09a4aae359e1f418727ce29
extra : absorb_source : c68cd5f0e8f52980d35432cf21e1fc5552542bf2
2018-07-13 11:06:58 -07:00
Kris Maglione de31493580 Bug 1471025: Part 3b - Refactor Android shared FD API to require fewer modifications per change. r=jld
Adding or removing an FD from this API currently requires changes in about a
half dozen places. Ignoring the Java side of things. This patch changes the
API to pass a struct, rather than additional arguments for each FD, so that
adding and removing FDs only requires changing one declaration, and the two
call sites that add and consume the FDs.

MozReview-Commit-ID: CToSEVp1oqP

--HG--
extra : rebase_source : 28e8c6075bacf5f610058227a9731aeadb50f320
extra : absorb_source : f63602a163ed19fb65e26640319750fdd9b92ad1
2018-07-02 15:01:25 -07:00
Kris Maglione 607cc0aec9 Bug 1471025: Part 3a - Pass shared preference map to (non-Android) content processes at startup. r=jld,njn
This adds an additional file descriptor to the set sent at content process
startup, for the read-only preference map that we share between all content
processes. This forms the base set of preferences. The other preferences FD
contains changes that the content process will need to apply on top of the
snapshot.

MozReview-Commit-ID: 6hc0HIxFmHg

--HG--
extra : rebase_source : f5de7462438e33cf4983be3fcef3c781c25ec492
extra : absorb_source : 9f9861546fc0b11333e575bb3c164dfe07575d99
2018-07-02 15:40:38 -07:00
Kris Maglione 68c9610957 Bug 1471025: Part 2 - Add a helper class creating and accessing shared preference map snapshots. r=njn,erahm
This is based on the SharedStringMap that's currently used for shared memory
string bundles.

When the parent process is ready to launch its first content process, it
creates a snapshot of the current state of the preference database, maps that
as read-only, and shares it with each content process. Look-ups in the
snapshotted map are done entirely using data in the shared memory region. It
doesn't require any additional per-process state data.

MozReview-Commit-ID: BdTUhak7dmS

--HG--
extra : rebase_source : e7cb96dd52380f2ed2fbd79b4e157e4efab65cb0
extra : absorb_source : ed95ed85388875353458eb65e41727e606ebf097
2018-07-01 18:28:31 -07:00
Kris Maglione ea9eafabda Bug 1471025: Part 1 - Store preference access counts in a separate hashtable. r=njn
Once the majority of preferences are stored in a read-only shared map, it
won't be possible to modify the access counts in their entries. Which means we
need a separate map for the access counts.

Fortunately, this code is only active in debug builds, so it shouldn't affect
release users. And the net impact on memory usage of this patchset will still
be decidedly downward.

MozReview-Commit-ID: EuLXlMQJP1M

--HG--
extra : rebase_source : 6a32f03c37622093c67e7ee7a0e935d1e63c4fc8
2018-07-02 23:33:28 -07:00
Gabriel Luong d97da99c28 Bug 1473403 - Remove unused theme-fg-color classes. r=bgrins 2018-07-13 13:29:18 -04:00
Andrea Marchesini eb58d7637b Bug 1475236 - Expiration time for the anti-tracking permission should be controllable via pref, r=ehsan 2018-07-13 19:19:26 +02:00
Andrea Marchesini f1d9bed10f Bug 1473718 - Speculative connection should start using the correct OriginAttributes values, r=mconley 2018-07-13 19:17:58 +02:00
Ryan Hunt cfffe8f09f Bug 1471892 - Block OMTP before OSX 10.10 to work around CoreGraphics crash. r=jrmuizel
MozReview-Commit-ID: JYmlucAG6rB

--HG--
extra : rebase_source : 03c0963bf54b967f34108fa7c879b180685dd868
extra : amend_source : b17adf02508d9a93d1d4149a1573919192440fe8
2018-07-10 16:12:58 -05:00
Andrea Marchesini 057b294956 Bug 1469566 - Port ServiceWorkers to WorkerRef - part 2 - KeepAliveHandler, r=bkelly 2018-07-13 18:26:29 +02:00
Andrea Marchesini fbd07c7a9d Bug 1469566 - Port ServiceWorkers to WorkerRef - part 1 - LifeCycleEventWatcher, r=bkelly 2018-07-13 18:25:58 +02:00
Kartikaya Gupta 63972a55bf Back out cset 5b8041f7f604 (bug 1446181) for introducing a low-volume crash. r=me 2018-07-13 12:00:29 -04:00
Andrea Marchesini d6ce364ced Bug 1470306 - Adding some MOZ_DIAGNOSTIC_ASSERT in MessagePort, r=smaug 2018-07-13 17:41:34 +02:00
Emilio Cobos Álvarez 1494e3f878 Bug 1474903: Minor static_cast cleanup in nsDisplayList. r=miko
MozReview-Commit-ID: 30vwluk0r39
2018-07-13 17:17:03 +02:00
Ryan VanderMeulen 16fa6aac83 Bug 1473064 - Update HarfBuzz to version 1.8.3. r=jfkthame
--HG--
extra : rebase_source : 3c306d165a8c22c9f38f6faa9aa755d07ad197c8
2018-07-11 10:47:57 -04:00