Commit Graph

25626 Commits

Author SHA1 Message Date
Florian Quèze
8922be9c58 Bug 1433175 - enable the use-cc-etc eslint rule, r=Standard8. 2018-02-28 18:51:35 +01:00
Florian Quèze
c546946f86 Bug 1433175 - remove by hands some variations of Cc,Ci,Cu definitions, r=Standard8. 2018-02-28 18:51:34 +01:00
Florian Quèze
c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Sebastian Hengst
769222fadf merge mozilla-inbound to mozilla-central. a=merge
--HG--
rename : browser/base/content/tabbrowser.xml => browser/base/content/tabbrowser.js
2018-02-28 12:54:12 +02:00
Dylan Roeh
8ff2f4657b Bug 1439968 - Remove public String-based enums from PermissionDelegate and update documentation. r=snorp,jchen 2018-02-27 09:02:28 -05:00
Andreea Pavel
31d536ed63 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-02-28 00:26:54 +02:00
arthur.iakab
8f11c1f438 Merge mozilla-central to autoland 2018-02-27 12:02:38 +02:00
arthur.iakab
9bffb6aa72 Merge inbound to mozilla-central. a=merge 2018-02-27 11:58:55 +02:00
Valentin Gosu
84b854ce2c Bug 1433958 - Change code that sets nsIURI.userPass to use nsIURIMutator r=mayhemer
* Code in XMLHttpRequestMainThread is converted to set the username and password individually. This is because when the parameters are empty, it ended up calling SetUserPass(":") which always returns an error.

MozReview-Commit-ID: 3cK5HeyzjFE

--HG--
extra : rebase_source : f34400c11245d88648b0ae9c196637628afa9517
2018-02-26 20:43:46 +01:00
Grigory Kruglov
d5f0195299 Bug 1408710 - Don't pass around GUIDs of individual record store success, just an aggregate counter r=rnewman
We don't use these GUIDs anywhere, and this change lets us kill off some expensive data structures necessary
to maintain lists of successfully uploaded GUIDs, particularly during an upload.

MozReview-Commit-ID: F0kcY8o8DUw

--HG--
extra : rebase_source : e7443ffabde02059008e6c833ee52c45e206ec81
2018-02-26 15:12:21 -05:00
Grigory Kruglov
3d46434d5e Bug 1408710 - Serialize RecordsChannel r=rnewman
This patch does two things:
- serializes flow of records through the RecordsChannel
- simplifies the batching logic

The two are connected: rather than queuing records in ConcurrentLinkedQueue, we now buffer
downloaded records in an ArrayList, and deliver them to the receiving repository all at once.

Doing this work right at the channel level lets us kill off the buffering middleware.

An addition of a NonBufferingSyncStage lets individual SyncStages use a RecordsChannel which
doesn't perform any kind of buffering. Prior, stages did this by wrapping their receiving repositories
in the buffering middleware.

The main goal is to speed up the flow of records, keep within the same memory footprint
and do some simplification in the process.
This patch explicitly does not address the delegated nature of fetch and store, which is now largely irrelevant.

MozReview-Commit-ID: J2afmgr1Td1

--HG--
extra : rebase_source : 62f5f7940bb8db9a18704edfd0b9cb38eb410b71
2018-02-26 15:12:34 -05:00
Nick Alexander
d825eb0d47 Bug 1439742 - Allow {AB_CD} and {AB_rCD} in LOCALIZED_GENERATED_FILES. r=ted.mielczarek
There are a lot of choices and moving pieces in this commit.  I elected
to include the mechanics and the target use case in the same commit so
that readers can compare and contrast the implementation and final
expression in one review window.

