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

2737 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione a75561bd62 Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj
This is a follow-up to bug 1409249. There are a lot of places where our
factory singleton constructors either don't correctly handle their returned
references being released by the component manager, or do handle it, but in
ways that are not obvious.

This patch handles a few places where we can sometimes wind up with dangling
singleton pointers, adds some explanatory comments and sanity check
assertions, and replaces some uses of manual refcounting with StaticRefPtr and
ClearOnShutdown.

There are still some places where we may wind up with odd behavior if the
first QI for a getService call fails. In those cases, we wind up destroying
the first instance of a service that we create, and re-creating a new one
later.

MozReview-Commit-ID: ANYndvd7aZx

--HG--
extra : rebase_source : acfb0611a028fef6b9387eb5d1d9e285782fbc7c
2017-10-29 16:02:40 -07:00
Sylvestre Ledru f8b1d9ab46 Bug 1278282 - update of the moz.build files to remove gtk2 references r=lsalzman
MozReview-Commit-ID: FO1wEHzOkuN

--HG--
extra : rebase_source : ac7e61cf47d013de882048740c889735a0a7cad8
2018-01-10 10:04:59 +01:00
Swapnil f42233b3e8 Bug 1396601 - Removed all instances of MOZ_ENABLE_CONTENTACTION from .cpp files and moz.build file. r=paolo
MozReview-Commit-ID: 467SgoTlsFJ

--HG--
extra : rebase_source : dadd8c2a2cad6f96605390d7aac2512714bf58c1
2018-01-08 23:48:56 +05:30
Andrea Marchesini 51cbe0791e Bug 1428745 - Remove support for version parameter from script loader - tests, r=jonco
* * *
Bug 1428745 - Remove support for version parameter from script loader - fixing a broken depending test - CLOSED TREE, r=me
* * *
Bug 1428745 - Remove support for version parameter from script loader - fixing WPTs - CLOSED TREE, r=me
* * *
Bug 1428745 - Remove support for version parameter from script loader - fixing tests - CLOSED TREE, r=me
2018-01-09 17:00:49 +01:00
Narcis Beleuzu 0cc8c52dcb Backed out 6 changesets (bug 1428745) for wpt failures on script-type-and-language-with-params.html. r=backout on a CLOSED TREE
Backed out changeset 9e84285278fe (bug 1428745)
Backed out changeset e199f1ccf64c (bug 1428745)
Backed out changeset dfb9af93ac53 (bug 1428745)
Backed out changeset 1d975770bd9a (bug 1428745)
Backed out changeset 1d5dc7dfd429 (bug 1428745)
Backed out changeset 4e53f251c5b8 (bug 1428745)
2018-01-10 00:37:59 +02:00
Andrea Marchesini 174498ca29 Bug 1428745 - Remove support for version parameter from script loader - tests, r=jonco 2018-01-09 17:00:49 +01:00
Valentin Gosu 0203cc4abd Bug 1426501 - Change C++ code to use NS_MutateURI when changing URI r=mayhemer
MozReview-Commit-ID: 4VzZlhWrtSJ

--HG--
extra : rebase_source : 9c872dc14c8e5f03e6354ab76c8bf750a7e10260
2018-01-08 15:20:35 +01:00
Jan Horak 8d50dc0b07 Bug 1297686 - List GIO handlers in the protocol handler list, in the handlers dialog, and in preferences. r=paolo
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
2017-12-29 07:27:42 +00:00
Cosmin Sabou 43e1d34ab4 Backed out changeset 9660ff09c221 (bug 1297686) for xpcshell failures at uriloader/exthandler/tests/unit/test_handlerService_json.js r=backout on a CLOSED TREE 2017-12-28 19:41:50 +02:00
Jan Horak 5b4fd25730 Bug 1297686 - List GIO handlers in the protocol handler list, in the handlers dialog, and in preferences. r=paolo
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
2017-12-28 15:25:32 +00:00
Florian Quèze 0f55cd45be Bug 1421992 - script-generated patch to replace do_execute_soon, do_print and do_register_cleanup with executeSoon, info and registerCleanupFunction, rs=Gijs. 2017-12-21 11:10:23 +01:00
Florian Quèze 032c961e0a Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Mark Banner 099e4fa549 Bug 1421458 - Add more initial configuration setup and prepare .eslintignore for enabling ESLint on more xpcshell-test directories. r=mossop
MozReview-Commit-ID: 4nbTuNNnAdZ

--HG--
extra : rebase_source : 7131f0ddad79d28615a5799c657972bd84a69180
2017-11-28 22:57:08 +00:00
Nika Layzell f1ac9bf744 Bug 1419597 - Part 18: Remove IsInnerWindow and IsOuterWindow methods, r=smaug
MozReview-Commit-ID: DAAm6tLubhJ
2017-11-23 13:12:13 -05:00
Tooru Fujisawa 4c6f4eda25 Bug 1416254 - Remove conditional catch consumers in uriloader/. r=mak 2017-11-23 14:22:19 +09:00
Blake Kaplan a7ba580113 Bug 1389836 - Don't recreate mHandlerInfo for every little change. r=bz
There are non-cost reference return values on IPDL structs. We should take
advantage of them in order not to recopy everything everytime something
changes.

MozReview-Commit-ID: D4hG2moE3f

--HG--
extra : rebase_source : 4edca9b1a808f99dd60be908bbb197757bf9b90a
2017-11-14 15:37:47 -08:00
Blake Kaplan 47a7f17127 Bug 1389836 - Push extensions from MIME info objects to the child. r=bz
It would be really nice to push all of this back up to the parent or to at
least make it asynchronous. I think it should be possible since we control
when we send the DOM events, but for the moment this should work.

