Commit Graph

143 Commits

Author SHA1 Message Date
Nika Layzell
704092bb3b Bug 1293362 - Part 5: Allow implementing xpcom interfaces from rust code with a custom derive, r=froydnj
MozReview-Commit-ID: 90Yv3H40jZW
2018-01-23 17:27:28 -05:00
Nika Layzell
1518874730 Bug 1293362 - Part 4: Generate runtime bindings for calling xpcom methods from rust, r=froydnj
MozReview-Commit-ID: K37KyHkKsSl
2018-01-23 17:27:26 -05:00
Nika Layzell
118c7563b9 Bug 1293362 - Part 3: Add rust type information to the idl-parser for xpidl.py, r=froydnj
MozReview-Commit-ID: IPcuPuXDZho
2018-01-23 17:27:25 -05:00
Andrew McCreight
177958f6bd Bug 338865 - Scriptable XPIDL iface inheriting from noscript iface should throw error. r=froydnj
MozReview-Commit-ID: H6sF4Poz2V0
2017-09-12 15:03:14 -07:00
Andrew Halberstadt
f7b445f2f2 Bug 1339178 - Use pytest to run python-tests, r=davehunt
This switches most tests over to use pytest as the runner instead of unittest (taking
advantage of the fact that pytest can run unittest based tests).

There were a couple tests that had failures when swithing to pytest:
config/tests/unit-expandlibs.py
xpcom/idl-parser/xpidl/runtests.py

For these tests, I added a runwith='unittest' argument so that they still run the
same way as before. Once we fix them to use pytest, the unittest logic in mozunit.py
can be deleted.

MozReview-Commit-ID: Gcsz6z8MeOi
2017-08-29 14:50:33 -04:00
Masatoshi Kimura
a27a786799 Bug 1387803 - Remove the [deprecated] annotation from XPIDL. r=froydnj
MozReview-Commit-ID: 1TOAHAgyf1y
2017-08-06 14:25:57 +09:00
Nicholas Nethercote
53d05ea0a1 Bug 1386962 - Remove template code from XPIDL generated header files. r=froydnj.
XPIDL generated header files contain a |#if 0| block for every interface,
providing the skeleton of the class as it must be implemented in C++. This is
potentially useful, but also very verbose.

This patch removes this code. In a Linux64 debug build, this reduces the total
size of the $OBJDIR/dist/include/nsI*.h files from 11,023,499 bytes to
8,442,350 bytes, a 23.5% reduction. It didn't speed up compilation, though.
2017-08-03 17:05:01 +10:00
Bill McCloskey
cd4311a2d6 Bug 1366869 - Make DISPATCH_NORMAL be the default flags argument for nsIEventTarget::Dispatch (r=froydnj)
MozReview-Commit-ID: 5DVcIaMHH95
2017-05-23 12:05:43 -07:00
Benjamin Smedberg
3a243797b4 Bug 1333826 - Remove SDK_FILES, SDK_LIBRARY, and related is_sdk support in the build goop, r=mshal
MozReview-Commit-ID: 52vPyDXdFte
2017-01-30 11:24:10 -05:00
Nicholas Nethercote
6afc4f7628 Bug 1329857 - Remove NS_METHOD and NS_CALLBACK. r=froydnj.
Bug 1295053 removed most uses of NS_METHOD and NS_CALLBACK, but one use was
unintentionally left behind (in the XPIDL parser) and another has since crept
in (in MediaDrmCDMProxy.h).

So this patch removes NS_METHOD and NS_CALLBACK. NS_METHOD_(nsresult) and
NS_CALLBACK_(nsresult, T) can still be used for the same purpose, but those
alternatives are less likely to be used unintentionally.
2017-01-10 14:08:43 +11:00
Mike Hommey
be8cbce5d2 Bug 1319352 - Allow to run AccEventGen.py and xpild/header.py from any directory. r=mshal 2016-11-22 17:05:49 +09:00
Andrew Halberstadt
7663ee0695 Bug 1317970 - Use manifestparser manifests for python unit tests, r=chmanchester
This deprecates PYTHON_UNIT_TESTS and replaces it with PYTHON_UNITTEST_MANIFESTS.
In the build system, this means python unittests will be treated the same as all
other test suites that use manifestparser. New manifests called 'python.ini' have
been created for all test directories containing python unittests.

MozReview-Commit-ID: IBHG7Thif2D
2016-11-16 09:59:22 -05:00
Mike Shal
d195847de2 Bug 1304131 - list xpidl.stub as the first output for header.py; r=gps
Since xpidllex.py and xpidlyacc.py are created deep in the
other-licenses/ply code, we can't easily pass in our FileAvoidWrite
handle from the mozbuild action. As a result, when ply writes out
xpidllex.py, the mozbuild action overwrites the contents of the file
with a new 0-length xpidllex.py. This causes future xpidl invocations to
write out a new xpidllex.py rather than using the pre-built one.