- Initially, I wanted to make the {AB_CD} substitutions in
LOCALIZED_FILES and not in LOCALIZED_GENERATED_FILES.  However, I ran
into conceptual blockers doing this.  Fundamentally, LOCALIZED_FILES
is FINAL_TARGET_FILES, and my use case should _not_ be putting files
anywhere near dist/bin.  In addition, LOCALIZED_FILES
(FINAL_TARGET_FILES) is handled using manifests, which would need to
grow locale-aware functionality to handle this.  That's not desirable.
In addition, if we use manifests, then we lose the powerful locality
of |mach build mobile/android{/base}| re-generating changed
locale-dependent resources.  This is similar to how the build system
plumbs dist/idl manifest processing throughout the build: we're
repairing local workflows after moving work into a global process.
For these reasons, this doesn't support {AB_CD} in LOCALIZED_FILES.

- There is even another layer of complexity!  There are two axes
involved with these files: AB_CD controls localization and the Make
target controls destination.  For the record, it is:

regular builds - AB_CD unset
multi-locale builds - AB_CD set
single-locale repacks - AB_CD set

For the record, the existing logic (before any changes) is:

regular builds - Make target is `libs` in mobile/android/base/locales
multi-locale builds - Make target is `chrome-%` in mobile/android/base/locales
single-locale repacks - Make target is `libs` in mobile/android/base/locales

This commit adds targets for both destinations, and uses Make
chrome-%:: and libs:: magic to control what is invoked in the various
situations.  Tricky!

- I added MERGE_RELATIVE_FILES in order to be able to follow-up this
patch with more patches that will get rid of
m/a/base/locales/{moz.build,Makefile.in} altogether, and fold this work
into m/a/base.  As it stands, we're already reaching from
m/a/base/locales all the way out to
mobile/locales/.../region.properties, so the existing code doesn't
follow the layout expected between mozilla-central and
l10n-central/$(AB_CD).  But that'll impedance will get worse as we
improve the build system dependencies, not better, so we should grow
support for localized resources that aren't exactly as expected.

- I chose to follow Python's syntax for string substitutions.  I
would have preferred to mark files that should be localized with a
leading '%'... but I took that for filesystem absolute paths in
moz.build files already.  I also considered @AB_CD@ to echo the
preprocessor, but didn't want to open the door to an expecation that
_all_ preprocessor DEFINEs will work in the way {AB_CD} does.

- The generate_*py script changes required a bit of a hack to "turn
off" locale dependent resources.  This would have been nicer if we had
marked localized resources with '%'... but we didn't.  See the
--fallback flag.  The real reason this is needed is that we're doing
work which is more like the work of compare-locales (merging
locale-dependent resources) at build-time rather than repack time.  I
don't know why that's the case -- probably when we (I) implemented it,
compare-locales and the whole l10n process was entirely opaque.  It's
not worth changing it now, so we use this --fallback flag approach.

- I didn't get to tup support.  This should gently fail without
breaking tup builds: any {AB_CD} substitutions just won't be
expanded.  I haven't a clue how this should work in tup in the future
(or, more generally, how to make any sense of repacks without
declaring the full set of expected locales at configure time.)

- strings.xml can't be a LOCALIZED_PP_FILES, since we need to
customize the output location based on AB_rCD, and since we need a
little more flexibility than PP_FILES gives for our inputs.

MozReview-Commit-ID: MyfIkNSEzt

--HG--
rename : python/mozbuild/mozbuild/test/backend/data/localized-generated-files/en-US/localized-input => python/mozbuild/mozbuild/test/backend/data/localized-generated-files-AB_CD/en-US/localized-input
rename : python/mozbuild/mozbuild/test/backend/data/localized-generated-files/foo-data => python/mozbuild/mozbuild/test/backend/data/localized-generated-files-AB_CD/foo-data
rename : python/mozbuild/mozbuild/test/backend/data/localized-generated-files/generate-foo.py => python/mozbuild/mozbuild/test/backend/data/localized-generated-files-AB_CD/generate-foo.py
rename : python/mozbuild/mozbuild/test/backend/data/localized-generated-files/en-US/localized-input => python/mozbuild/mozbuild/test/backend/data/localized-generated-files-AB_CD/inner/locales/en-US/localized-input
rename : python/mozbuild/mozbuild/test/backend/data/localized-generated-files/moz.build => python/mozbuild/mozbuild/test/backend/data/localized-generated-files-AB_CD/moz.build
rename : python/mozbuild/mozbuild/test/backend/data/localized-generated-files/non-localized-input => python/mozbuild/mozbuild/test/backend/data/localized-generated-files-AB_CD/non-localized-input
extra : rebase_source : 816b6f220758f2bb3bdd3ec81a2cb02269c6de5b
2018-02-21 17:12:17 -08:00
Nick Alexander
28bdb5086a Bug 1439742 - Pre: Lift AB_rCD to ambient Make environment. r=ted.mielczarek
I wanted to lift this next to the definition of AB_CD, but that
doesn't allow to use it in a backend.mk file, due to the order in
which Makefile, config.mk, rules.mk, and backend.mk are processed.
Therefore, I've put it in a tiny include file, so that it can be used
by a Makefile and a backend.mk file.