With this patch, I extend ProxyMIMEInfo and HandlerInfo with information about
the available extensions for a given MIME type. On Linux, at least, we read
the system (in my case GNOME) registry in the child and handlers.json in the
parent finally merging them again in the child (in
ContentHandlerService::FillHandlerInfo). Even though I was unable to get my
mochitest to work, it did work well enough that I could verify that this patch
was getting all of the proper extensions to the nsContentAreaDragDrop.cpp
code.

MozReview-Commit-ID: AR3VayMUiDN

--HG--
extra : rebase_source : f9861e46e92fb7e8d297eff3e5d61a3c18912b47
2017-11-01 17:49:22 -07:00
Blake Kaplan 192a69cf57 Bug 1389836 - Put HandlerServiceChild in the proper namespace. r=bz
Non ns-prefixed classes are supposed to be in either the mozilla namespace or
a sub namespace (such as dom, css, or others).

MozReview-Commit-ID: 8bF6bP49NLG

--HG--
extra : rebase_source : bfa5e6da36c49ea7bb333eb58d168ef614c07c0b
2017-10-25 14:58:50 -07:00
Sebastian Hengst d61954557d merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: Ai6Y5GGfkfT
2017-11-04 10:58:24 +01:00
Christoph Kerschbaumer 6fbe557b4c Bug 1412824: Refactor MaybeCloseWindow and allow to reuse the window close code from within nsExternalHelperAppService as well as nsDSURIContentListener. r=smaug 2017-11-03 13:23:25 +01:00
J.C. Jones 0e002bccbd Bug 1409259 - Add a console warning for soon-to-be-distrusted roots r=keeler,ttaubert
This patch adds a new diagnostic status flag to nsIWebProgressListener,
STATE_CERT_DISTRUST_IMMINENT, which indicates that the certificate chain is
going to change validity due to an upcoming distrust event. The first of
these events is this bug, affecting various roots from Symantec.

The STATE_CERT_DISTRUST_IMMINENT flag is set by nsNSSCallbacks and passed,
via nsSecureBrowserUIImpl, to browser.js where it is used to alert the console.

Adding this sort of diagnostic printing to be accessible to browser.js is a
long-desired goal, as future functionality can start doing more decision-making
there. We may, for example, also want to degrade the lock icon, which will be
straightforward with this flag.

This commit does not implement the IsCertificateDistrustImminent method. That is
follow-on work.

MozReview-Commit-ID: 75IOdc24XIV

--HG--
extra : rebase_source : e6a95d0be65f667eff0b131274272f0df91f8732
2017-10-18 22:29:42 -07:00
Andrea Marchesini 561d132d3b Bug 1413044 - Move DBusHelper.h in uriloader/exthandler, r=smaug
--HG--
rename : netwerk/wifi/DBusHelpers.h => uriloader/exthandler/DBusHelpers.h
2017-11-01 23:24:38 +01:00
Andrew McCreight c74d67c7a6 Bug 1411416 - Don't leak nsOfflineCacheUpdateService::mAllowedDomains. r=mayhemer
MozReview-Commit-ID: D9Bq3NZYaO6
2017-10-25 09:55:02 -07:00
Nika Layzell f4dfb6a969 Bug 1401379 - Part 4: Be consistent with nsDocLoader's canonical ISupports, r=smaug
MozReview-Commit-ID: 5rBfa1LcESd
2017-11-01 11:06:30 -04:00
Nika Layzell a864cbc340 Bug 1401379 - Part 1: Make nsDocShell and nsDocLoader cycle collected, r=smaug
MozReview-Commit-ID: Bui924n8Kvn
2017-11-01 11:06:24 -04:00
Paolo Amadini 98b8fb39b7 Bug 1411979 - Share the getTempFile function in xpcshell and browser tests. r=mak
MozReview-Commit-ID: 5hshgOrFqws

--HG--
extra : rebase_source : c7b173f7c2685c9522ef0626b74819273352a373
extra : source : 68e85782bbcab3c06e729551643bdc602cf8de71
2017-10-31 13:25:45 +00:00
Sebastian Hengst 7bf9eb161a Backed out 2 changesets (bug 1411979) for failing xpcshell's toolkit/components/jsdownloads/test/unit/test_PrivateTemp.js. r=backout on a CLOSED TREE
Backed out changeset 7a4f33d16b9e (bug 1411979)
***
Backed out changeset 68e85782bbca (bug 1411979)

--HG--
extra : histedit_source : 0226bf9f95762ef7fe4e57aee97b96ae5deff496%2C066dd55855dbcbd146642acd72bcd4e5d8044a2f
2017-10-30 19:19:45 +01:00
Paolo Amadini 7e4a6c3456 Bug 1411979 - Share the getTempFile function in xpcshell and browser tests. r=mak
MozReview-Commit-ID: 5hshgOrFqws

--HG--
extra : rebase_source : 9377484a4416829e0bfbe30c70d434b331e7301c
2017-10-30 16:53:22 +00:00
Paolo Amadini dac52b86d6 Bug 1412282 - Allow calling Assert.jsm methods directly from other test-only modules. r=mikedeboer
This adds a global instance that can be used by invoking assertion methods directly on the imported Assert object. The test suites set the global reporter function to the one for the currently running test.

MozReview-Commit-ID: 8dksVc9o7r

--HG--
extra : rebase_source : 3e382c6d24c6019d29963811c37469cfc23b928f
2017-10-27 14:38:30 +01:00
Andrea Marchesini 1e90a67e4d Bug 1412258 - Get rid of ipc/dbus, r=smaug
--HG--
rename : ipc/dbus/DBusConnectionRefPtr.h => netwerk/wifi/DBusHelpers.h
2017-10-27 18:41:40 +02:00
Paolo Amadini c055bd0fab Bug 1396184 - Rewrite the test for bug 1367581. r=mak
MozReview-Commit-ID: 3XyVPVKSGF4

