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

787 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione 7aa3564a28 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : source : aa9a8f18e98f930a3d8359565eef02f3f6efc5f9
extra : absorb_source : 81a22ab26ee8017ac43321ff2c987d8096182d37
2018-07-23 17:41:06 -07:00
Brindusan Cristian 91a3707d5f Backed out 3 changesets (bug 1477579) for build bustages on xpcshell\selftest.py and crashtest failures on /components/nsComponentManager.cpp. CLOSED TREE
Backed out changeset aa9a8f18e98f (bug 1477579)
Backed out changeset 5fb0b7746a5d (bug 1477579)
Backed out changeset 8359f8fe4184 (bug 1477579)
2018-07-24 04:55:03 +03:00
Kris Maglione dfd38a6ac3 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : rebase_source : 4f70e7b296ecf3b52a4892c92155c7c163d424d2
2018-07-23 17:41:06 -07:00
Ehsan Akhgari ac25ec44da Bug 1475697 - Part 2: Add infrastructure for notifying the DOM about a document containing blocked tracking cookies; r=baku 2018-07-17 06:12:00 +03:00
Masayuki Nakano 5c3723acb2 Bug 1475461 - part 2: Make callers of PLDHashTable::Search() const methods if possible r=Ehsan
Some callers of PLDHashTable::Search() use const_cast, some others are not
const methods due to non-const PLDHashTable::Search().

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

MozReview-Commit-ID: C8ayoi7mXc1

--HG--
extra : rebase_source : 2cba0339756e3278ba6e5f0e8a11e68217a61d34
2018-07-13 19:01:53 +09:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Andi-Bogdan Postelnicu d9274aea61 Bug 1453795 - docshell - Initialize member fields in classes/ structures. r=smaug
--HG--
extra : rebase_source : 1b938af97a01037f5d51369319bfa326353a9aad
2018-06-18 10:23:57 +03:00
Kris Maglione 8340513b0c Bug 1463287: Add QueryInterface helper macro for concrete class types. r=bz
Using concrete class types with static IIDs in QueryInterface methods is a
pretty common pattern which isn't supported by any existing helper macros.
That's lead to separate ad-hoc implementations, with varying degrees of
dodginess, being scattered around the tree.

This patch adds a helper macro with a canonical (and safe) implementation, and
updates existing ad-hoc users to use it.

MozReview-Commit-ID: HaTGF7MN5Cv

--HG--
extra : rebase_source : ace930129d85960d22bc3048ca3bb19bbbd4a63e
extra : histedit_source : 03a87f746d957789d41381e4e1bfcc4fd7eebaf2%2C9c5bae9feeeef7721105db67be0f83e0ded66bb7
2018-05-21 16:33:18 -07:00
Adrian Wielgosik 5c8a9e8239 Bug 1460940 - Remove nsIDOMDocument uses in uriloader/. r=bz
MozReview-Commit-ID: LnXwludmiAn

--HG--
extra : rebase_source : 7acfeda4eb85992d53f90a533ec2c638cefcdd0f
2018-05-11 19:46:15 +02:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Honza Bambas 767d4dafd2 Bug 1440663 - Add a preference to limit document opening data conversion recursion depth to nsDocumentOpenInfo, r=smaug
--HG--
extra : histedit_source : 939bf4439875a7d88617d36cbf060e9d728c65fb
2018-02-23 08:00:00 +02:00
Hiroyuki Ikezoe 1b0cba9367 Bug 1417354 - Introduce nsIDocument::GetPresContext(). r=smaug
It would be convenient to get nsPresContext from nsIDocument.

MozReview-Commit-ID: Ei6V3UE8XGr

--HG--
extra : rebase_source : 8d2a917eb62cf341e4e1810451fd01c01dbc3bad
2018-02-21 07:00:10 +09:00
Nathan Froyd 0f56acaf26 Bug 1437604 - remove NS_INTERFACE_MAP_END_THREADSAFE; r=mystor
This macro is identical to NS_INTERFACE_MAP_END and encourages the
reader to think that there's something extra-special threadsafe about QI
implementations that use the macro, when in reality there's nothing of
the sort.
2018-02-12 14:36:46 -05:00
Josh Matthews 19738f789f Bug 1436743 - Dispatch events via the docgroup rather than the tabgroup when possible. r=mystor 2018-02-08 15:54:00 -05: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
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
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
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
Sebastian Hengst 7374adcf6f Backed out changeset e83481bd6963 (bug 1401379) for failing wpt-reftest /infrastructure/reftest-wait.html and unexpected passes in /webvtt/ and leaks in browser-chrome, all on OS X and Windows. r=backout on a CLOSED TREE 2017-10-02 19:59:42 +02:00
Sebastian Hengst 980f5ad6ad Backed out changeset ef2dfdd829bc (bug 1401379) 2017-10-02 19:57:22 +02:00
Nika Layzell 96035cb7b9 Bug 1401379 - Part 4: Be consistent with nsDocLoader's canonical ISupports, r=smaug
MozReview-Commit-ID: 5rBfa1LcESd
2017-10-02 11:58:02 -04:00
Nika Layzell 7c6f663101 Bug 1401379 - Part 1: Make nsDocShell and nsDocLoader cycle collected, r=smaug
MozReview-Commit-ID: Bui924n8Kvn
2017-10-02 11:58:01 -04: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
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
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
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
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
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
Carsten "Tomcat" Book bd7b184c91 Backed out changeset e3e924da5d5f (bug 1383328) 2017-07-28 09:20:05 +02: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
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
Maxim Breev f982515e79 Add a new flag to nsIWebProgressListener for redirects (bug 1342989). r=smaug
MozReview-Commit-ID: 5q29n6d3Iz8
2017-04-01 20:07:47 +03:00
Michael Layzell 986ad15aa7 Bug 1348036 - Add a hidden permission for making all document loads act like Large-Allocation loads for manual testing, r=smaug
MozReview-Commit-ID: DIMb0a3TJi9
2017-03-16 14:58:36 -04: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
Thomas Nguyen 65d9ef988a Bug 1288633 - Add more information when an URL matches Safe Browsing list. r=dragana,francois
MozReview-Commit-ID: 6u0dUOB838F

