Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Go to file
Masayuki Nakano 2773c4d0ef Bug 1310618 Replace nsresult variables |res| with |rv| under editor/ r=Ehsan
In our coding rules, variable names of nsresult should be rv.  Indeed, when you see |rv| in the code, you must assume that its type if nsresult.

However, a lot of code under editor/ uses |res| for the variables of nsresult.  Let's replace |res| with |rv|.

And this patch improves following points:

1. When |rv| is set in both |if| and |else| block and they are check outside of them, this moves the check into each |if| and |else| block because even if the failure is notified with warning, you cannot see which case was performed and failed.  This change makes it clear.

2. When |return rv;| returns non-error code because |rv| is checked with NS_ENSURE_SUCCESS() immediately before, setting replacing it with |return NS_OK;| is clearer.

3. Move declaration of |nsresult rv| into smaller scope as far as possible.  This prevents setting rv to unexpected value and easier to check its value at reading the code.

MozReview-Commit-ID: 9MAqj7sFey3

--HG--
extra : rebase_source : 0fd316b851ea616b3a95d8c1afc111ff55e11993
2016-10-19 18:09:33 +09:00
.cargo Bug 1277338 - Part 1: Turn js/src into the mozjs-sys crate; r=sfink 2016-10-13 16:12:42 -07:00
accessible Merge m-c to m-i 2016-10-18 19:45:02 -07:00
addon-sdk Bug 1310094 - Part 2: Remove UserCustomizations.jsm; r=myk 2016-10-17 14:08:30 -04:00
b2g Bug 1310027 - Remove DOM/mobilemessage and related code. r=Ehsan 2016-10-17 17:26:51 -07:00
browser Bug 1310027 - Remove DOM/mobilemessage and related code. r=Ehsan 2016-10-17 17:26:51 -07:00
build Bug 1311761 - Fixup after bug 1311069. r=chmanchester 2016-10-21 06:15:38 +09:00
caps Backed out changeset 2bfd163f23f9 (bug 553032) 2016-10-19 18:29:36 +02:00
chrome Bug 1304302 part 10 - Replace all uses of StyleSheetHandle. r=heycam 2016-09-26 22:03:25 +10:00
config Bug 1310939 - Pass $(CARGOFLAGS) to cargo invocations so cargo flags can be passed from a .mozconfig file. r=froydnj 2016-10-18 16:04:57 +08:00
db/sqlite3 Bug 1293367 - Upgrade to SQLite 3.14.1. r=asuth 2016-08-18 22:02:22 -04:00
devtools Backed out changeset ac36d8c6cb45 (bug 1309191) for dt3 failures a=backout 2016-10-20 15:50:57 -07:00
docshell Bug 1310378 - Remove support for mozwidget; r=baku 2016-10-17 13:15:36 -04:00
dom Bug 1310548 - Delay firing of 'waitingforkey' until all decoded data has been rendered. r=jya 2016-10-17 14:16:54 +13:00
editor Bug 1310618 Replace nsresult variables |res| with |rv| under editor/ r=Ehsan 2016-10-19 18:09:33 +09:00
embedding Bug 1311223 - Stop using nsISupportsArray for window args. r=froydnj 2016-10-19 16:23:57 -07:00
extensions Bug 1261019 - Part 3: Remove Navigator.mozApps and code depending on it; r=myk,jryans,fabrice,mcmanus,peterv 2016-10-13 13:18:41 -04:00
gfx Merge autoland to m-c, a=merge 2016-10-19 18:25:54 -07:00
gradle/wrapper Bug 1300094 - Update Gradle to 2.14.1 and Gradle Plugin to 2.1.3 r=sebastian 2016-09-22 14:31:01 -07:00
hal Bug 1306708 - Rename prio to nested in IPDL (r=dvander) 2016-10-04 20:34:54 -07:00
image Bug 1308289 - Hold strong reference to VectorImage when dispatching ProgressTracker::SyncNotifyProgress. r=tnikkel 2016-10-13 08:35:55 -04:00
intl Bug 1310733 - Part 0: Rename tzdata svn directory to "source" instead of using version name. r=Waldo 2016-10-18 11:46:21 -07:00
ipc Bug 1241921: Remove CreateWindow* hooks from IPC glue; r=jimm 2016-10-17 12:06:58 -06:00
js Backed out changeset 818fc5631d72 (bug 553032) 2016-10-19 18:29:41 +02:00
layout Bug 1310027 - Remove DOM/mobilemessage and related code. r=Ehsan 2016-10-17 17:26:51 -07:00
media Backed out changeset 736a78915259 (bug 1310879) 2016-10-19 11:25:00 +02:00
memory Bug 1303232 - Use per-process reduced thread-ids when munging logalloc logs. r=njn 2016-09-20 13:44:27 +09:00
mfbt Backed out changeset 16f326945f38 (bug 553032) for spidermonkey bustage. r=backout on a CLOSED TREE 2016-10-19 18:33:37 +02:00
mobile Bug 1310027 - Remove DOM/mobilemessage and related code. r=Ehsan 2016-10-17 17:26:51 -07:00
modules Bug 1310027 - Remove DOM/mobilemessage and related code. r=Ehsan 2016-10-17 17:26:51 -07:00
mozglue Merge m-i to m-c, a=merge 2016-10-18 19:36:18 -07:00
netwerk Backed out changeset a0f243dead30 (bug 1301649) for developers' request 2016-10-20 15:24:50 +08:00
nsprpub Bug 1293329, Upgrade Firefox 51 to NSPR 4.13, finalizing version numbers, no code change, reusing r=ted 2016-09-27 03:34:52 +02:00
other-licenses bug 1305402 - import atktablecell.h r=davidb 2016-10-18 13:37:25 -04:00
parser Bug 1310156 - Add a null check to nsExpatDriver::HandleError to prevent crashes while determining whether to suppress console error messages. r=smaug 2016-10-14 18:41:08 -04:00
probes Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
python Bug 1311632 - Update route and package names for android artifact builds to reflect gecko.v2 index locations. r=mshal 2016-10-20 12:33:44 -07:00
rdf Bug 1297300 - Add missing checks to GetSpec() calls in rdf/, startupcache/ and xpfe/. r=froydnj. 2016-08-31 09:08:42 +10:00
release/docker Bug 1297519 - Generate multilocale Firefox snaps r=Callek, a=release DONTBUILD 2016-09-17 10:53:41 -04:00
security merge autoland to mozilla-central a=merge 2016-10-20 16:45:10 +02:00
services Bug 1310941 - Fix BookmarksTracker.onItemChanged arguments to avoid triggering syncs for remote changes. r=tcsc 2016-10-18 08:26:43 -07:00
startupcache Bug 1297300 - Add missing checks to GetSpec() calls in rdf/, startupcache/ and xpfe/. r=froydnj. 2016-08-31 09:08:42 +10:00
storage Bug 1251003 - Change .eslintrc files to .eslintrc.js to avoid obsolete config file format. r=mossop 2016-10-18 08:38:10 +01:00
taskcluster Backed out changeset d15798b73b9e (bug 1302763) for taskcluster build issues a=backout CLOSED TREE 2016-10-20 15:59:47 -07:00
testing Backed out changeset d15798b73b9e (bug 1302763) for taskcluster build issues a=backout CLOSED TREE 2016-10-20 15:59:47 -07:00
third_party/rust Bug 1277338 - Part 0: Vendor third party crates needed for the mozjs-sys crate; r=froydnj 2016-10-13 16:12:42 -07:00
toolkit Bug 1310027 - Remove DOM/mobilemessage and related code. r=Ehsan 2016-10-17 17:26:51 -07:00
tools Bug 1309963 - Fix hidden eslint error output when the first line is blank, r=jgraham 2016-10-13 16:22:26 -04:00
uriloader Bug 1310101 - Remove nsILoadContext::IsAppOfType; r=baku 2016-10-14 10:45:27 -04:00
view Back out b00b37cb64ef (bug 1298709) for static analysis bustage 2016-09-05 20:14:56 -07:00
widget Bug 1310027 - Remove DOM/mobilemessage and related code. r=Ehsan 2016-10-17 17:26:51 -07:00
xpcom Bug 1311235 part.3 Rename NS_EDITOR_ELEMENT_NOT_FOUND to NS_SUCCESS_EDITOR_ELEMENT_NOT_FOUND r=Ehsan 2016-10-19 14:35:21 +09:00
xpfe Bug 1297300 - Add missing checks to GetSpec() calls in rdf/, startupcache/ and xpfe/. r=froydnj. 2016-08-31 09:08:42 +10:00
.clang-format
.clang-format-ignore
.eslintignore Bug 1311315 - General small fixes for no-undef eslint issues in browser/. r=jaws 2016-10-18 12:34:35 +01:00
.eslintrc.js Bug 1251003 - Change .eslintrc files to .eslintrc.js to avoid obsolete config file format. r=mossop 2016-10-18 08:38:10 +01:00
.flake8 Bug 1280571 - Add testing/mochitest to the flake8 linter, r=ahal 2016-09-28 08:28:04 -04:00
.gdbinit Bug 1310286 - Instruct gdb to ignore certain signals for which it is not useful to stop. r=glandium DONTBUILD NPOTB 2016-10-14 14:27:44 -04:00
.gdbinit_python
.gitignore Bug 1301790 - Bundle codemirror into a single script;r=gl 2016-09-11 09:38:51 -07:00
.hgignore Bug 1301790 - Bundle codemirror into a single script;r=gl 2016-09-11 09:38:51 -07:00
.hgtags No bug - Tagging mozilla-central fc69febcbf6c0dcc4b3dfc7a346d8d348798a65f with FIREFOX_AURORA_51_BASE a=release DONTBUILD CLOSED TREE 2016-09-19 09:43:48 -04:00
.lldbinit
.taskcluster.yml bug 1298553 - enable chain of trust generation in the decision task. r=dustin 2016-09-27 12:45:22 -07:00
.ycm_extra_conf.py Bug 1293534: Fix .ycm_extra_conf after bug 1195748. r=gps 2016-08-09 10:30:58 -07:00
aclocal.m4 Bug 1262155 - Use moz.build instead of libffi's build system. r=ted,glandium 2016-08-08 16:58:54 -07:00
Android.mk
AUTHORS Backed out changeset d15798b73b9e (bug 1302763) for taskcluster build issues a=backout CLOSED TREE 2016-10-20 15:59:47 -07:00
build.gradle Bug 1300094 - Update Gradle to 2.14.1 and Gradle Plugin to 2.1.3 r=sebastian 2016-09-22 14:31:01 -07:00
client.mk Bug 1296530 - Bustage followup part deux; r=gps 2016-10-17 15:57:46 -07:00
client.py
CLOBBER Bug 1306438 and bug 1304815 - Rust update and related changes require clobber. r=clobber 2016-10-15 18:20:36 +02:00
configure.in Bug 1295751 - Make it possible to copy configure.in to configure. r=gps 2016-08-16 19:35:00 -07:00
configure.py Bug 1296503 - Switch config.status to unicode literals. r=ted 2016-08-24 07:32:52 +09:00
GNUmakefile
gradle.properties
gradlew
LEGAL
LICENSE
mach Bug 1279020 - [mach] Follow symlinked mach binary when searching for a srcdir, r=gps 2016-06-09 17:20:02 -04:00
Makefile.in Bug 1307435 - Generate symbols zip file concurrently; r=ted 2016-10-04 05:57:35 -07:00
moz.build Bug 1289194 - Move tools/fuzzing/libfuzzer reference to toolkit. r=ted 2016-09-10 02:27:23 +02:00
moz.configure Bug 1296530 - Replace include_when with include, and remove include_when. r=chmanchester 2016-10-13 17:15:24 +09:00
mozilla-config.h.in
old-configure.in merge mozilla-inbound to mozilla-central a=merge 2016-10-20 16:47:39 +02:00
README.txt
settings.gradle Bug 1291363 - Add geckoview and geckoview_example Gradle projects. r=jchen,sebastian 2016-10-05 20:23:38 -07:00
test.mozbuild

An explanation of the Mozilla Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure

For information on how to build Mozilla from the source code, see:

    http://developer.mozilla.org/en/docs/Build_Documentation

To have your bug fix / feature added to Mozilla, you should create a patch and
submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at:

    http://developer.mozilla.org/en/docs/Creating_a_patch
    http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree

If you have a question about developing Mozilla, and can't find the solution
on http://developer.mozilla.org, you can try asking your question in a
mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups
are accessible on Google Groups, or news.mozilla.org with a NNTP reader.]

You can download nightly development builds from the Mozilla FTP server.
Keep in mind that nightly builds, which are used by Mozilla developers for
testing, may be buggy. Firefox nightlies, for example, can be found at:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    http://nightly.mozilla.org/