--HG--
extra : rebase_source : 5a10ca487a173aa86df26df36595de86e8394319
2017-10-26 17:07:24 +01:00
Kris Maglione 257d9118dc Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj
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
2017-10-16 21:08:42 -07:00
Sylvestre Ledru d60d69e2cb Bug 1411001 - Remove the +x permissions on cpp & h files r=froydnj
MozReview-Commit-ID: DjDkL20wRg0

--HG--
extra : rebase_source : a343d83d1f4e97e4ba56d0f57fec93079df0b5ea
2017-10-23 20:59:55 +02:00
Jan Horak ee67df0ab5 Bug 1408010 - Fallback to app chooser dialog when external handler app not found, r=Paolo
The nsExternalHelperAppService has been changed to ask for application in case
the preferred application has not been found (to cover the case the user has
uninstalled the application).

MozReview-Commit-ID: 63AFzPhzcxN

--HG--
extra : rebase_source : f91bdae686b062bade1cacdb489c935e30ea0876
2017-10-19 12:38:19 +02:00
Masatoshi Kimura dbd92543c6 Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj
MozReview-Commit-ID: 7JoD4VYzZp3

--HG--
extra : rebase_source : 5db437f1c34608aa223916874d62b48c59baeae8
2017-10-21 23:53:02 +09:00
Kris Maglione 4a767c7e6e Bug 1404198: Part 2j - Switch to NS_NewTimer* everywhere else. r=njn
MozReview-Commit-ID: LmGIgfmNSmk

--HG--
extra : rebase_source : bf34e852beb0c8f6eafd09184c2e0cda95f95f83
2017-09-24 19:57:48 -07:00
Joel Maher 558b169cc1 Bug 1396184 - Disable uriloader/exthandler/tests/mochitest/browser_ext_helper_pb.js on OSX for frequent failures. r=me, a=test-only 2017-10-15 05:55:05 -04:00
Ben Kelly 9ed7291825 Bug 1391693 P2 Only validate docloader channel on redirect if its been set. r=smaug 2017-10-09 10:03:40 -07:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Gian-Carlo Pascutto bc7dfc9353 Bug 1382323 - Remote OSProtocolHandlerExists. r=jld,smaug
MozReview-Commit-ID: Gml7cjbgUvK

--HG--
extra : rebase_source : 6ee7dfc8b5c05aec1ed268011fbec2ef64760554
2017-09-04 21:48:59 +02:00
Thomas Nguyen 651c28ca53 Bug 1351147 - Use fullhash instead of prefix in OnClassifyComplete r=francois
In order to optionally report the full hash back to Google, we need to keep it
around in the callback. While a prefix is not the same as a full hash (multiple
full hashes can map to the same prefix), in this case, the callback will only be
called when the full hash matches.

MozReview-Commit-ID: F4WSLZpYrXB

--HG--
extra : rebase_source : da3b16b00729d0aa6ff1765a135b751fcf44c012
2017-08-04 18:20:13 +08:00
Rob Wu fd2dae9a66 Bug 1402687 - Remove unused variable following MOZ_B2G cleanup r=froydnj
MozReview-Commit-ID: Gtw8FyxbGNH

--HG--
extra : rebase_source : a82b4e2d4d5e7e6c65f003cf23a6db6d2a2c8f7d
2017-09-24 13:27:38 +02:00
Myk Melez 6ddfbd4f2a Bug 1400453 - yield thread between each call to gExternalProtocolService.getProtocolHandlerInfo; r=florian 2017-09-19 15:55:07 -07:00
Haik Aftandilian 22cc0632c7 Bug 1391186 - Thunderbird loses setting as default email client when "mailto" triggered by Firefox 56/57 (OS X 10.11). r=spohl
MozReview-Commit-ID: H0VVoHR7LmQ

--HG--
extra : rebase_source : 20cd0f352186b80841b9891bac2e8fcdd79b95f0
2017-08-28 14:28:07 -07:00
Tom Ritter 6fd392825a Bug 1394013 Fix forbidden string constant assignment r=froydnj
ISO C++ forbids converting a string constant to 'wchar_t*' [-Werror=write-strings]

Either change it to a nullptr (which has same intent) or pass through a static


MozReview-Commit-ID: CSunOCyO9PN

--HG--
extra : rebase_source : bfdabc1f463eca75987c6561f7c3ea60acf0340f
2017-08-22 16:58:06 -05:00
Henri Sivonen d2b0cdbc9c Bug 1395527 part 2 - Delegate IsASCII and IsUTF8 to encoding_rs. r=froydnj
MozReview-Commit-ID: 49AGBPjW4Ca

--HG--
extra : rebase_source : 78dc1b549c97e5e4fb0dc625acdab23806b3e941
2017-09-01 11:53:31 +03:00
Blake Kaplan 825be7e3b6 Bug 1368343 - Be paranoid about null TabChild. r=billm
I had a theory about what was happening (that we're somehow closing the window
between the attempt to open the channel and the resulting OnStartRequest), but
when I attempted to test that I couldn't make it crash (in fact, closing the
window calls Cancel on the stream and stops the OnStartRequest from
happening). So, I don't know what's causing this, but clearly we're failing to
get a TabChild out, so let's stop crashing for the time being.

MozReview-Commit-ID: LeGJCvh26dm

