The nsGIOService now provides GetAppsForURIScheme which is used to append handlers
for specific scheme in handler list dialog (toolkit/mozapps/handling/content/dialog.js)
and also in Applications section in preferences. In case the default system handler
or user added handler has same name as one of the GIO handlers, the GIO handler
is not appended. The check for not adding handler is by using handler name.
The nsGIOMimeApp class now implements nsIHandlerApp interface. Instead overloaded
GetName methods (nsCString and nsString) we now use nsString variant everywhere.
This require change of nsGNOMERegistry::GetFromType which if fact leads to code
simplification.
The implementation of nsGNOMEShellService::SetDefaultBrowser has been changed
because implementation of CreateAppFromCommand has changed.
The CreateAppFromCommand no longer tries to find the application,
for that FindAppFromCommand has been introduced.
MozReview-Commit-ID: KmfFWRPqV3
--HG--
extra : source : 9660ff09c2212cb7456e50cb166752f42e0a0669
extra : amend_source : 3c5fc61fe09b9b68bdfbb9683335cedd4d706744
The nsGIOService now provides GetAppsForURIScheme which is used to append handlers
for specific scheme in handler list dialog (toolkit/mozapps/handling/content/dialog.js)
and also in Applications section in preferences. In case the default system handler
or user added handler has same name as one of the GIO handlers, the GIO handler
is not appended. The check for not adding handler is by using handler name.
The nsGIOMimeApp class now implements nsIHandlerApp interface. Instead overloaded
GetName methods (nsCString and nsString) we now use nsString variant everywhere.
This require change of nsGNOMERegistry::GetFromType which if fact leads to code
simplification.
The implementation of nsGNOMEShellService::SetDefaultBrowser has been changed
because implementation of CreateAppFromCommand has changed.
The CreateAppFromCommand no longer tries to find the application,
for that FindAppFromCommand has been introduced.
MozReview-Commit-ID: KmfFWRPqV3
--HG--
extra : rebase_source : 36d254cbc45cbe6929cc469cd531211f7ddd6a64
In the test of temporary installation of webextension experiments,
the test certificate shim code was marking the test addon as
privileged which allowed it to be loaded, fix that here.
MozReview-Commit-ID: IaZshrMNr3v
--HG--
extra : rebase_source : 34bcd94c6e687c63aadce7cb8d6b07a9ce525597
The return value from Cu.import() does not include lexically scoped
symbols so stop using it here. Also stop using Extension.generate()
while we're here.
MozReview-Commit-ID: HnX3RGgDHbR
--HG--
extra : rebase_source : b4e238f2a5f1c9dce838b4dd70447edd9f401c10
Also remove related code that was only used from here including
stuff related to marketplace purchases, etc.
MozReview-Commit-ID: ESX78tVQK7M
--HG--
extra : rebase_source : 56d956168f75cdc40fd3df057e41493f80733352
Also consolidated the two .ini files in toolkit/mozapps/extension/test/browser
since we only run these tests in tabs now.
MozReview-Commit-ID: HHwM4Q1K5C8
--HG--
extra : rebase_source : 6db3527ee6973946d188fa70dc8af1c008094d49
These magic locations evolve over time. Baking them into
moz.configure is the easiest way to share them across the build
system, and pushing them into a new |mach android *| command continues
a pattern that has been very successful.
MozReview-Commit-ID: CyxVQ0LHHgl
--HG--
extra : rebase_source : 8350d71665f0126aa4ee2c8fec32c4b8e34dc772
These magic locations evolve over time. Baking them into
moz.configure is the easiest way to share them across the build
system, and pushing them into a new |mach android *| command continues
a pattern that has been very successful.
MozReview-Commit-ID: CyxVQ0LHHgl
--HG--
extra : rebase_source : 8350d71665f0126aa4ee2c8fec32c4b8e34dc772
Maybe there was a time where both updatecommon and
updatecommon-standalone were used in the same configuration, but it's
currently not the case. So the distinction between both is not
necessary, and updatecommon can just become the standalone version of
itself on Windows.
--HG--
extra : rebase_source : effa3c7aa3bbaab33b335f23a71a8807ef69ab59
The add-on included in this test was signed with SHA-256 by the AMO signing
infrastructure. (Note that its compatibility information targets xpcshell
specifically, so it can't be installed in Firefox.)
MozReview-Commit-ID: 5pjZYKnPeBh
--HG--
extra : rebase_source : 09fa697cd8c7a1347797c8743ec238093aa46fee
getActiveAddons can either return partial or full data for use by the Telemetry
Environment. This is just a spike that communicates that difference out of
XPIProvider and into the Environment so we know whether the DB has been loaded.
MozReview-Commit-ID: 4Y5mq5aM6uu
--HG--
extra : rebase_source : 989d47fb68bac5e33d24782dfd09eb603a2067fc
Unfortunately we have a number of add-on installation tests that rely on
unpacked addons verifying as signed. The test infrastructure achieves this by
monkey-patching nsIX509CertDB.verifySignedDirectoryAsync to always succeed.
These tests are, in general, not actually testing the successful verification of
signed unpacked add-ons but rather other aspects of add-on installation,
updating, etc.. Some of these tests are certainly no longer relevant now that
legacy add-ons aren't supported, but we don't have the time to go through all of
them at the moment (this blocks updating add-on signature verification to use
COSE signatures, which we need to ship in 59 or we're probably not shipping at
all).
MozReview-Commit-ID: 3TVPK703mUy
--HG--
extra : rebase_source : 5bf0b72a4d7c8ade702334345fdc3bf6a8761b15
This is a large patch which tries to switch many of the external consumers of
nsGlobalWindow to instead use the new Inner or Outer variants.
MozReview-Commit-ID: 99648Lm46T5
Single-locale repacks do the following:
Download existing APK; unzip APK; update l10n resources; |mach package| with IS_LANGUAGE_REPACK=1.
This is pretty hard to accommodate, but we can try. The key issues
here are to recognize when IS_LANGUAGE_REPACK=1 and not ask for l10n
resources (in particular, strings.xml) to be generated.
We do need to include the freshly built classes.dex when repackaging,
because newer Gradle/aapt doesn't preserve the R.java IDs.
MozReview-Commit-ID: 9FvQtmPOUjg
--HG--
extra : rebase_source : b0440ceb318662bf3c08f2139c51dae5775a6b38
Single-locale repacks do the following:
Download existing APK; unzip APK; update l10n resources; |mach package| with IS_LANGUAGE_REPACK=1.
This is pretty hard to accommodate, but we can try. The key issues
here are to recognize when IS_LANGUAGE_REPACK=1 and not ask for l10n
resources (in particular, strings.xml) to be generated.
We do need to include the freshly built classes.dex when repackaging,
because newer Gradle/aapt doesn't preserve the R.java IDs.
MozReview-Commit-ID: 9FvQtmPOUjg
--HG--
extra : rebase_source : 6a34a8c299138ea39c6703f334c8fd5f49b03237
This commit adds two new xpcshell tests, both of them testing whether the
security state in TransportSecurityInfo includes the new
STATE_CERT_DISTRUST_IMMINENT flag under the correct circumstances.
The first test, test_symantec_apple_google.js, tests the four combinations of
certs that chain to an affected Symantec root: with/without a whitelisted
intermediate, and before/after the notBefore cutoff date.
The second test, test_symantec_apple_google_unaffected.js, tests an unrelated
ca->intermediate->ee chain that does not chain to an affected root, and ensures
the flag is not set.
This patch adds SymantecSanctionsServer to the mozbuild and xpcshell test
infrastructure files to ensure it runs properly on TaskCluster, too.
MozReview-Commit-ID: GtUXH2VFFh
--HG--
rename : security/manager/ssl/tests/unit/bad_certs/default-ee.key => security/manager/ssl/tests/unit/test_symantec_apple_google/default-ee.key
rename : security/manager/ssl/tests/unit/bad_certs/default-ee.key.keyspec => security/manager/ssl/tests/unit/test_symantec_apple_google/default-ee.key.keyspec
rename : security/manager/ssl/tests/unit/bad_certs/default-ee.pem => security/manager/ssl/tests/unit/test_symantec_apple_google/default-ee.pem
rename : security/manager/ssl/tests/unit/bad_certs/default-ee.pem.certspec => security/manager/ssl/tests/unit/test_symantec_apple_google/default-ee.pem.certspec
rename : security/manager/ssl/tests/unit/tlsserver/cmd/BadCertServer.cpp => security/manager/ssl/tests/unit/tlsserver/cmd/SymantecSanctionsServer.cpp
extra : rebase_source : f399bca5a13db3efa5bbaa5136c8effc3948ed5e
This patch just forwards invocations of the bootstrap update() and
uninstall() methods to events that other parts of the WebExtension
framework can listen for. We have an existing event that fires while
an extension is being uninstalled. This event was named "uninstall"
but it gets renamed here to "onUninstalling" to disambiguate the two
events.
MozReview-Commit-ID: BIpIR8n9HBM
--HG--
extra : rebase_source : b191d43279129da6fc7f67b7e7960b8b20dca6b8
When we are updating versions of an extension, instead of
calling uninstall() on the old version followed by calling
install() on the new version, we now call update() once with
details about the old and new versions.
This logic is only applied for webextensions, any other
bootstrapped extensions retain the old behavior.
MozReview-Commit-ID: EwdvGATG0rK
--HG--
extra : rebase_source : 60ead06460340874c86c109bcaa4b61be1717dd1
Minor note:
reftests should've turned off uploadEnabled in the first place.
reftests should have unified telemetry on. It's the future.
MozReview-Commit-ID: 9spzuUAXwwP
Right now, NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR expects singleton
constructors to return already-addrefed raw pointers, and while it accepts
constructors that return already_AddRefed, most existing don't do so.
Meanwhile, the convention elsewhere is that a raw pointer return value is
owned by the callee, and that the caller needs to addref it if it wants to
keep its own reference to it.
The difference in convention makes it easy to leak (I've definitely caused
more than one shutdown leak this way), so it would be better if we required
the singleton getters to return an explicit already_AddRefed, which would
behave the same for all callers.
This also cleans up several singleton constructors that left a dangling
pointer to their singletons when their initialization methods failed, when
they released their references without clearing their global raw pointers.
MozReview-Commit-ID: 9peyG4pRYcr
--HG--
extra : rebase_source : 2f5bd89c17cb554541be38444672a827c1392f3f
Once we add fallback chain to GetRequestedLocales we can slightly improve the
locale negotiation for extensions. I made it tighter against just `en-US` because
in the future it is possible that RequestedLocales fallback chain will not contain
en-US in some scenarios, and it seems that for WebExtensions en-US should be the
last resort no matter what.
The other change is a fix to a regression I introduced when switching to LocaleService,
that somehow noone noticed.
MozReview-Commit-ID: FH6cePcoi0R
--HG--
extra : rebase_source : 7e253fb940c153c3522a6aa41139fbf703c7266b
Once we add fallback chain to GetRequestedLocales we can slightly improve the
locale negotiation for extensions. I made it tighter against just `en-US` because
in the future it is possible that RequestedLocales fallback chain will not contain
en-US in some scenarios, and it seems that for WebExtensions en-US should be the
last resort no matter what.
The other change is a fix to a regression I introduced when switching to LocaleService,
that somehow noone noticed.
MozReview-Commit-ID: FH6cePcoi0R
--HG--
extra : rebase_source : 52f0b6915dbf86a72e3c9f07218e7c244d191e71
When the same addon is installed in multiple locations and the copy in
the highest priority location is removed, we reveal the next-highest priority
copy. Since we're just changing addon versions, this sequence should look
like an upgrade or downgrade. This patch fixes the reason parameter passed
to both instance's bootstrap methods to reflect that.
MozReview-Commit-ID: DfQadQFufZE
--HG--
extra : rebase_source : 5be9c3da3c4f10e9ea7ce1b29da00b68e4a7bcf4
This is needed in addition to "version" as, for some channel, it will report
the release suffix.
MozReview-Commit-ID: BT2Vxm3Q2nK
--HG--
extra : rebase_source : 57572e0005f4f49c47813d87070a3aef4cab818a
The goal is to use a newer Android-Gradle build plugin version (2.3.3
is latest stable). That requires a modern Gradle (anything 3.3+, but
3.4.1 is the default from my Android Studio), and also a newer
build-tools (25.0.3 is latest stable).
The locations of lint output changed, and we want to use the standard
output location because it's difficult to accommodate variant details
in custom names. We change the location of findbugs output to follow
suit.
This requires either:
- fixing lint errors
- adding to the lint whitelist
- using the new lint baseline
It's best to use the new lint baseline, which will happen in the next commit.
MozReview-Commit-ID: D19FzIDCJrE
--HG--
extra : rebase_source : 12d132c0c3e0dbe2b8873b31360ea96d612de44c
This avoids the need for numerous 8-to-16-bit and 16-to-8-bit string
conversions.
The patch also introduces a higher-order macro, FOR_EACH_CSP_KEYWORD, which
defines all the stuff about the keywords in a single place and makes the code
nicer.
--HG--
extra : rebase_source : b0f655546aa397749bb18dc7d6d27fbc12fe8fca
This patch introduces a stub gBrowser object which allow a WebExtensions options_ui page
to open a tab modal using alert/prompt/confirm.
The about:addons page is defined at toolkit level but the TabModalPromptBox is defined
at browser level, and so to be able to provide a TabMobalPromptBox from the about:addons
page this patch uses the implementation provided by the window that contains the
about:addons tab, if any.
MozReview-Commit-ID: m6khgJyMs
--HG--
extra : rebase_source : 1b5b776084e8d1dc14484542099ebfff98b674c7
Webextension-formatted langpacks now store their list of chrome
registry resources in startupData so that those resources can be
registered early in startup.
MozReview-Commit-ID: 80eOiPKLlWu
--HG--
extra : rebase_source : b00abc0484e6b41bfb1d17c543a450dc737a6b30
If a non-null value is stored in this property, its contents (which
must be json serializable) are stored in addonStartup.json and are
then passed to the addon's bootstrap startup() method. This is meant
for data that must be available synchronously during browser startup.
Of course addonStartup.json is read synchronously during startup so
this should be used sparingly.
MozReview-Commit-ID: ALS1CcYbH92
--HG--
extra : rebase_source : 2469fda13f82c3e3837123f75afb5bc6029ed55c
By using the PartialConfigEnvironment, the clients of buildconfig will
depend on config.statusd/ files instead of config.status directly.
Clients can access substs and defines using buildconfig.substs['FOO'] or
buildconfig.defines['BAR'], and then collect file-level dependencies for
make using buildconfig.get_dependencies(). All GENERATED_FILES rules
already make use of this because file_generate.py automatically includes
these dependencies (along with all python modules loaded).
As a result of this commit, re-running configure will no longer cause
the world to be rebuilt. Although config.status is updated, no build
steps use config.status directly and instead depend on values in
config.statusd/, which are written with FileAvoidWrite. Since those
files are not official targets according to the make backend, make won't
try to continually rebuild the backend when those files are out of date.
And since they are FileAvoidWrite, make will only re-run dependent steps
if the actual configure value has changed.
As a result of using JSON to load data from the config.statusd
directory, substs can be unicode (instead of a bare string type).
generate_certdata.py converts the subst manually to a string so the
value can be exported to the environment without issue on Windows.
Additionally, patching the buildconfig.substs dict no longer works, so
the unit-symbolstore.py test was modified to patch the underlying
buildconfig.substs._dict instead.
The other files that needed to be modified make use of all the defines
for the preprocessor. Those that are used during 'mach build' now use
buildconfig.defines['ALLDEFINES'], which maps to a special
FileAvoidWrite file generated for the PartialConfigEnvironment.
MozReview-Commit-ID: 2pJ4s3TVeS8
--HG--
extra : rebase_source : d6bb0208483f9f043e7be1b36907ca13243985f8