Commit Graph

82 Commits

Author SHA1 Message Date
Nicholas Nethercote
8207e5343f Bug 1332172 - Remove XPC_MAP_WANT_*. r=mccr8.
nsIXPCScriptable flags handling in xpc_map_end.h is a bit of a mess.

- Half the flags relate to whether various functions are defined (PreCreate,
  GetProperty, etc). These are set using the XPC_MAP_WANT_* macros;
  for each one xpc_map_end.h  inserts the corresponding flag using the
  preprocessor (see XPC_MAP_CLASSNAME::GetScriptableFlags()).

- The other half of the flags relate to other things (IS_GLOBAL_OBJECT,
  DONT_REFLECT_INTERFACE_NAMES, etc). These are set using the XPC_MAP_FLAGS
  macro.

Having two similar but different mechanisms to set the flags for a class is
confusing. (Indeed, until recently we had some classes where a single flag was
redundantly specified via both mechanisms.) Note also that the classes done in
dom/base/nsIDOMClassInfo.h also specify all the flags in a single value,
similar to how XPC_MAP_FLAGS works.

This patch removes the XPC_MAP_WANT_* macros. All flags are now set
via XPC_MAP_FLAGS. This is a significant simplification to xpc_map_end.h and
all the places that use it.

The downside of this change is that I had to change the flag constants from
class constants (i.e. nsIXPCScriptable::FOO) to macros (i.e.
NSIXPCSCRIPTABLE_FOO) because they need to be used in #if statements like this
in xpc_map_end.h:

  #if !((XPC_MAP_FLAGS) & NSIXPCSCRIPTABLE_WANT_PRECREATE)

and you can't use a '::'-qualified name inside a #if. I think this downside is
outweighed by the simplification described above.

Overall the patch removes 80 lines of code.
2017-01-23 13:33:58 +11:00
Nicholas Nethercote
5905c66334 Bug 1324330 (part 2) - Make XPC_MAP_FLAGS non-optional when using xpc_map_end.h. r=mccr8.
I'd like to remove XPC_MAP_WANT_* altogether and use XPC_MAP_FLAGS for all the
nsIXPCScriptable flag setting, but I haven't worked out how to handle the
method definitions in xpc_map_end.h yet. In the meantime, it seems good to make
the flag setting more consistent and explicit.

