Commit Graph

2279 Commits

Author SHA1 Message Date
Eric Rahm
5ae299f0d8 Bug 1315812 - Mark nsISupportsArray, nsICollection, nsIEnumerator as deprecated. r=froydnj
This marks the idl classes as deprecated, removes an unnecessary include that
was triggering deprecation warnings and wraps a necessary include in
XPCOMInit.cpp that is used for registering the component in deprecation
disabling pragmas.

MozReview-Commit-ID: BbNU5q8O4Q4
2016-11-10 13:15:33 -08:00
Eric Rahm
ea799cdb96 Bug 1311191 - Part 1: Add nsISupportsArray-like iteration to nsArray. r=froydnj
This adds an intermediate interface, nsIArrayExtensions, that inherits from
nsIArray. This is necessary as nsISupportsArray implements nsIArray as well
so the methods could not just be addded to nsIArray. nsIMutableArray inherits
from nsIArrayExtensions and so any interface that works with an nsIMutableArray
can be updated to return an nsIArrayExtensions.

This will allow interfaces that currently return an nsISupportsArray to instead
return an nsIArrayExtensions and internally work with an nsIMutableArray.
Consumers of these functions will continue to be able to use
nsISupportsArray-like iteration even though they're now working with an
nsIArray.

MozReview-Commit-ID: 9uRjsJbg9Jp
2016-10-24 13:24:26 -07:00
Eric Rahm
f17e00d7f9 No Bug - Add include to fix unified bustage. r=me 2016-10-18 12:10:35 -07:00
Eric Rahm
3ee733ccd7 Bug 1310040 - Make nsSupportsArray implement nsIArray. r=froydnj
This makes nsSupportsArray implement the |nsIArray| interface. This will allow
us to replace references to nsISupportsArray as a param in our gecko interfaces
with nsIArray instead.

The goal is to remove this adapter (and nsISupportsArray) after a full release
cycle.

MozReview-Commit-ID: If7RiO5muIk
2016-10-18 11:52:08 -07:00
Eric Rahm
ac6647aa97 Bug 1308317 - Part 10: Just use an nsCOMArray. r=froydnj
This switches over from using a half-baked auto array to nsCOMArray.

MozReview-Commit-ID: 6FR2SjOhoZR
2016-10-18 11:36:41 -07:00
Eric Rahm
5b5f49eb80 Bug 1308317 - Part 9: Remove nsSupportsArray::Compact. r=froydnj
This removes the scriptable method |Compact| which is unused in
our codebase and turns up no references in the plugins repo.

MozReview-Commit-ID: 5sJtO5COJpB
2016-10-18 11:36:39 -07:00
Eric Rahm
7fde5ad2f6 Bug 1308317 - Part 8: Remove nsSupportsArray::LastIndexOf. r=froydnj
This removes the scriptable method |GetLastIndexOf| which is unused in
our codebase and turns up no references in the plugins repo. This allows to
remove the non-scriptable |LastIndexOf|.

MozReview-Commit-ID: 54Ux7yZMh4F
2016-10-18 11:36:38 -07:00
Eric Rahm
7292673607 Bug 1308317 - Part 7: Remove nsSupportsArray::RemoveElementsAt. r=froydnj
MozReview-Commit-ID: H3A3gxckw5o
2016-10-18 11:36:37 -07:00
Eric Rahm
d4f6772880 Bug 1308317 - Part 6: Remove nsSupportsArray::GetIndexOfStartingAt. r=froydnj
This removes the scriptable method |GetIndexOfStartingAt| which is unused in
our codebase and turns up no references in the plugins repo. This allows to
remove the non-scriptable |IndexOfStartingAt| which is folded into |IndexOf|.

MozReview-Commit-ID: 2ADz5mLIvMU
2016-10-18 11:36:36 -07:00
Eric Rahm
1cd7bbde2c Bug 1308317 - Part 5: Remove nsSupportsArray::DeleteLastElement. r=froydnj
|DeleteLastElement| is scriptable, but a search of our add-on repo turned up
no hits and there were no references in gecko code. This also allows us to
remove the non-scriptable |RemoveLastElement| which was only called by
|DeleteLastElement|.

MozReview-Commit-ID: 20FXBrosacA
2016-10-18 11:36:35 -07:00
Eric Rahm
15057c80cb Bug 1308317 - Part 4: Remove nsSupportsArray::Equals. r=froydnj
|Equals| is not scriptable and unused in our codebase.

MozReview-Commit-ID: BsbJIuR9fSk
2016-10-18 11:36:33 -07:00
Eric Rahm
5eb6276d7f Bug 1308317 - Part 3: Remove nsSupportsArray::SizeTo. r=froydnj
|SizeTo| is not scriptable and unused in our codebase.