This allows the `RecursiveMake` backend to owning defining AB_rCD in
backend.mk files, while not requiring consumers to arrange for AB_rCD
in a sibling Makefile.in file.

Other build backends will need to arrange for AB_rCD themselves: see
following commits.

MozReview-Commit-ID: I7GIzRbCCtf

--HG--
extra : rebase_source : 3277fedb43bc3d8007287c223554a085dae2f198
extra : source : 854c0f43a1f74b4e22aa7638b407580240c90dd5
2018-02-20 12:28:21 -08:00
Mark Banner
294979dc32 Bug 1441460 - ESLint's no-define-cc-etc looks at the wrong property item when checking for Cc/Ci/Cu/Cr usage. r=florian
MozReview-Commit-ID: IkSkCWqBHOn

--HG--
extra : rebase_source : 6b3a2977d4b157aea54c6e3f6960d3673e751a34
2018-02-23 20:42:17 +00:00
Gabriele Svelto
f167c2f3e8 Bug 1307153 - Add stack traces to the crash pings in Fennec; r=jchen,ted.mielczarek
MozReview-Commit-ID: ZJKUwHFsuK

--HG--
extra : amend_source : 9a57ff1d2cf15391f1f30fa63585220adbb1a49b
2018-01-19 16:48:00 +01:00
Andrew Swan
aeee120808 Bug 1402064 Switch to modern AMO metadata API r=kmag
Switch from the old XML-based AMO metadata API to the modern JSON based
API.  This turned into something between a modest update and complete
rewrite.  Most notably, external APIs became (mostly) promise-based.  The
exception is getCachedAddonById() which XPIInstall.jsm requires a
synchronous callback from.

Also, hopefully we will be able to get rid of a bunch of this metadata
handling soon.  If this code had a long life ahead of it, the unit tests
could use some more attention, but I mostly did the minimum here just to
keep them running for now with the expectation that we'll be able to get
rid of them within some small number of months.

MozReview-Commit-ID: 3DRaBdWGaiJ

--HG--
rename : services/sync/tests/unit/addon1-search.xml => services/sync/tests/unit/addon1-search.json
rename : services/sync/tests/unit/bootstrap1-search.xml => services/sync/tests/unit/bootstrap1-search.json
rename : services/sync/tests/unit/missing-sourceuri.xml => services/sync/tests/unit/missing-sourceuri.json
rename : services/sync/tests/unit/missing-xpi-search.xml => services/sync/tests/unit/missing-xpi-search.json
rename : services/sync/tests/unit/rewrite-search.xml => services/sync/tests/unit/rewrite-search.json
rename : services/sync/tests/unit/systemaddon-search.xml => services/sync/tests/unit/systemaddon-search.json
extra : rebase_source : f25d78b938768041c5c05b72a1f7ff3a7dee8275
2018-01-10 14:18:20 -08:00
Andrew Swan
c95780c281 Bug 1402064 AddonRepository spring cleaning r=kmag
Remove unused imports of AddonRepository.jsm plus some more
leftover bits from in-browser search results.

MozReview-Commit-ID: AZyAtnHvaMP