--HG--
extra : rebase_source : 2a3e97e7500b988a3fba5dae63be96caf180ab9f
2017-08-31 16:54:31 -07:00
Yoshi Huang d180d21cf7 Bug 1370787 - add test for download file in PrivateBrowsing mode. r=smaug 2017-09-01 10:09:36 +08:00
Eugen Sawin 1326ccb820 Bug 1389303 - [2.1] Cancel external protocol channel on successful load. r=mcmanus 2017-08-28 15:51:44 +02:00
Eugen Sawin 456f394895 Bug 1389303 - [1.3] Call OnStart/OnStop callbacks on successful URI load in the external protocol channel. r=mcmanus 2017-08-28 15:51:44 +02:00
Tom Ritter b29e7cc057 Bug 1393201 Signed/Unsigned comparison warning in nsMIMEInfoWin.cpp - Find returns an int, not a unit r=smaug
MozReview-Commit-ID: 3qxIGFPkPXW

--HG--
extra : rebase_source : feee4c52a1b2abce64dd8213755150355c490d90
2017-08-22 16:59:31 -05:00
Wes Kocher fb8abb94c7 Merge inbound to central, a=merge
MozReview-Commit-ID: 1mWKzfX4kl
2017-08-23 18:07:24 -07:00
Nicholas Nethercote f582d96b98 Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm.
This is straightforward, with only two notable things.

- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
  throughout, because all nsXPIDLString.h did was include nsString.h. The
  exception is for files which already include nsString.h, in which case the
  patch just removes the nsXPIDLString.h inclusion.

- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
  cover some of its ground, e.g. testing Adopt(nullptr).

--HG--
extra : rebase_source : 452cc4a08046a1adb1a8099a7e85a1917de5add8
2017-08-17 15:29:03 +10:00
Doug Thayer 21ef26ac40 Bug 1389443 - Load handlers.json asynchronously r=florian,Paolo
Asynchronously load handlers.json for nsHandlerService-json.js in
order to avoid blocking IO early on.

MozReview-Commit-ID: F3THSxvXR7I

--HG--
extra : rebase_source : 95d5ccb545cd7d8a09f80586fc2bf2dcf1ea5ab7
2017-08-15 14:57:32 -07:00
Nicholas Nethercote 8a72cf2251 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm.
--HG--
extra : rebase_source : 69d58b0cfb56efc6b03d8e2d7be2ce3c3e6cd843
2017-08-21 20:01:27 +10:00
Eric Rahm 0938982c90 Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj
--HG--
extra : rebase_source : 063c7f95dda063eafabfa1921366bd1957b8fe73
2017-08-11 17:45:18 -07:00
Ryan VanderMeulen 24c9581b48 Backed out changeset fbf0e8609abb (bug 1390428) for Windows clipboard test failures on a CLOSED TREE. 2017-08-18 10:58:47 -04:00
Nicholas Nethercote 5241bea863 Bug 1390428 (part 2) - Remove more nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is used in ways that rely on the implicit conversion
to |char*|. The patch uses get() and EqualsLiteral() calls to replace the
implicit conversions.
2017-08-16 13:58:55 +10:00
Sebastian Hengst dad4ec9261 Backed out changeset b5d33e3a8420 (bug 1389303) for failing chrome test dom/browser-element/mochitest/test_browserElement_inproc_getWebManifest.html on Android. r=backout 2017-08-17 16:27:22 +02:00
Sebastian Hengst a905e04677 Backed out changeset 901692aa7828 (bug 1389303) 2017-08-17 16:26:38 +02:00
Eugen Sawin ddd374dd6d Bug 1389303 - [2.0] Ensure listener is always cleared after OpenURL call. r=me 2017-08-17 14:34:19 +02:00
Eugen Sawin 3419cfab88 Bug 1389303 - [1.2] Call OnStart/OnStop callbacks on successful URI load in the external protocol channel. r=mcmanus 2017-08-17 14:16:27 +02:00
Nicholas Nethercote 025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Eric Rahm fe18bf0131 Bug 1386825 - Part 4: Remove remaining instances of MOZ_B2G. r=froydnj
MozReview-Commit-ID: 8r4eMwiZ4Vg
2017-08-08 14:41:09 -07:00
Masatoshi Kimura ca088e461c Bug 389565 - Remove nsIExternalProtocolService::LoadUrl. r=Paolo
MozReview-Commit-ID: lMq06cPWYB

--HG--
extra : rebase_source : 5c48597cbe4491fff93d3e757efa5ecad0f7fc22
2017-08-06 11:25:42 +09:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Masatoshi Kimura 8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Masatoshi Kimura 8ed4a80a4e Bug 1322874 - Get rid of nsIURI.originCharset. r=valentin.gosu
nsIURI.originCharset had two use cases:
 1) Dealing with the spec-incompliant feature of escapes in the hash
    (reference) part of the URL.
 2) For UI display of non-UTF-8 URLs.

For hash part handling, we use the document charset instead. For pretty
display of query strings on legacy-encoded pages, we no longer care to them
(see bug 817374 comment 18).

Also, the URL Standard has no concept of "origin charset". This patch
removes nsIURI.originCharset for reducing complexity and spec compliance.

MozReview-Commit-ID: 3tHd0VCWSqF

