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

352 Коммитов

Автор SHA1 Сообщение Дата
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
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
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
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
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
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
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
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Paul Bignier 500ecab8d6 Bug 1354920 - Typo fixes around 'algorithm'. r=MattN
MozReview-Commit-ID: IwFb43y8Dxm
2017-06-06 17:50:25 -07:00
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
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
Joel Maher e958a77a71 Bug 1345506 - add BUG_COMPONENT to uriloader/* files. r=paolo
MozReview-Commit-ID: JAaudrms7yi
2017-03-09 15:06:25 -05:00
Wei-Cheng Pan 29f4cc8d4a Bug 1310127 - Part 16: Use MOZ_MUST_USE in netwerk/protocol/http r=smaug
MozReview-Commit-ID: Ihow5ushWou

--HG--
extra : rebase_source : 204dfbb446032fac0c9daeabeeb08fc6eb1a99bf
2016-12-20 11:40:29 +08:00
Eugen Sawin c237984e34 Bug 1322576 - [4.0] Fix some coding style issues. r=smaug 2017-02-22 14:57:41 +01:00
Eugen Sawin c6533bef50 Bug 1322576 - [1.2] Add tracking protection attribute to nsILoadContext to allow for overriding of the global preference setting for individual DocShells. r=smaug 2017-02-22 14:57:37 +01:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Chris Peterson 7d87380d8a Bug 1337672 - Part 1: Reduce the priority of prefetch network requests. r=mayhemer
Reduce the priority of <link rel="prefetch"> network requests from PRIORITY_NORMAL to PRIORITY_LOWEST, the same as favicons. These prefetch requests are already deferred until the browser is idle using nsIWebProgressListener, but we can also adjust their network request priority to reflect their low urgency.

https://developer.mozilla.org/docs/Web/HTTP/Link_prefetching_FAQ#How_is_browser_idle_time_determined.3F

MozReview-Commit-ID: 2PjGRGOgKUU

--HG--
extra : rebase_source : cf0306d33ea0dbe51bfc957eb39ad2e37565c51a
extra : amend_source : ef655ed4eced5dfd4cf4de79d9b3ec92845770ec
2017-01-18 00:55:58 -08:00
Tim Huang 756cf900c9 Bug 1336802 - Part 2: Updating the whole code base to make sure nsILoadInfo get null check. r=smaug
--HG--
extra : rebase_source : 22149fd540fd02119afe9fe5c9a815d01cf959c1
2017-02-07 11:49:34 +08:00
Boris Zbarsky b7cf5b83fd Bug 1333106. Stop leaking in the prefetch service if the prefetch is blocked by security checks. r=mcmanus 2017-01-24 10:02:46 -05:00
Andrea Marchesini 359ae91eac Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
Ehsan Akhgari eac76d9772 Bug 1310845 - Remove support for mozapp iframes; r=fabrice,jryans,baku,mcmanus
This patch removes support for mozapp iframes, leaving support for
mozbrowser iframes intact.  Some of the code has been rewritten in order
to phrase things in terms of mozbrowser only, as opposed to mozbrowser
or app.  In some places, code that was only useful with apps has been
completely removed, so that the APIs consumed can also be removed.  In
some places where the notion of appId was bleeding out of this API, now
we use NO_APP_ID.  Other notions of appId which were restricted to this
API have been removed.
2016-11-16 09:13:38 -05:00
Kan-Ru Chen f8100451db Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm
We will use the new type for the generated IPDL message handler
prototype to make sure correct error handling method is called.

MozReview-Commit-ID: AzVbApxFGZ0
2016-11-15 04:26:00 +01:00
Ehsan Akhgari 69dce6c397 Bug 1310101 - Remove nsILoadContext::IsAppOfType; r=baku 2016-10-14 10:45:27 -04:00
Michael Layzell e583117bfa Bug 1018486 - Part 5: Changes in docshell/ and uriloader/, r=bz
MozReview-Commit-ID: GiyHWL3aaOv
2016-09-07 10:50:41 -04:00
Nicholas Nethercote 742fc7eb48 Bug 1297961 (part 1) - Introduce nsURI::GetSpecOrDefault(). r=hurley.
This function is an infallible alternative to nsIURI::GetSpec(). It's useful
when it's appropriate to handle a GetSpec() failure with a failure string, e.g.
for log/warning/error messages. It allows code like this:

  nsAutoCString spec;
  uri->GetSpec(spec);
  printf("uri: %s", spec.get());

to be changed to this:

  printf("uri: %s", uri->GetSpecOrDefault().get());

This introduces a slight behavioural change. Previously, if GetSpec() failed,
an empty string would be used here. Now, "[nsIURI::GetSpec failed]" will be
produced instead. In most cases this failure string will make for a clearer
log/warning/error message than the empty string.
* * *
Bug 1297961 (part 1b) - More GetSpecOrDefault() additions. r=hurley.

I will fold this into part 1 before landing.

--HG--
extra : rebase_source : ddc19a5624354ac098be019ca13cc24b99b80ddc
2016-08-26 16:02:31 +10:00
Kan-Ru Chen b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Samael Wang a4bc3b938a Bug 1268962 - Add load / error event to prefetch link. r=bz
--HG--
extra : rebase_source : e62d8f12b0a4b4e047869ff005161df15cb6ab42
2016-08-12 15:09:05 +08:00
Nicholas Nethercote 3b0485fcdb Bug 1294645 - Don't use NS_CALLBACK for callbacks in nsI{Input,Output,UnicharInput},Stream.idl. r=froydnj.
Slightly less than half (93 / 210) of the NS_METHOD instances in the codebase
are because of the use of NS_CALLBACK in
nsI{Input,Output,UnicharInput},Stream.idl. The use of __stdcall on Win32 isn't
important for these callbacks because they are only used as arguments to
[noscript] methods.

This patch converts them to vanilla |nsresult| functions. It increases the size
of xul.dll by about ~600 bytes, which is about 0.001%.

--HG--
extra : rebase_source : c15d85298e0975fd030cd8f8f8e54501f453959b
2016-08-12 17:36:22 +10:00
Wes Kocher b92ae9a263 Backed out changeset 626f8cc8b7bc (bug 1268962) for causing bug 1268962 a=backout 2016-08-11 13:49:25 -07:00
Honza Bambas 237faab5b3 Bug 1285476 - Let appcache double-cache resources that are cross origin, r=michal 2016-07-27 13:08:00 +02:00
Samael Wang 319c7870ef Bug 1268962 - Add load / error event to prefetch link. r=bz 2016-08-09 14:28:17 +08:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Thomas Nguyen 545e22fb16 Bug 1264165 - Implement link referrerPolicy attribute. r=josh, r=khuey
MozReview-Commit-ID: GxMtNB23eD8
2016-06-24 10:38:47 +08:00
Ralph Giles 10281b30c2 Bug 1275744 - Reference MOZ_LOG in uriloader comments. r=erahm
NSPR_LOG_MODULES is deprecated.

MozReview-Commit-ID: HjVIwcxH4My

--HG--
extra : rebase_source : 813d00ff83e2d3741f89c3c5fec6b01fffb3ebb2
2016-05-26 11:48:27 -07:00
Nicholas Hurley 9e6ef0d3a6 Bug 1276052 - Fix NS_ConvertUTF16toUTF8 usage. r=smaug
MozReview-Commit-ID: BLvxeSWpF6h
2016-06-09 12:54:14 -07:00
dimi 8d44df2c72 Bug 1258033 - Part 1: Add IsTrackingProtectionOn for nsILoadContext. r=smaug
MozReview-Commit-ID: 2eQzO6KDLyX

--HG--
extra : rebase_source : 1f5c1c7b250336ff4ecf1e5b3949a532b7bb9144
2016-06-02 10:12:39 +08:00
Chris Peterson 353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07:00
Kyle Huey 941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Carsten "Tomcat" Book ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Trevor Saunders a6f221b6a2 bug 1257287 - add nsIDocShell.tabChild r=smaug 2016-03-18 15:54:12 -04:00
sajitk 98f171e09f Bug 1219482: Replace PRLogModuleInfo with LazyLogModule in uriloader subdirectory.r=erahm 2016-01-29 16:30:00 -08:00