MozReview-Commit-ID: NOC1Wr3MZO
2016-09-19 13:43:39 -04:00
Nicholas Nethercote
67d754c902 Bug 1295825 (part 1) - Add a [must_use] attribute to XPIDL. r=froydnj.
For XPIDL methods, this causes MOZ_MUST_USE to be prepended to the generated
C++ function declaration.

For XPIDL attributes, this causes MOZ_MUST_USE to be prepended to the generated
C++ getter declaration and (if present) setter declaration.
2016-08-17 11:08:14 +10:00
Michael Layzell
430a857779 Bug 1293001 - Part 4: Add test for xpidl parser modifications, r=froydnj
MozReview-Commit-ID: JTtcwlVH3HN
2016-08-11 15:49:42 -04:00
Michael Layzell
dd2dfd35d3 Bug 1293001 - Part 3: Prevent virtual method overloading in xpidl with the parser, r=froydnj
MozReview-Commit-ID: 7nFq3wJtUoi
2016-08-11 15:49:41 -04:00
Mike Shal
a05b84b2b9 Bug 1293387 - fix header.py direct invocation; r=chmanchester
MozReview-Commit-ID: FtJpzOZ4Is6
2016-07-26 14:15:06 -04: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
Gregory Szorc
aae5d13d7e Bug 1267369 - Only generate typelib data for scriptable interfaces; r=khuey
We are currently generating typelib data for all interfaces. Apparently
typelib data is only needed for scriptable interfaces. So let's stop
generating typelib data for interfaces that aren't scriptable.

The impact of this is that some typelibs are dropped from
interfaces.xpt, resulting in ~10kb smaller interfaces.xpt:

* nsIDOMCSSValue
* nsIDOMDOMImplementation
* nsIDOMDOMCursor
* nsIProfilerStartParams
* nsIStreamingProtocolMetaData
* nsIDOMCharacterData
* nsIPrintSession
* nsIDOMDocumentFragment
* nsIDOMProcessingInstruction
* nsIDOMElement
* nsIDOMText
* nsIDOMXULElement
* nsIDOMAttr
* nsIDOMGeoPositionError
* nsIXMLHttpRequestEventTarget
* nsIDOMCSSStyleDeclaration
* nsIDOMCSSStyleSheet
* nsIDOMDocument
* nsIDOMClientRect
* nsIDOMMozNamedAttrMap
* nsIDOMNode
* nsIThreadObserver
* nsIDOMDocumentType
* nsIXMLHttpRequestUpload
* nsISelection
* nsIDOMCDATASection
* nsIDOMDOMRequest
* nsIDOMComment
* nsIDOMEvent

MozReview-Commit-ID: 3LYdNYs7Tum
2016-04-25 12:32:10 -07:00
Mike Shal
c23bc1798c Bug 1261283 - allow GENERATED_FILES to write to multiple outputs; r=glandium
MozReview-Commit-ID: DbBoZZnasTo
2016-04-01 10:38:22 -04:00
Mike Shal
f53a481d66 Bug 1253431 part 4 - Convert header.py to a GENERATED_FILES script; r=gps
We only ever execute this in one place, so we can just have the main
action do the --regen --cachedir=. mode of operation.

MozReview-Commit-ID: Fis4YBPFjMl
2016-03-03 14:15:58 -05:00
Mike Shal
a6381d6ed9 Bug 1253431 part 3 - Move SDK_BINARY files in xpcom/idl-parser/xpidl to moz.build; r=gps
We can just generate xpidllex.py/xpidlyacc.py in the current directory
rather than one directory higher, and specify this directory as an
include path to xpidl-process.py