--HG--
extra : rebase_source : b2caa01f75e5dd26078a7679fd7caa319a65af14
2017-08-02 20:43:30 +09:00
Wes Kocher b11975d1ad Merge m-c to autoland, a=merge
MozReview-Commit-ID: L5cEw8jWPNI
2017-07-31 17:53:14 -07:00
Nicholas Nethercote 72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10:00
Nicholas Nethercote 581214bd8b Bug 1384835 (part 1, attempt 2) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
--HG--
extra : rebase_source : fe566945a55c281d8290634a5b55bed19415c839
2017-07-31 10:52:51 +10:00
Bill McCloskey 55f153be76 Bug 1383328 - Use TabGroup as event target for browser-status-filter (r=smaug)
MozReview-Commit-ID: HOSmqr5Vpwh
2017-07-28 13:11:59 -07:00
Sebastian Hengst d7527a414d Backed out changeset 07b534f44740 (bug 1384835) for failing xpcshell's security/manager/ssl/tests/unit/test_cert_sha1.js checkCertErrorGenericAtTime on Linux x64 debug. r=backout 2017-07-28 10:30:29 +02:00
Sebastian Hengst 744a0a216b Backed out changeset ef5feef07bed (bug 1384835) 2017-07-28 10:29:24 +02:00
Carsten "Tomcat" Book 28bdd40776 Merge mozilla-central to mozilla-inbound 2017-07-28 09:48:24 +02:00
Carsten "Tomcat" Book bd7b184c91 Backed out changeset e3e924da5d5f (bug 1383328) 2017-07-28 09:20:05 +02:00
Carsten "Tomcat" Book d360d49d2a merge mozilla-inbound to mozilla-central a=merge 2017-07-27 10:57:25 +02:00
Nicholas Nethercote 200d8ec18b Bug 1384835 (part 3) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
This is similar like the previous patch, but for the 8-bit string variants.
Also, it changes assignment to Adopt() in GetCString() and GetDefaultCString()
to avoid an extra copy.

--HG--
extra : rebase_source : eba805c3a7b809d5ccd6e853b1c9010db9477667
2017-07-27 16:45:10 +10:00
Nicholas Nethercote f314cbcbe5 Bug 1384835 (part 1) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
This is basically a cosmetic change; references are the normal way to do string
outparams.

--HG--
extra : rebase_source : ffc5945f269bdcd3d4116755b56713e87a44b6cd
2017-07-25 19:12:56 +10:00
Bevis Tseng 95b18d794e Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm
--HG--
extra : rebase_source : 84de1abfcc30a6964144c2e6718a508c71027b65
2017-07-27 02:18:20 +08:00
Kartikaya Gupta ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Bill McCloskey fff3f0890c Bug 1383328 - Use TabGroup as event target for browser-status-filter (r=smaug)
MozReview-Commit-ID: HOSmqr5Vpwh
2017-07-25 19:52:36 -07:00
Nicholas Nethercote ac3e6bddb4 Bug 1382099 - Remove MOZ_WIDGET_GONK from media/, uriloader/, widget, /xpfe/. r=snorp.
--HG--
extra : rebase_source : 75fe5b8320d52c7316ca547f706b64f30250d28c
2017-07-24 10:08:55 +10:00
Sylvestre Ledru 7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Blake Kaplan 4d5da90a53 Bug 1381934 - Try to deal better with closed windows. r=mconley
It's hard to know exactly what's going on in this testcase because we nest a
bunch of calls. I was unable to observe the crash myself, but it appears that
part of it (at least) has to do with the test timing out and causing the
opened page to get closed by the harness. I believe this causes us to fail to
getInterface to the docShell for the now-closed window and we crash.

There isn't much we can do in this situation so, let's try being defensive and
watch crash-stats.

MozReview-Commit-ID: EeSUqMPXk58

--HG--
extra : rebase_source : 44758e1f0eabfe0b02b654dd48317f320b79a217
2017-07-28 16:35:25 -07:00
Honza Bambas f008a7d471 Bug 1376459 - Prevent Offline Application Cache fallback namespace and fallback page be from a parent directory relative to the manifest. r=jduell 2017-07-12 16:58:19 -04:00
Dragana Damjanovic dd.mozilla@gmail.com b1784ff670 Bug 1222633 - nsPrefetchService should not cancel rel=preload if the load ends. r=smaug 2017-07-10 15:05:41 +02:00
Dragana Damjanovic dd.mozilla@gmail.com 8a38a950a8 Bug 1222633 - Add rel=preload - nsPrefetchService part. r=smaug 2017-07-10 15:05:23 +02:00
Christoph Kerschbaumer 2ad43ee9bd Bug 1364016 - Explicitly pass a triggeringPrincipal to openURI. r=gijs,baku 2017-07-05 21:58:21 +02:00
Nicholas Nethercote 3e439bb4f8 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

This patch removes all uses, except for the places where we need to use
PR_Free() to free something allocated by another NSPR function; in those cases
I've added a comment explaining which function did the allocation.

--HG--
extra : rebase_source : 0f781bca68b5bf3c4c191e09e277dfc8becffa09
2017-06-30 19:05:41 -07:00
Ehsan Akhgari d732ce4442 Bug 1375573 - Part 2: Avoid creating an about:blank document in setupJSON() by creating a Window binding through exposing a getter for the inner window ID on nsIWebProgress; r=billm 2017-06-28 09:15:53 -04:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 5f51e5596e merge mozilla-inbound to mozilla-central a=merge 2017-06-23 11:28:19 +02:00
Nicholas Nethercote f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Nicholas Nethercote fe9268c4cd Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString

--HG--
extra : rebase_source : b37350642c58a85a08363df2e7c610873faa6e41
2017-06-20 19:19:05 +10:00
Blake Kaplan 9c7df6a13a Bug 1373109 - Add a mochitest for the auto-closing behavior. r=mconley
MozReview-Commit-ID: 7OBAdvMu6AX