--HG--
extra : rebase_source : 6085ed3a22bd9a43f8882f604b97aa55b8b788c5
2018-01-10 11:41:26 -08:00
Grigory Kruglov
8be2511345 Bug 1408710 - Pre: for clarity, rename session's delegateQueue to a more appropriate name r=rnewman
From the point of view of the session itself, this queue is named correctly (e.g. session's abort and finish
methods make sure invoke success and failure delegate methods from this queue).

However, from the point of view of every concrete implementation of the session, the current naming isn't clear.

New name is for symmetry with the store queue, and the above ambiquity is addressed in the comment.

MozReview-Commit-ID: 61j7ZCNdr4x

--HG--
extra : rebase_source : 5f4092c2629414fc4f9051d8f8f0c113f1d6910d
2018-01-05 16:54:53 -05:00
Grigory Kruglov
dca9d6527a Bug 1408710 - Pre: Just use the delegateQueue in the downloader instead of creating a new one r=rnewman
This is a clean-up. Everywhere else, we run the fetch tasks and corresponding delegates on the delegateQueue.

MozReview-Commit-ID: Kd8XZAclJIB

--HG--
extra : rebase_source : d789ac49c365336c104c4e66c9826bf387d85465
2018-01-05 16:41:20 -05:00
Tiberius Oros
52975bbb6f Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-02-27 00:24:00 +02:00
James Willcox
1b8562b7f2 Bug 1410651 - Cleanup GeckoView javadoc generation r=jchen
MozReview-Commit-ID: ItS8f9X1moT
2018-02-26 14:25:15 -05:00
Mark Banner
6afe18b30a Bug 1440379 - Tidy up ESlint no-unused-vars definitions wrt Ci/Cu/Cr/Cc usage for varsIgnorePattern. r=florian
MozReview-Commit-ID: HmliR8iNRDq

--HG--
extra : rebase_source : 483ae0b54b9e781cceac2accdfb2255d725ace6a
2018-02-22 16:55:36 +00:00
Narcis Beleuzu
5968b0947f Backed out 10 changesets (bug 1410456) for Android mochitest crashes, e.g. in test_postMessages.html. CLOSED TREE
Backed out changeset 7ec175446efd (bug 1410456)
Backed out changeset 94457911bb24 (bug 1410456)
Backed out changeset 5248a21216ae (bug 1410456)
Backed out changeset f182ab7885db (bug 1410456)
Backed out changeset e482347bdae3 (bug 1410456)
Backed out changeset f7b646045e06 (bug 1410456)
Backed out changeset 6a8ed4bf5d2f (bug 1410456)
Backed out changeset 1a9c687ec277 (bug 1410456)
Backed out changeset 82f6667c6758 (bug 1410456)
Backed out changeset 7bf358e3e01b (bug 1410456)
2018-02-26 15:58:20 +02:00
Eugen Sawin
1561bd419e Bug 1410456 - Allow OMT access to Android system audio properties. r=esawin
MozReview-Commit-ID: 4YkiuzNkNu5

--HG--
extra : rebase_source : 878486dabb87c8913fbb4c3b4002483158c467d4
2018-02-20 15:37:06 +02:00
Sebastian Hengst
7be9fed7d0 merge mozilla-inbound to mozilla-central. a=merge 2018-02-24 02:58:35 +02:00
Florian Quèze
682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Nick Alexander
a6bf0623be Bug 1440430: Disable --without-gradle configure option. r=chmanchester
We don't remove the configure option entirely for two reasons:

1) --with-gradle is still used in automation to specify a particular
Gradle binary, which is functionality we want to keep;

2) developers might have --with-gradle specified, and we can save them
having to remove it explicitly.  There's a downside to this, however:
stale configure options can hang around indefintely.  We can evolve
the configure option in the future.

MozReview-Commit-ID: D4sSclJ12j8