--HG--
extra : rebase_source : 8800e60e6a3b787f1ebaeafb48057e3a3d509468
2017-02-21 09:46:36 +08: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
Julian Seward 8a908912d3 Bug 1232696 - Remove NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW as it causes segfaulting for GCC 6 builds (5 of 5, fixes for docshell/). r=bzbarsky. 2017-01-24 17:12:10 +01:00
Cameron McCormack babad063ff Bug 1328832 - Part 2: Rename mozFlushType to mozilla::FlushType and make it an enum class. r=bzbarsky
MozReview-Commit-ID: D3fIngSHSsl
2017-01-05 15:31:56 +08:00
Christoph Kerschbaumer 0bfc26fd77 Bug 1182569: Use AsyncOpen2 for docshell loads. r=smaug 2017-01-03 20:57:45 +01:00
Gerald Squelart 0affeb4ab0 Bug 1316432 - Fix nsCOMPtr constructions&assignments from 0 - r=froydnj
Giving '0' (literal zero) to nsCOMPtr is now ambiguous, as both
nsCOMPtr(decltype(nullptr)) and nsCOMPtr(T*) could be used.
In any case, our coding standards mandate the use of 'nullptr' for pointers.
So I'm changing all zeroes into nullptr's where necessary.

MozReview-Commit-ID: LXiZTu87Ck6

--HG--
extra : rebase_source : f9dcc6b06e9ebf9c30a576f9319f76a51b6dc26f
2016-11-10 14:11:27 +11:00
Michael Layzell 209fba3a7f Bug 1304140 - Part 1: Implement support for the Large-Allocation header behind the dom.largeAllocationHeader.enabled pref, r=smaug
MozReview-Commit-ID: 5KBIu6Fc3Ea
2016-10-31 16:38:54 -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 34dcc7b852 Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm.
This change avoids lots of false positives for Coverity's CHECKED_RETURN
warning, caused by NS_WARN_IF's current use in both statement-style and
expression-style.

In the case where the code within the NS_WARN_IF has side-effects, I made the
following change.

> NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));
> -->
> Unused << NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));

In the case where the code within the NS_WARN_IF lacks side-effects, I made the
following change.

> NS_WARN_IF(!condWithoutSideEffects);
> -->
> NS_WARNING_ASSERTION(condWithoutSideEffects, "msg");

This has two improvements.
- The condition is not evaluated in non-debug builds.
- The sense of the condition is inverted to the familiar "this condition should
  be true" sense used in assertions.

A common variation on the side-effect-free case is the following.

> nsresult rv = Fn();
> NS_WARN_IF_(NS_FAILED(rv));
> -->
> DebugOnly<nsresult rv> = Fn();
> NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Fn failed");

--HG--
extra : rebase_source : 58788245021096efa8372a9dc1d597a611d45611
2016-09-02 17:12:24 +10:00
Wei-Cheng Pan 9a0fc7767f Bug 1293212 - Add MOZ_MUST_USE to prevent potential bugs. r=smaug
MozReview-Commit-ID: EuyeBkDlk2G

--HG--
extra : rebase_source : de8d5a95f74b757b7441cdc1e0f2dadb3a77ac6e
2016-08-08 18:16:15 +08:00
Phil Ringnalda d8ad3d3bc3 Back out 26a015091dbc (bug 1293212) for OS X failures in /html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.html 2016-08-15 19:42:54 -07:00
Wei-Cheng Pan 4ae87d0adc Bug 1293212 - Add MOZ_MUST_USE to prevent potential bugs. r=smaug
MozReview-Commit-ID: EuyeBkDlk2G

--HG--
extra : rebase_source : b728e1dd7e1ddfec3315f397e35dcb11eeab1ffa
2016-08-08 18:16:15 +08:00