--HG--
extra : rebase_source : 26a2a73a5ea5098285e1b5a3c303465e98853427
2017-06-21 17:33:40 -07:00
Blake Kaplan 0fd11e5185 Bug 1373109 - Don't call MaybeCloseWindow twice when diverting. r=mconley
nsExternalHelperAppService::OnStartRequest calls MaybeCloseWindow
unconditionally after it finishes looking at the request headers. The call
from DidDivertRequest is redundant (and possibly left over from when we didn't
call OnStartRequest properly).

MozReview-Commit-ID: Cm5YhCt5XLY

--HG--
extra : rebase_source : 628100c860459d338cbabc65f557d7058b91f26d
2017-06-20 17:37:24 -07:00
Marco Bonardo a60ccaff04 Bug 1263378 - Intermittent leaks from browser_bug461710.js. r=standard8
MozReview-Commit-ID: FQQkGaiE0xZ

--HG--
extra : rebase_source : 5cdb8a0de4cdc5afd923ab596f9c01ebf344bc9f
2017-06-21 13:30:13 +02:00
Florian Quèze 1e40201f6d Bug 1374282 - script generated patch to remove useless bind calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Paul Bignier 500ecab8d6 Bug 1354920 - Typo fixes around 'algorithm'. r=MattN
MozReview-Commit-ID: IwFb43y8Dxm
2017-06-06 17:50:25 -07:00
Thomas Nguyen 262347b745 Bug 1351146 - P2 - Update test case and usage of nsIRedirectHistoryEntry interface. r=dragana
MozReview-Commit-ID: s61VV5CLx8
2017-05-25 19:42:00 +02:00
Bill McCloskey 691628a34e Bug 1364570 - Dispatch link prefetch events asynchronously to avoid DocGroup mismatches (r=bz)
When we send out a prefetch request, we act as if the load came
from one of the possibly many documents containing <link> element
for the given URL. The docgroup assigned to this request is
derived from this document. Later, when the load finishes, the
OnStopRequest code runs in a runnable labeled with this
docgroup. OnStopRequest dispatches a load event to *all* the link
elements, including some that might be in different docgroups
from the OnStopRequest runnable. This generates an assertion.

To fix this, I decided to dispatch the load events
asynchronously. I'm hoping the extra round trip through the event
loop shouldn't hurt us too much since I doubt anyone actually
listens for these events.

MozReview-Commit-ID: FTkjuHO7RFp
2017-05-23 13:56:49 -07:00
Ryan VanderMeulen 41f95294f5 Backed out changeset eeb73d8c0542 (bug 1364570) for static analysis failures on a CLOSED TREE. 2017-05-23 15:31:16 -04:00
Bill McCloskey 79d1a76b44 Bug 1364570 - Dispatch link prefetch events asynchronously to avoid DocGroup mismatches (r=bz)
When we send out a prefetch request, we act as if the load came
from one of the possibly many documents containing <link> element
for the given URL. The docgroup assigned to this request is
derived from this document. Later, when the load finishes, the
OnStopRequest code runs in a runnable labeled with this
docgroup. OnStopRequest dispatches a load event to *all* the link
elements, including some that might be in different docgroups
from the OnStopRequest runnable. This generates an assertion.

To fix this, I decided to dispatch the load events
asynchronously. I'm hoping the extra round trip through the event
loop shouldn't hurt us too much since I doubt anyone actually
listens for these events.

MozReview-Commit-ID: FTkjuHO7RFp
2017-05-23 12:04:31 -07:00
Jessica Jong baaadbc3f1 Bug 1364550 - Get all extensions for a MIME type and not just the preferred one (macOS). r=baku
MozReview-Commit-ID: Ls1vQ6f8tyZ
2017-05-18 02:37:00 +08:00
Blake Kaplan 00c13b4cfa Bug 1360095 - Wait for the window to close before checking that it does. r=Felipe
The external helper app service waits for a second before closing the window,
which could lead to races. Also wait for the tab to close to avoid similar
races, there.

MozReview-Commit-ID: IdxNWRPheoY

--HG--
extra : rebase_source : 7b53e9690ad64994c5b8c5f6aa2a7f80db9a6a04
2017-05-17 16:24:14 -07:00
Paolo Amadini 39e03eb845 Bug 1364050 - Part 5 - Update obsolete references in code comments. r=mak
MozReview-Commit-ID: 9EUn7vcSfe3

--HG--
extra : rebase_source : f23b5f67b42d19fc69b06e3408d066ae479d369b
2017-05-05 13:11:49 +01:00
Paolo Amadini c0c0f3b8e5 Bug 1364050 - Part 1 - Remove the MOZ_JSDOWNLOADS configure option. r=mak
MozReview-Commit-ID: B73Ym5tD06R

--HG--
extra : rebase_source : 693137f9996790a780d8ca2eaf952e8747c75246
2017-05-05 12:16:42 +01:00
Jorg K 47862ad27a Bug 1362466 - Skip default handler injection if pref gecko.handlerService.defaultHandlersVersion not defined. r=paolo 2017-05-07 10:46:00 -04:00
Paolo Amadini d5baf43d3d Bug 1287658 - Migrate from "mimeTypes.rdf" to "handlers.json". r=mak
The default nsIHandlerService implementation is switched to the one that uses the JSON data store, and any previously configured handlers are imported from the RDF data store if the "gecko.handlerService.migrated" preference is not set.

MozReview-Commit-ID: 7o3JgAtR5Hx

--HG--
extra : rebase_source : a95c783ebb6bb4a7fdd8c34e2ec9ce0ac744b092
2017-04-15 12:16:59 +01:00
Blake Kaplan e45830eae6 Bug 1359651 - Add a mochitest for auto-closing behavior when dealing with an external file type. r=Felipe
MozReview-Commit-ID: 5SWoHtSA58t