--HG--
extra : rebase_source : 3e5ebbf98347b5f2abfb67d2c50004aadc8bd145
2018-02-22 11:38:27 -08:00
shindli
830ec14b77 Backed out changeset 8cf686bb2f72 (bug 1435988) for failing revtest in moz-range-progress-1.html
--HG--
extra : rebase_source : 7f94ef8feca57fb1f73ff0039df286b14f162de7
2018-02-23 19:41:28 +02:00
Kevin Brosnan
dd0754ea0a Kevin Brosnan - Bug 1435988 disable border radius styling on the range element - r=snorp
MozReview-Commit-ID: G9Hy7hXvAKY

--HG--
extra : rebase_source : 40d8a7605136e32c8822ec37d06355984ead9c3d
2018-02-16 13:21:07 -08:00
Jim Chen
3bf8f7cdd1 Bug 1439410 - 5. Add test for GeckoSessionTestRule; r=snorp
Add a test for functionalities of GeckoSessionTestRule.

MozReview-Commit-ID: 9k9Fh1una20

--HG--
extra : rebase_source : f2558c452febf9f333ec4fed1955a0285ca9b246
2018-02-22 18:39:12 -05:00
Jim Chen
e59ef3e43d Bug 1439410 - 4. Add JUnit4 rule for testing GeckoSession; r=snorp
Add a rule for setting up a GeckoSession for a JUnit4 test and letting
the test wait for listener invocations and to verify listener behavior.

MozReview-Commit-ID: 20ij409yY1Z

--HG--
extra : rebase_source : 50f8a01aad41938910710421b97d5dcc97594a06
2018-02-22 18:39:12 -05:00
Jim Chen
448584018f Bug 1439410 - 3b. Add GeckoSession.getScrollListener(); r=jchen
Add GeckoSession.getScrollListener() so GeckoSessionTestRule can use it.

MozReview-Commit-ID: DLDlz5wz3cP

--HG--
extra : rebase_source : c196810da282f4ede6cb753081ef4d38af862909
2018-02-22 18:39:11 -05:00
Jim Chen
9c6f644de4 Bug 1439410 - 3a. Make GeckoSessionSettings.Key<> public; r=snorp
GeckoSession consumers may want to refer to individual keys through a
GeckoSessionSettings.Key<> variable.

MozReview-Commit-ID: HK5wcs0uugD

--HG--
extra : rebase_source : 23e2489eed328bf0a08358c58c633d527d8a85c2
2018-02-22 18:39:11 -05:00
Jim Chen
8f827ce7f6 Bug 1439410 - 2. Add copy constructor for GeckoSessionSettings; r=snorp
Right now there's no good way for a GeckoSession consumer to make a copy
of a GeckoSessionSettings object.

MozReview-Commit-ID: 199K5J51Y9x

--HG--
extra : rebase_source : 99c81c34ab2203e3517e07d286f865f5e93869c8
2018-02-22 18:39:11 -05:00
Jim Chen
290fc0830c Bug 1439410 - 1. Enable Kotlin for geckoview tests; r=nalexander
Kotlin has several nice features for writing tests, such as lambdas and
default implementations for interface methods. This patch adds Kotlin
support to the geckoview module build.gradle. We don't want to use
Kotlin in non-test code yet, so the patch ensures that only test code
contains Kotlin files.

MozReview-Commit-ID: FcQiHj20xlB

--HG--
extra : rebase_source : e304d25d09291bc0a3faa29bf36f9d01eadc8524
2018-02-22 18:39:11 -05:00
James Willcox
bf50533bd6 No bug, followup for linting failures r=me
MozReview-Commit-ID: At5TO40eKhJ
2018-02-22 09:52:14 -06:00
James Willcox
a47a1c6678 Bug 1291387 - Make mochitest and reftest work against TestRunnerActivity r=gbrown,jchen
Pass --appname org.mozilla.geckoview.test to 'mach mochitest' or
'mach reftest'. This runs the tests without e10s currently.