In particular, the three "Module" classes have "#define XPC_MAP_WANT_CALL" and
"#define XPC_MAP_FLAGS nsIXPCScriptable::WANT_CALL" which both have the same
effect. The patch removes the latter, to make them consistent with other
classes.
2016-12-23 08:30:22 +11:00
Nicholas Nethercote
331b61b868 Bug 1321374 - Simplify js::Class handling relating to nsIXPCScriptable. r=mccr8, sr=bholley.
This patch removes XPCNativeScriptableShared and XPCNativeScriptableSharedMap,
which results in a net reduction of ~100 lines of code.
2016-12-14 08:33:46 +11:00
Sylvestre Ledru
a15f1c5d08 Bug 1318004 - Replace default bodies of special member functions with = default; r=Ehsan
MozReview-Commit-ID: 33AOhtFrXS8
2016-11-16 18:26:14 +01:00
Wes Kocher
b620596e75 Backed out 4 changesets (bug 1318004) for xpcshell failures a=backout CLOSED TREE
Backed out changeset a3fe53641526 (bug 1318004)
Backed out changeset a5d1676b6f88 (bug 1318004)
Backed out changeset b56b37f0f4d7 (bug 1318004)
Backed out changeset fb5254baf1cb (bug 1318004)
2016-11-21 16:15:38 -08:00
Sylvestre Ledru
eaf1a1bb8c Bug 1318004 - Replace default bodies of special member functions with = default; r=Ehsan
MozReview-Commit-ID: 33AOhtFrXS8
2016-11-16 18:26:14 +01:00
Wes Kocher
13642ca8af Backed out 4 changesets (bug 1318004) for xpcshell failures a=backout
Backed out changeset 6995bd33872b (bug 1318004)
Backed out changeset 9be5c856bc78 (bug 1318004)
Backed out changeset 365b0b7f289a (bug 1318004)
Backed out changeset 2f2ebf176eac (bug 1318004)
2016-11-21 12:23:17 -08:00
Sylvestre Ledru
c30faf12df Bug 1318004 - Replace default bodies of special member functions with = default; r=Ehsan
MozReview-Commit-ID: 33AOhtFrXS8
2016-11-16 18:26:14 +01:00
Sebastian Hengst
6cf65ed900 Bug 1310297 - Remove test annotations using b2g, mulet or gonk: toolkit. r=RyanVM
MozReview-Commit-ID: I5LuDjnM7By
2016-11-05 11:29:22 +01:00
Mark Banner
233309fbe2 Bug 1251003 - Change .eslintrc files to .eslintrc.js to avoid obsolete config file format. r=mossop
MozReview-Commit-ID: JrbFxQ5rj6I
2016-10-18 08:38:10 +01:00
Tom Tromey
1b5a2bdb96 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
2016-07-14 10:16:42 -06:00
Chris Peterson
1e35dbdf75 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Dave Townsend
8dc7f59eb3 Bug 1229142: Link browser and toolkit test directory to the shared eslintrc files. r=Standard8 2015-11-30 13:05:00 -08:00
Chris Peterson
752223fd52 Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Nicholas Nethercote
12fec02dfb Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
2015-08-27 20:44:53 -07:00
Birunthan Mohanathas
a29151dc87 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Ehsan Akhgari
ea41d8de48 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Jonathan Griffin
c4f9588ed3 Bug 1116187 - Disable failing mochitest-chrome tests for B2G, r=gbrown 2015-02-06 16:30:37 -08:00
Jim Blandy
39dc0c6097 Bug 914753: Make Emacs file variable header lines correct, or at least consistent. DONTBUILD r=ehsan
The -*- file variable lines -*- establish per-file settings that Emacs will
pick up. This patch makes the following changes to those lines (and touches
nothing else):

 - Never set the buffer's mode.

   Years ago, Emacs did not have a good JavaScript mode, so it made sense
   to use Java or C++ mode in .js files. However, Emacs has had js-mode for
   years now; it's perfectly serviceable, and is available and enabled by
   default in all major Emacs packagings.

   Selecting a mode in the -*- file variable line -*- is almost always the
   wrong thing to do anyway. It overrides Emacs's default choice, which is
   (now) reasonable; and even worse, it overrides settings the user might
   have made in their '.emacs' file for that file extension. It's only
   useful when there's something specific about that particular file that
   makes a particular mode appropriate.

 - Correctly propagate settings that establish the correct indentation
   level for this file: c-basic-offset and js2-basic-offset should be
   js-indent-level. Whatever value they're given should be preserved;
   different parts of our tree use different indentation styles.

 - We don't use tabs in Mozilla JS code. Always set indent-tabs-mode: nil.
   Remove tab-width: settings, at least in files that don't contain tab
   characters.

 - Remove js2-mode settings that belong in the user's .emacs file, like
   js2-skip-preprocessor-directives.