--HG--
extra : rebase_source : df18d1290790dfa7f7cd9b8f582eb85253bd7313
2017-04-25 17:39:25 -07:00
Paolo Amadini 2723e3cda4 Bug 1355585 - Streamline the format of "handlers.json", align the implementation, and reorganize tests. r=mak
This patch significantly improves the test coverage for both the JSON and RDF back-ends. There is a clearer separation between tests using predefined data and tests for the injection of default handlers. The predefined data includes more significant property combinations, and the JSON is now formatted. Helper functions are renamed for clarity.

Functions like "exists" that have different paths for MIME types and protocols are now tested with both, while behaviors that have a single path are now only tested with MIME types for efficiency.

The file format is redesigned to be more compact, and all the data is normalized when saving instead of when loading. Duplicates are now handled correctly when saving.

MozReview-Commit-ID: JI4I1M0N3lq

--HG--
extra : rebase_source : 06920d9be56830f81e3e01cbc97a02983f50c264
extra : source : 3c4b8028ac594ee24760feb96e93bfdab9704e98
2017-04-24 11:29:46 +01:00
Paolo Amadini d457a3002d Bug 986975 - do_QueryInterface abuse in nsAndroidHandlerApp.cpp. r=mak
This change is tested in detail as part of bug 1355585.

MozReview-Commit-ID: 5z4evaUQDFI

--HG--
extra : rebase_source : 507fc823746667a27ff159d8347999eb2e007453
extra : source : 3e41ab5e66765a8955d77482d74c48db1255ee45
2017-04-24 11:29:35 +01:00
Honza Bambas 203c640be7 Bug 1348062 - Mark channels used for downloads as throttable, r=nick+paolo
MozReview-Commit-ID: 9cg4PwrXtNa

--HG--
extra : rebase_source : 2ff2d771a6ccb2a3e11c2d65e0a64ebbaa443206
2017-04-16 14:53:30 +01:00
Carsten "Tomcat" Book 589e3693ed Backed out changeset 8bd40784fb5b (bug 986975) for bustage
--HG--
extra : rebase_source : 7a8d7bb32446c179d413663091fb475f2d381bd3
2017-04-24 11:59:04 +02:00
Carsten "Tomcat" Book cc13ab1fa1 Backed out changeset bcf5a28b1873 (bug 1355585)
--HG--
extra : rebase_source : 11d368ea1b7253161cf2e3a81bb4c75a3f845ca7
2017-04-24 11:58:48 +02:00
Paolo Amadini ecf0fc98a2 Bug 1355585 - Streamline the format of "handlers.json", align the implementation, and reorganize tests. r=mak
This patch significantly improves the test coverage for both the JSON and RDF back-ends. There is a clearer separation between tests using predefined data and tests for the injection of default handlers. The predefined data includes more significant property combinations, and the JSON is now formatted. Helper functions are renamed for clarity.

Functions like "exists" that have different paths for MIME types and protocols are now tested with both, while behaviors that have a single path are now only tested with MIME types for efficiency.

The file format is redesigned to be more compact, and all the data is normalized when saving instead of when loading. Duplicates are now handled correctly when saving.

MozReview-Commit-ID: JI4I1M0N3lq

--HG--
extra : source : b261ced27c55155bd0e3f92efbf90ae6ed8fc664
extra : amend_source : 64dc1b735bda798620e21db4ae942863fd00bb16
2017-04-24 10:31:30 +01:00
Paolo Amadini 4ecc4a5cdf Bug 986975 - do_QueryInterface abuse in nsAndroidHandlerApp.cpp. r=mak
This change is tested in detail as part of bug 1355585.

MozReview-Commit-ID: 5z4evaUQDFI

--HG--
extra : source : 972bb1937119fb1742dc94742fcac80af4c108ee
2017-04-24 10:28:12 +01:00
Valentin Gosu 0a4d506e21 Bug 1354349 - Add nsIChannel.isDocument that checks if LOAD_DOCUMENT_URI is set, or if LOAD_HTML_OBJECT_DATA and the channel has the appropriate MIME type r=mcmanus,mystor
MozReview-Commit-ID: K28Opd9JTr2

--HG--
extra : rebase_source : d1a786d9b4318be15f195fdc330489121ebd6ece
2017-04-20 10:15:06 +08:00
Gijs Kruitbosch 5ae346e36b Bug 1352348 - add a method to nsExternalHelperAppService that only fetches a string mimetype for an extension, r=bz,Paolo
MozReview-Commit-ID: 3p1pakC9g45

--HG--
extra : rebase_source : b8b9eb417d2e70b57f3ecc5b872ad678afe946df
2017-04-13 15:45:54 +01:00
Gijs Kruitbosch 8450fb0148 Bug 1352348 - don't do registry lookups for empty strings passed when we want to know a mimetype, r=Paolo
MozReview-Commit-ID: KZ9w7zMZ35g