MozReview-Commit-ID: 7TIvA3zRCw2
2018-02-22 09:18:37 -06:00
James Willcox
75c6e9c7ff Bug 1291387 - Handle errors when using EventDispatcher.sendRequestForResult in GeckoView JS modules r=jchen
MozReview-Commit-ID: EOLO59ZbTOR
2018-02-22 09:18:36 -06:00
James Willcox
ef799498f8 Bug 1291387 - Reply with an error in GeckoSessionHandler when no listener registered r=jchen
This eliminates a race where the JS side thinks it has a listener, and
expects a reply, but will never get one because it was unregistered
while the message was in-flight. GeckoSessionHandler dispatches
on the Android UI thread, which is where listeners are set/unset, so
we do not need any synchronization.

MozReview-Commit-ID: 5W3hsQ1cmb7
2018-02-22 09:18:36 -06:00
James Willcox
158da574a3 Bug 1291387 - Log GeckoThread state transitions r=jchen
It may be nice to also log failed state transitions, but we seem to have too
many of those for it to be very useful right now.

MozReview-Commit-ID: 7z4UMyWQp2F
2018-02-22 09:18:35 -06:00
James Willcox
2562ac0bd4 Bug 1422019 - Stand up initial GeckoView tests r=nalexander,jchen
This adds a new geckoview_test module, which contains a
test runner Activity. We can then use JUnit4 + Espresso to
exercise the GeckoView APIs (such as GeckoSession).

MozReview-Commit-ID: FEMAZhpasLW
2018-02-22 09:18:35 -06:00
Nick Alexander
f994854ec0 Bug 1422019 - Fix errors in |mach android archive-geckoview|. r=snorp
MozReview-Commit-ID: Gzbv1Y6agsM
2018-02-22 09:18:34 -06:00
Nick Alexander
872fdab41b Bug 1422019 - Fix diagnostic requiring |mach package|. r=snorp
No idea when this broke -- probably the transition to Gradle 4 -- but
this seems to work.  As suggested at
https://discuss.gradle.org/t/copy-task-how-to-fail-on-no-source/25581/2.

MozReview-Commit-ID: 8oGazgLZT3J
2018-02-22 09:18:34 -06:00
James Willcox
9ba68c37c5 Bug 1422019 - Make resource://android/asset work again with GeckoView r=jchen
MozReview-Commit-ID: FYD4cOaNBza
2018-02-22 09:18:33 -06:00
James Willcox
5201ec1c4f Bug 1439747 - Add GeckoSession.ContentListener.onCloseRequest() r=jchen,droeh
MozReview-Commit-ID: CPUVfe1LKDW
2018-02-22 09:18:33 -06:00
James Willcox
e7c0c03f32 Bug 1432485 - Add GeckoSession.NavigationListener.onNewSession r=jchen,esawin
This allows apps to decide which GeckoSession should handle a load that
will be in a new window (e.g., window.open()).

MozReview-Commit-ID: BkJM93489Ga
2018-02-22 09:18:32 -06:00
Dorel Luca
6ad641c5c4 Merge mozilla-inboud to mozilla-central. a=merge 2018-02-22 11:59:54 +02:00
Eugen Sawin
05eba99d35 Bug 1432235 - [1.2] Move GeckoView API classes to org.mozilla.geckoview. r=snorp,jchen 2018-02-22 00:46:26 +01:00
Grigory Kruglov
09f51f2e63 Bug 1429735 - Pre: cleanup some unused helper methods r=nalexander
MozReview-Commit-ID: vpnFdFYf4V

--HG--
extra : rebase_source : 16b8edf20f862f9f7dbb9feb6124d6d104424bb5
2018-01-23 16:05:11 -05:00
Nick Alexander
5d736e0310 Bug 1439459 - Expose MOZ_ANDROID_GOOGLE_PLAY_SERVICES to AndroidManifest.xml. r=Grisha
This was oversight when landing Bug 1419581, coupled with dedicated
testing by Grisha.  We don't expose all CONFIG values as DEFINES by
default, and I forgot to add the relevant value to the exposure list.

MozReview-Commit-ID: GUYNWampBAJ

--HG--
extra : rebase_source : f946f2630f2e9120d03b05a4677815e73ab6851a
2018-02-20 10:06:13 -08:00