MozReview-Commit-ID: 1DrTm46qbar
2016-10-18 11:36:32 -07:00
Eric Rahm
9be4258264 Bug 1308317 - Part 2: Remove nsSupportsArray::MoveElement. r=froydnj
|MoveElement| is not scriptable and unused in our codebase.

MozReview-Commit-ID: CBe8WZHG1JG
2016-10-18 11:36:31 -07:00
Eric Rahm
f89a684018 Bug 1308317 - Part 1: Remove debug code. r=froydnj
MozReview-Commit-ID: 7TQG7flcJkj
2016-10-18 11:36:30 -07:00
Carsten "Tomcat" Book
98c8a7a746 Backed out changeset ea82808b9abd (bug 1308317) 2016-10-14 14:58:49 +02:00
Carsten "Tomcat" Book
46b2fe93c0 Backed out changeset 63208c26bfc3 (bug 1308317) 2016-10-14 14:58:46 +02:00
Carsten "Tomcat" Book
638c43c71b Backed out changeset 8d8a0f01f28c (bug 1308317) 2016-10-14 14:58:44 +02:00
Carsten "Tomcat" Book
8f39dfed93 Backed out changeset bb30697071b2 (bug 1308317) 2016-10-14 14:58:42 +02:00
Carsten "Tomcat" Book
ac6a598542 Backed out changeset 476a831ca87e (bug 1308317) 2016-10-14 14:58:40 +02:00
Carsten "Tomcat" Book
b79e4e00cc Backed out changeset 8c2984643f74 (bug 1308317) 2016-10-14 14:58:38 +02:00
Carsten "Tomcat" Book
3470d6dfe0 Backed out changeset 928ad5e93372 (bug 1308317) 2016-10-14 14:58:35 +02:00
Carsten "Tomcat" Book
b6187e2b2e Backed out changeset 96d1b7238832 (bug 1308317) 2016-10-14 14:58:33 +02:00
Eric Rahm
9aeecd32b2 Bug 1308317 - Part 8: Just use an nsTAutoArray. r=froydnj
This switches over from using a half-baked auto array to nsTAutoArray.

MozReview-Commit-ID: 6FR2SjOhoZR
2016-10-13 22:04:42 -07:00
Eric Rahm
5e0a57ef2e Bug 1308317 - Part 7: Remove nsSupportsArray::RemoveElementsAt. r=froydnj
MozReview-Commit-ID: H3A3gxckw5o
2016-10-13 22:04:41 -07:00
Eric Rahm
b3bce28ad5 Bug 1308317 - Part 6: Remove nsSupportsArray::GetIndexOfStartingAt. r=froydnj
This removes the scriptable method |GetIndexOfStartingAt| which is unused in
our codebase and turns up no references in the plugins repo. This allows to
remove the non-scriptable |IndexOfStartingAt| which is folded into |IndexOf|.

MozReview-Commit-ID: 2ADz5mLIvMU
2016-10-13 22:04:39 -07:00
Eric Rahm
08e653d2cf Bug 1308317 - Part 5: Remove nsSupportsArray::DeleteLastElement. r=froydnj
|DeleteLastElement| is scriptable, but a search of our add-on repo turned up
no hits and there were no references in gecko code. This also allows us to
remove the non-scriptable |RemoveLastElement| which was only called by
|DeleteLastElement|.

MozReview-Commit-ID: 20FXBrosacA
2016-10-13 22:04:38 -07:00
Eric Rahm
b8014cf9d8 Bug 1308317 - Part 4: Remove nsSupportsArray::Equals. r=froydnj
|Equals| is not scriptable and unused in our codebase.

MozReview-Commit-ID: BsbJIuR9fSk
2016-10-13 22:04:37 -07:00
Eric Rahm
23dd90cee5 Bug 1308317 - Part 3: Remove nsSupportsArray::SizeTo. r=froydnj
|SizeTo| is not scriptable and unused in our codebase.

MozReview-Commit-ID: 1DrTm46qbar
2016-10-13 22:04:35 -07:00
Eric Rahm
a3599628c0 Bug 1308317 - Part 2: Remove nsSupportsArray::MoveElement. r=froydnj
|MoveElement| is not scriptable and unused in our codebase.