--HG--
extra : rebase_source : 9913c46ebc885ee2de815811bfcb6a39a88f0d71
2017-04-13 15:46:45 +01:00
Sebastian Hengst 9f9cc5e2f4 Backed out changeset d56f0474acb3 (bug 1352348) for Windows build bustage (undeclare identifier 'aExtension' at nsOSHelperAppService.cpp(395). r=backout on a CLOSED TREE 2017-04-19 14:10:12 +02:00
Sebastian Hengst 87f4f1adf2 Backed out changeset 1e5f2ea404fe (bug 1352348) 2017-04-19 14:09:06 +02:00
Gijs Kruitbosch 3a9260f922 Bug 1352348 - add a method to nsExternalHelperAppService that only fetches a string mimetype for an extension, r=bz,Paolo
MozReview-Commit-ID: 3p1pakC9g45

--HG--
extra : rebase_source : ab1680ca37da83006e8c61deb5209c359807516e
2017-04-13 15:45:54 +01:00
Gijs Kruitbosch 1da74eafa7 Bug 1352348 - don't do registry lookups for empty strings passed when we want to know a mimetype, r=Paolo
MozReview-Commit-ID: KZ9w7zMZ35g

--HG--
extra : rebase_source : 9913c46ebc885ee2de815811bfcb6a39a88f0d71
2017-04-13 15:46:45 +01:00
Sebastian Hengst 2d544286e7 Backed out changeset ebecf0ff75be (bug 1352348) for crashing in e.g. browser/components/translation/test/browser_translation_yandex.js on Windows. r=backout on a CLOSED TREE 2017-04-19 12:58:12 +02:00
Sebastian Hengst 35adb5a3b5 Backed out changeset ea1bb4b8e325 (bug 1352348) 2017-04-19 12:57:35 +02:00
Gijs Kruitbosch 61394be0c6 Bug 1352348 - add a method to nsExternalHelperAppService that only fetches a string mimetype for an extension, r=bz,Paolo
MozReview-Commit-ID: 3p1pakC9g45

--HG--
extra : rebase_source : 9573f2391db006f3e98a5ee49682670332654488
2017-04-13 15:45:54 +01:00
Gijs Kruitbosch 283942025c Bug 1352348 - don't do registry lookups for empty strings passed when we want to know a mimetype, r=Paolo
MozReview-Commit-ID: KZ9w7zMZ35g

--HG--
extra : rebase_source : 9913c46ebc885ee2de815811bfcb6a39a88f0d71
2017-04-13 15:46:45 +01:00
Mike Hommey 33a7e408ce Bug 1357323 - Remove the gonk code that was referenced by the build system. r=gps
--HG--
extra : rebase_source : 1d30ebcbdbcf596c944e1eec981f85db341485e5
2017-04-18 17:46:39 +09:00
Mike Hommey 34e619d1c1 Bug 1357323 - Remove support for gonk in the build system. r=gps
Everything depending on the widget being gonk can go away, as well as
everything depending on MOZ_AUDIO_CHANNEL_MANAGER, which was only
defined on gonk builds under b2g/ (which goes away in bug 1357326).

--HG--
extra : rebase_source : 9f0aeeb7eea8417fa4e06d662d566d67ecaf2a24
2017-04-18 16:56:09 +09:00
Carsten "Tomcat" Book 7ba1b88f0b Backed out changeset ec9fb39f7133 (bug 1354349) for bustage 2017-04-18 08:52:14 +02:00
Valentin Gosu 8f33abcc56 Bug 1354349 - Add nsIChannel.isDocument that checks if LOAD_DOCUMENT_URI is set, or if LOAD_HTML_OBJECT_DATA and the channel has the appropriate MIME type r=mcmanus,mystor
MozReview-Commit-ID: K28Opd9JTr2

--HG--
extra : rebase_source : 226ef1e6685a9608aa7c07d3c83b048d6e1e7278
2017-04-18 11:25:47 +08:00
Paolo Amadini b904570335 Bug 1355582 - Only the most recently added file extension is saved in "mimeTypes.rdf". r=mak
This change is tested in detail as part of bug 1355585.

MozReview-Commit-ID: 74nDQjGlFjA

--HG--
extra : source : 3e70d2516749bbb586b419d71c298bc6cfb365c4
2017-04-11 20:38:14 +01:00
Florian Queze f935ddc4b3 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze 37f2343b9a Bug 1356569 - Remove appendElement's last parameter when it is false, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze 37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Sebastian Hengst 9e0ecf32c5 Backed out changeset e1f191aad863 (bug 1356569) 2017-04-14 23:39:17 +02:00
Sebastian Hengst 738d097aae Backed out changeset 55f3df15eaa6 (bug 1356569) 2017-04-14 23:39:17 +02:00
Florian Queze 3c564a2b02 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze 93a734a3ce Bug 1356569 - Remove appendElement's last parameter when it is false, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze 95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Michael Layzell 8503de8054 Bug 1352684 - Add json, js, jsm, iso, properties, and locale to defaultMimeEntries, as they are used at startup, r=pike
MozReview-Commit-ID: 9vqyWtDe11h
2017-04-13 08:41:54 -04:00
Ehsan Akhgari 067b18b9f3 Bug 1316683 - Part 5: Avoid going into SpiderMonkey for retrieving origin attributes; r=baku
Our caller is C++ code, and the implementations are all also written in C++,
so there is no reason to go through SpiderMonkey here.  This patch also makes
nsILoadContext builtinclass to ensure that the implementation is always native.
2017-04-12 11:32:19 -04:00
Florian Queze b5916a37c7 Bug 1355216 - Mark last parameters that are almost always falsy as optional, r=froydnj. 2017-04-12 00:07:30 +02:00
Paolo Amadini 9c01cb1c62 Bug 1350026 - Fix recognition of the handler type in the JSON handler service back-end, and add detailed testing of the file format. r=mak
On Android, nsIHandlerInfo instances representing protocols are also instances of nsIMIMEInfo. This causes the RDF back-end of the handler service to store them in the same cateory as MIME types. This fix corrects the situation for the JSON back-end, while leaving the RDF back-end unchanged for backwards compatibility.

Detailed testing is added using different RDF reference files for Desktop and Android.

MozReview-Commit-ID: B0ls60jfENe

--HG--
extra : source : 0bfa2e0ad6232cbaf66dd7e42326101e23b62352
2017-04-04 17:20:37 +01:00