MozReview-Commit-ID: KLoGjudc4Y8
2016-03-03 13:49:42 -05:00
Mike Shal
e3dd314dbb Bug 1253431 part 2 - Use SDK_FILES instead of INSTALL_TARGETS; r=gps
MozReview-Commit-ID: K2Va7og0xw9
2016-01-21 16:31:02 -05:00
Ms2ger
e851296f1a Bug 1248950 - Move xpidl unit tests to moz.build; r=ted 2016-03-02 11:21:26 +01:00
Gijs Kruitbosch
d54b7bb5cd Bug 1223142 - make XPIDL set default nullptrs for optional out parameters, r=bz 2015-11-05 22:45:25 +00:00
Bobby Holley
53638b2f73 Bug 1161831 - Generate an extra macro to declare a non-virtual variant of an interface. r=billm
This allows us to have a shared superclass that implements the guts of a shared
superinterface, without having the superclass actually inherit the superinterface
(which leads to annoying and unnecessary diamond-inheritance).
2015-07-21 12:57:20 -07:00
Peter Elmers
b9b8836fad Bug 1183291 - Factor idl-parser into a Python package. r=khuey
Move Python code into an xpidl subdirectory, and include a setup.py to allow
inclusion from pip install or requirements files. Change build directory
variables appropriately.
2015-07-13 13:09:11 -07:00
Boris Kudryavtsev
45d780bbed Bug 1155968 - Fix variable use before initialization. r=khuey 2015-06-02 12:17:00 +02:00
Boris Kudryavtsev
a7b0cc7714 Bug 1155968 - Fix correct number of empty lines between objects to comply with PEP8. r=khuey 2015-05-20 21:56:00 +02:00
Boris Kudryavtsev
d02ebeb840 Bug 1155968 - Fix indentation warnings to comply with PEP8. r=khuey 2015-05-20 21:55:00 +02:00
Boris Kudryavtsev
9e652552cf Bug 1155968 - Whitespace fixes in xpidl.py to comply with PEP8. r=khuey 2015-05-16 12:18:00 +02:00
Boris Kudryavtsev
ca95ae7f4a Bug 1155968 - Change '==' and '!=' to 'is' and 'is not' to comply with PEP8. r=khuey 2015-05-14 19:50:00 +02:00
Boris Kudryavtsev
1e0368096f Bug 1155968 - Correct indent not multiple of 4. r=khuey 2015-05-12 18:41:00 +02:00
Boris Kudryavtsev
d8e637146b Bug 1155968 - Remove semicolons at ends of statements (PEP8). r=khuey 2015-05-09 12:38:00 +02:00
Boris Kudryavtsev
21a2f3b9de Bug 1155968 - Move statements to their own lines. r=khuey 2015-05-05 17:24:00 +02:00
Boris Kudryavtsev
72433cfd6e Bug 1155968 - Whitespace changes in header.py and runtests.py. r=khuey 2015-05-04 22:45:00 +02:00
Boris Kudryavtsev
f24950fa76 Bug 1155968 - Remove trailing whitespace in header.py. r=khuey 2015-05-04 22:41:00 +02:00
Boris Kudryavtsev
8135bbe5d1 Bug 1155968 - Add blank lines where needed in xpcom/idl-parser. r=khuey 2015-05-04 22:35:00 +02:00
Boris Kudryavtsev
8203da5f2b Bug 1155968 - Place imports on separate lines. r=khuey 2015-05-04 22:34:00 +02:00
Bill McCloskey
7657d62e4d Bug 997325 - Implement main process scriptable only flag in XPIDL (r=mrbkap) 2015-03-26 14:39:48 -07:00
Ehsan Akhgari
6d846bbe92 Bug 1145631 - Part 3: Replace MOZ_OVERRIDE with override in the XPIDL codegen; r=froydnj 2015-03-21 12:28:27 -04:00
Nathan Froyd
ef646e0a00 Bug 1140509 - remove the unused Infinity keyword from the xpidl parser; r=bsmedberg 2015-03-09 14:02:26 -04:00
Tom Tromey
5a942feb38 Bug 1097731 - emit using declarations for infallible convenience methods. r=nfroyd 2014-11-12 08:11:00 +01:00
Kyle Huey
be68aeed15 Bug 1034302: Emit MOZ_OVERRIDE in XPIDL generated macros. r=bsmedberg 2014-08-21 10:49:39 -07:00
Birunthan Mohanathas
07c41ba961 Bug 1028557 - Part 2: Flatten xpcom/reflect/xptcall/{public,src}/ directories. r=bsmedberg 2014-06-30 08:39:46 -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
Masatoshi Kimura
4cfd762735 Bug 978611 - Part 3: Get rid of legacy dictionaries: events and codegen. r=smaug,khuey 2014-03-07 20:51:51 +09:00
Tom Schuster
4a7dd51a60 Bug 939294 - Change xpidl jsval to handles. r=gabor,bz,khuey,bsmedberg,terrence 2014-01-09 18:39:36 +01:00
Ehsan Akhgari
f75815e241 Bug 927728 - Part 2: Stop using PRUnichar in our code generators; r=roc,bzbarsky 2014-01-04 10:02:43 -05:00
Gregory Szorc
bc09cdcd85 Bug 907902 - Create system isolated virtualenv, remove --system-ply support; r=glandium 2013-09-16 17:21:59 -07:00