gecko-dev/dom/fetch
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
..
ChannelInfo.cpp Bug 1197379 - Remove support for intercepting app:// URIs using service workers; r=jdm 2016-01-27 15:26:27 -05:00
ChannelInfo.h Bug 1204596 - Part 1: Avoid overriding the channel final URI when it gets intercepted; r=nsm,bkelly 2015-10-01 18:47:04 -04:00
ChannelInfo.ipdlh Bug 1204596 - Part 1: Avoid overriding the channel final URI when it gets intercepted; r=nsm,bkelly 2015-10-01 18:47:04 -04:00
Fetch.cpp Bug 1293690 P2 Set explicit status levels to fail at when calling WorkerHolder::HoldWorker. r=baku 2016-08-18 07:11:04 -07:00
Fetch.h Bug 1269154 - Get rid of WorkerFeature: WorkerHolder, r=khuey 2016-06-23 10:53:14 +02:00
FetchDriver.cpp Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm. 2016-09-02 17:12:24 +10:00
FetchDriver.h Bug 1278778 - Show JS stack traces of Fetch requests in Netmonitor r=bkelly 2016-06-14 04:08:00 +01:00
FetchIPCTypes.h Bug 1263991 part 3: Support incoming and outgoing requests/responses. r=baku f=bkelly 2016-06-07 02:46:03 -07:00
FetchTypes.ipdlh Bug 1263991 part 4: Support response body. r=bkelly 2016-06-07 02:46:03 -07:00
FetchUtil.cpp Bug 918706 - Return NS_ERROR_DOM_SYNTAX_ERR if method is invalid, r=khuey 2016-03-17 15:29:42 +08:00
FetchUtil.h Bug 1206166 - Move FetchUtil::Consume methods into separate BodyUtil class and update Fetch.cpp and ServiceWorkerEvents.cpp accordingly. r=kitcambridge 2016-02-27 13:54:11 -08:00
Headers.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
Headers.h Bug 1108181 - Make Headers iterable; r=bzbarsky 2015-10-20 07:45:32 -04:00
InternalHeaders.cpp Bug 1263991 part 3: Support incoming and outgoing requests/responses. r=baku f=bkelly 2016-06-07 02:46:03 -07:00
InternalHeaders.h Bug 1263991 part 3: Support incoming and outgoing requests/responses. r=baku f=bkelly 2016-06-07 02:46:03 -07:00
InternalRequest.cpp Bug 1294620 - Use infallible XPIDL attribute getters more. r=erahm. 2016-08-12 15:19:29 +10:00
InternalRequest.h Bug 1282408 - add ignore initialization check flag for variables from InternalRequest. r=jst 2016-06-30 10:05:00 +03:00
InternalResponse.cpp Bug 1287163 - Remove over-strict asserts in InternalResponse IPC code. r=sicking 2016-07-18 13:01:00 -04:00
InternalResponse.h Bug 1263991 part 4: Support response body. r=bkelly 2016-06-07 02:46:03 -07:00
Request.cpp Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj 2016-08-24 14:47:04 +08:00
Request.h Backed out changeset dc42de66de8c (bug 1243791) landing with wrong bug number 2016-05-10 12:50:15 +02:00
Response.cpp Bug 1292293 - Part 2: Remove custom default ByteString handling logic from ResponseInit, r=bz 2016-08-05 17:47:43 -04:00
Response.h Bug 1273279 - Changes in preparation for FlyWeb landing. Change InternalResponse handling to track body size. r=baku f=bkelly 2016-06-01 17:02:29 -04:00
moz.build Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00