MozReview-Commit-ID: CBe8WZHG1JG
2016-10-13 22:04:34 -07:00
Eric Rahm
f4bf8c3f70 Bug 1308317 - Part 1: Remove debug code. r=froydnj
MozReview-Commit-ID: 7TQG7flcJkj
2016-10-13 22:04:33 -07:00
Eric Rahm
11d01803a8 Bug 1308036 - Check sizes when growing nsISupportsArray. r=froydnj
This adds size checks when growing the nsISupportsArray. It also removes
|InsertElementsAt| and |AppendElements| which are unused notxpcom interfaces
that would need similar modifications.

MozReview-Commit-ID: ET32q0OCrLU
2016-10-07 09:55:32 -07:00
Nathan Froyd
d50eeaffb6 Bug 1305422 - followup - use correct check for memory allocation failure in nsWindowsRegKey.cpp; r=bustage 2016-09-30 01:56:28 -04:00
Nathan Froyd
d59bcecbbd Bug 1305422 - part 2 - don't call size_forward on ns*String::iterators to check for SetLength failure; r=erahm
We have better ways of checking for SetLength failure nowadays, and even
if these SetLength calls did fail, the program would crash anyway.
2016-09-29 22:33:58 -04:00
Thomas Wisniewski
ba6cb5196e Bug 1305202 - Use NullString() more and remove superfluous Truncates(). r=smaug 2016-09-23 21:10:01 -04:00
David Anderson
f80736e0c8 Shutdown XPCOM-dependent resources in ImageBridgeChild at the appropriate time. (bug 1298938 part 3.1, r=mattwoodrow)
--HG--
extra : rebase_source : 9579e1ca6ec1af2fac7cd0fc4574b849cc8b8e12
2016-09-13 16:30:57 -07:00
Nicholas Nethercote
c2306345d5 Bug 1297658 - Avoid unnecessary checking in memory reporters. r=erahm.
This patch removes checking of all the callback calls in memory reporter
CollectReport() functions, because it's not useful.

The patch also does some associated clean-up.

- Replaces some uses of nsIMemoryReporterCallback with the preferred
  nsIHandleReportCallback typedef.

- Replaces aCallback/aCb/aClosure with aHandleRepor/aData for CollectReports()
  parameter names, for consistency.

- Adds MOZ_MUST_USE/[must_use] in a few places in nsIMemoryReporter.idl.

- Uses the MOZ_COLLECT_REPORT macro in all suitable places.

Overall the patch reduces code size by ~300 lines and reduces the size of
libxul by about 37 KiB on my Linux64 builds.

--HG--
extra : rebase_source : e94323614bd10463a0c5134a7276238a7ca1cf23
2016-08-24 15:23:45 +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
Nicholas Nethercote
3873d0c8f6 Bug 1295053 (part 4) - Don't use NS_METHOD for remaining xpcom functions. r=froydnj.
These don't need __stdcall on Win32.

--HG--
extra : rebase_source : 19e4bf0d67b7fe25f53c0cff24471ef23d26dcf0
2016-08-15 14:49:26 +10:00
Igor
175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor
a57972337d Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07: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
Igor
4878f6bf37 Bug 1289890 - Change nsCOMArray::ReplaceObjectAt() return type from "bool" to "void", since it always succeeds. r=froyndnj 2016-08-02 16:20:00 +02:00
Matthew Wein
33de9c036e Bug 1285063 - Part 1: Add a helper to XPCOMUtils to iterate over entries in a category. r=kmag
MozReview-Commit-ID: 3mjrPrRuLej

--HG--
extra : rebase_source : 7b7dad1a4bab958a590c24d97f564e34b3355633
2016-07-11 17:33:06 -07: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
Chris Peterson
d634a99cad Bug 1277106 - Part 4: Remove MOZ_UTF16() macro. r=Waldo 2016-07-19 21:07:53 -07:00
Ralph Giles
956493cd6e Bug 1275744 - Reference MOZ_LOG in xpcom comments. r=erahm
NSPR_LOG_MODULES is deprecated.

MozReview-Commit-ID: Cel3JCLXLmp

--HG--
extra : rebase_source : da100ece62fd571d19a07455f8c256f5cd39f62b
2016-05-25 15:26:10 -07:00
Jarda Snajdr
a8fa0feb87 Bug 1269765 - Notify http-on-opening-request in content process. r=valentin 2016-05-30 01:24:00 +02:00
Bobby Holley
70200c80e9 Bug 1275755 - Remove main-thread restrictions on atoms. r=froydnj 2016-05-28 17:08:10 +01:00
Bobby Holley
2c597c5a3d Bug 1275755 - Use a GC scheme to free unused atoms. r=froydnj 2016-05-28 17:08:08 +01:00
Bobby Holley
95caf3be29 Bug 1275755 - Protect gAtomTable with a lock. r=froydnj 2016-05-28 17:08:07 +01:00