2014-06-24 22:12:07 -07:00
Birunthan Mohanathas
eeb9aaaa94 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Jon Coppeard
6764423a06 Bug 959787 - Handlify JS_GetProperty and related APIs r=terrence r=bz 2014-01-31 09:55:20 +00:00
Carsten "Tomcat" Book
040116afa3 Backed out changeset e2c75ec7f3d4 (bug 959787) for breaking b2g builds on a CLOSED TREE 2014-01-31 12:11:23 +01:00
Jon Coppeard
c3f1bdd1c4 Bug 959787 - Handlify JS_GetProperty and related APIs r=terrence r=bz 2014-01-31 09:55:20 +00:00
Ms2ger
910b78c73d Bug 956862 - Move some mochitests to manifests; r=mshal 2014-01-20 08:58:27 +01:00
Mike Hommey
97a38484da Bug 939632 - Remove LIBRARY_NAME for leaf libraries. r=gps
Landing on a CLOSED TREE.
2013-11-19 11:50:54 +09:00
Mike Hommey
06e3b30661 Bug 939074 - Remove most LIBXUL_LIBRARY. rs=gps 2013-11-19 11:48:10 +09:00
Mike Hommey
7f7e4faac1 Bug 939044 - Remove most definitions of MODULE. r=mshal 2013-11-19 11:47:39 +09:00
Mike Hommey
656e86914a Bug 935881 - Use FINAL_LIBRARY for all (fake) libraries that end up linked in a single other library. r=gps 2013-11-19 11:47:14 +09:00
Mike Hommey
8227d7aa95 Bug 929905 - Consolidate sources in moz.build. r=gps 2013-10-25 08:23:05 +09:00
Birunthan Mohanathas
b55ff3bd65 Bug 784739 - Switch from NULL to nullptr in toolkit/components/ (1/2); r=ehsan 2013-10-10 16:38:05 -04:00
Ms2ger
94faef7220 Bug 900980 - Part a: Move unconditional assignments to EXPORT_LIBRARY to moz.build; rs=gps 2013-10-03 09:11:13 +02:00
Ehsan Akhgari
41784ed79f Bug 913851 - Minimize the #includes in js/xpconnect; r=bholley
X-Git-Commit-ID: 78e6843063b303780a7dd2695dd2824a0a9c9a3c
2013-09-09 23:14:10 +02:00
Mike Hommey
b207d5baf7 Bug 912293 - Remove now redundant boilerplate from Makefile.in. r=gps 2013-09-05 09:01:46 +09:00
Ms2ger
318a1bbfa3 Bug 883284 - Part f: Move LIBXUL_LIBRARY into moz.build (p-z); r=glandium 2013-08-22 08:56:01 +02:00
Ms2ger
29328591d6 Bug 882859 - Part b: Move FAIL_ON_WARNINGS into moz.build; r=joey+gps 2013-08-22 08:55:59 +02:00
Trevor Saunders
3d9c31c46f bug 886526 - remove IS_COMPONENT and MODULE_NAME makefile vars for things in libxul r=bsmedberg r=glandium 2013-08-08 20:12:37 -04:00
Nicholas Nethercote
f7d6f07d24 Bug 898914 (part 1) - Remove JSBool. 2013-08-08 15:53:04 -07:00
Trevor Saunders
abf5a3107b backout bug 886526 because it probably made us use a lot more memory to link on windows 2013-07-29 11:03:21 -04:00
Jon Coppeard
775f06b442 Bug 897484 - GC: Convert JS_GetProperty APIs to take MutableHandleValue r=terrence r=bholley r=smaug 2013-07-26 10:00:38 +01:00
Carsten "Tomcat" Book
beb4a5c20d Backed out changeset ae8d72538dee (bug 897484) for b2g bustage 2013-07-26 12:34:25 +02:00
Jon Coppeard
ba2b6e849c Bug 897484 - GC: Convert JS_GetProperty APIs to take MutableHandleValue r=terrence r=bholley r=smaug 2013-07-26 10:00:38 +01:00
Trevor Saunders
6a7cf6d688 bug 886526 - disallow MODULE_NAME and IS_COMPONENT for makefiles in libxul r=bsmedberg 2013-06-25 11:15:21 -04:00
Mike Shal
9e113cb641 Bug 880245 - Move EXTRA_JS_MODULES to moz.build (batch #2); r=joey 2013-06-17 15:22:56 -04:00
Brian O'Keefe
df70c9c82e Bug 875934 - Move LIBRARY_NAME to moz.build (batch #1); r=mshal 2013-06-17 15:21:01 -04:00
Mike Shal
42d90ead43 Bug 864774 - Part 2: Move CPPSRCS to moz.build as CPP_SOURCES; r=joey CLOSED TREE
From 9e0ba7f425143f545eb6c4b26a9a96b5ade4d8e9 Mon Sep 17 00:00:00 2001
2013-04-23 17:54:15 -04:00
Tom Schuster
b419003d07 Bug 865410 - Use CallArgs for XPConnect Call and Construct hooks. r=bholley. 2013-05-04 19:25:15 +02:00
David Zbarsky
e37c03f2f4 Bug 867459: Root toolkit/ r=terrence 2013-05-01 18:43:53 -04:00
Tom Schuster
437e18383d Bug 862834 - Root mozJSComponentLoader. r=bholley,terrence 2013-04-23 17:48:05 +02:00
Kyle Machulis
331f36baa9 Bug 855465 - Add emacs python mode comments to moz.build files; r=gps 2013-04-01 11:36:59 -07:00
Kyle Machulis
ec9b53db93 Backout for changeset 03452b187c14 (Bug 855465) due to bustage on a CLOSED TREE; r=qdot 2013-03-29 15:12:58 -07:00