Граф коммитов

779 Коммитов

Автор SHA1 Сообщение Дата
Cameron Kaiser 1db7aa3620 Bug 1576303 - Fix and tune xptcall for ppc64le, and harmonize with x86_64's. r=tcampbell,froydnj
Fix handling of ABI arguments in xptcinvoke for PPC64 platforms. Previously, non-floating-point arguments would advance the index of which floating-point register to use. This cleans up both of the platform-specific invoke and stubs to be better aligned to the x86_64 model.

Differential Revision: https://phabricator.services.mozilla.com/D46421

--HG--
extra : moz-landing-system : lando
2019-09-19 19:45:20 +00:00
Tom Ritter 2d0fd702ee Bug 1570563 - Sync in xptcstubs code from x86_64 to x86_64_gnu r=froydnj
This contains two changes. One is to zero out the top 56 bits for a bool
conversion so we can pass bools correctly from cpp -> js. This was also
needed in Bug 821628, 1513725

The other change copies the fix in Bug 689288 where we cast a float value
as a double.

Differential Revision: https://phabricator.services.mozilla.com/D40686

--HG--
extra : moz-landing-system : lando
2019-08-05 20:00:45 +00:00
Petr Sumbera f3628fdebc Bug 1566814 - nsXPTCStubBase::Stub##n functions shouldn't be build with stack-protector in nxptcstubs_sparc64_openbsd.cpp r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D39148

--HG--
extra : moz-landing-system : lando
2019-07-24 09:54:10 +00:00
Andrew Halberstadt 3486ba642c Bug 1563797 - Use 'backports.shutil_which' instead of 'which' across the tree r=Callek
Differential Revision: https://phabricator.services.mozilla.com/D37097

--HG--
extra : moz-landing-system : lando
2019-07-11 14:03:39 +00:00
Mike Hommey 2d8b3e71e4 Bug 1557164 - Don't use integrated assembler with clang on mips*. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D33865

--HG--
extra : moz-landing-system : lando
2019-06-06 00:46:18 +00:00
Mike Hommey 1df02a3dbb Bug 1555530 - Don't use integrated assembler with clang on ppc64 and s390x. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D33728

--HG--
extra : moz-landing-system : lando
2019-06-05 00:34:33 +00:00
Nicklas Boman 779fb0d72a Bug 1122740 - remove useless null checks after allocating memory with |new| r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D33445

--HG--
extra : moz-landing-system : lando
2019-06-04 04:43:11 +00:00
Nathan Froyd 0273818ea0 Bug 1542048 - mark aarch64 unix's PrepareAndDispatch as used; r=mccr8
Otherwise, LTO will eliminate it because the compiler can't see the
calls to PrepareAndDispatch from the relevant assembly file.

Differential Revision: https://phabricator.services.mozilla.com/D26244

--HG--
extra : moz-landing-system : lando
2019-04-04 21:13:47 +00:00
Nathan Froyd 3cb7a40d1f Bug 1538236 - fix LTO issues with arm xptcstubs; r=mccr8
ARM's xptcstubs use a slightly different setup for PrepareAndDispatch
than...well, all of our other stubs.  This difference appears to be
causing problems with LTO builds.  Change the setup to be more like our
other stubs, which additionally gets rid of some of the `asm` nonsense.

Differential Revision: https://phabricator.services.mozilla.com/D26243

--HG--
extra : moz-landing-system : lando
2019-04-04 21:14:18 +00:00
Petr Sumbera a13bbbbdf7 Bug 1432125 - Solaris xptcall clean-up - support 64bits gcc/clang only r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D25448

--HG--
extra : moz-landing-system : lando
2019-04-02 00:57:29 +00:00
Nathan Froyd 50dec861c6 Bug 1527471 - part 2 - generate unwind data for xptcall aarch64 windows routines; r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D19820

--HG--
extra : moz-landing-system : lando
2019-02-14 20:34:53 +00:00
Nathan Froyd 4935a6e5d2 Bug 1527471 - part 1 - preprocess aarch64 windows assembly xptcall files; r=dmajor
We need to preprocess these files so we can eventually add unwind
information, for which we need to include C headers.

Differential Revision: https://phabricator.services.mozilla.com/D19819

--HG--
extra : moz-landing-system : lando
2019-02-14 20:58:45 +00:00
Nika Layzell 1c2a9c2b07 Bug 1526382 - Part 1: Split nsID& and nsID* in xpconnect, r=mccr8
Currently the [ref] and [ptr] types share the same underlying
implementation. This is unfortunate, and can cause correctness problems
with outparam refs (as an example).

By using the same tools used to allow other larger objects (such as
jsid, nsTArray, and nsString) to be stored directly in the nsXPTCVariant
object, this patch directly stores the nsID in the nsXPTCVariant object
when calling from JS into C++.

Using this new strategy avoids an nsID* allocation every time we pass
one over XPConnect, and should also allow us to simplify callers.

In addition, some special casing is added to xpidl to make it possible
to use the nsid reference type objects directly inside of Array<T>,
which will allow us to remove `[array] nsIIDPtr` callers.

Differential Revision: https://phabricator.services.mozilla.com/D19175

--HG--
extra : moz-landing-system : lando
2019-02-13 21:42:00 +00:00
Makoto Kato 9d8359ef7d Bug 1524544 - Add CFI directive to SharedStub and _NS_InvokeByIndex. r=froydnj
Gecko Profiler uses DWARF information to get stack. But xptcall assembler for
Android/aarch64 doesn't have CFI directive, so it cannot walk stack well.

Differential Revision: https://phabricator.services.mozilla.com/D18335

--HG--
extra : moz-landing-system : lando
2019-02-05 04:51:34 +00:00
Gijs Kruitbosch e09d523f4a Bug 1513725 - fix xptcall stubs for aarch64 for bool params, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D17252

--HG--
extra : moz-landing-system : lando
2019-01-22 16:36:34 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Adrian Wielgosik 3aae9fcc99 Bug 1480245, part 3 - Remove always-true nsXPTInterfaceInfo::EnsureResolved(). r=nika
Differential Revision: https://phabricator.services.mozilla.com/D9645

--HG--
extra : moz-landing-system : lando
2018-10-24 17:39:47 +00:00
A. Wilcox 041115caa2 Bug 1498938 - Support [implicit_jscontext] XPIDL calls on Linux/PPC64.; r=froydnj 2018-10-17 23:12:51 +00:00
Nathan Froyd 3445a4da75 Bug 1494511 - export aarch64 windows xptcstubs from their source file; r=dmajor
DONTBUILD because NPTOB.
2018-09-27 11:17:21 -04:00
Tom Ritter 50da904b0c Bug 1490568 Quote the _PrepareAndDispatch symbol to fix the mingw-clang x86 build r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D6045

--HG--
extra : moz-landing-system : lando
2018-09-17 15:30:14 +00:00
Tom Ritter b5f6d986cc Bug 1491856 Change .scl 3 -> .scl 2 in the reflect assembly r=dmajor
As in Bug 1390583 and Bug 1470993, this will correct them to be external symbols

Differential Revision: https://phabricator.services.mozilla.com/D6044

--HG--
extra : moz-landing-system : lando
2018-09-17 15:27:24 +00:00
Nathan Froyd 7624eea8a4 Bug 1480549 - add aarch64 windows support to xptcall; r=dmajor
Since the ABI on this platform just uses the ARM procedure call
standard, which is the same standard Unix uses, we can just
copy-and-paste everything, with some adjustments to the assembly code to
compile properly.
2018-08-29 15:49:57 -04:00
Nika Layzell f1902ff595 Bug 1480624 - Part 1: Add XPT_FOR_EACH_*_TYPE macros to xptinfo.h, r=mccr8
Summary:
This macro simplifies code which allows performing an operation on or
extracting information from a particular nsXPTType's native representation.

It is also used in part 2 to implement xpc::DestructValue.

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1480624

Differential Revision: https://phabricator.services.mozilla.com/D2689
2018-08-03 15:55:13 -04:00
Nika Layzell 7fa88ded1b Bug 1474369 - Part 8: Rename from Sequence to Array in xpidl, r=mccr8
Summary:
This more closely matches the C++ names, and reflects the fact that the
reflected type is not WebIDL's mozilla::dom::Sequence. The reasoning behind this
type difference is for ergonomics, due to xpidl only being exposed to internal
JS code.

Depends On D2335

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2337
2018-07-31 17:53:03 -04:00
Nika Layzell 985488cb0f Bug 1475409 - Part 2: Be more explicit about the type of nsXPTType::Tag(), r=mccr8
This will get us both more clarity as to what types are, but also will improve switch exhaustiveness checks.

Summary: Depends On D2113

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1475409

Differential Revision: https://phabricator.services.mozilla.com/D2114
2018-07-31 17:53:02 -04:00
Nika Layzell d4c9b9edf4 Bug 1474369 - Part 4: Add support for Sequence<T> types to xpidl and XPConnect, r=mccr8
Summary:
This patch adds support for the `Sequence<T>` type. This is largely a
straightforward type propagation patch, but there are a few notable things:

 1. We allow `[iid_is(x)] Sequence<nsQIResult>`, so Sequence can be Dependent.

 2. `Sequence<T>` is reflected into C++ as a `nsTArray<T>`, which is different
    than WebIDL's `mozilla::dom::Sequence<T>` type. This decision was made for
    general ergonomics reasons, as `nsTArray<T>` is more prevailent throughout
    the codebase, and lengths in this case cannot be controlled by content, as
    XPConnect is only exposed to Chrome JS.

 3. Owned pointers in `Sequence<T>` are not reflected as their owned
    counterparts. For example, `Sequence<nsISupports>` is reflected as
    `nsTArray<nsISupports*>` rather than `nsTArray<RefPtr<nsISupports>>`. This
    was done to avoid depending on `RefPtr<T>` and `T*` having the same
    in-memory representation, however if that is considered an acceptable
    dependency, it would be nice to support that.

 4. We also don't reflect singly-owned pointers as their owned counterparts. For
    example, `nsTArray<nsIIDPtr>` would be reflected as `nsTArray<nsIID*>`
    rather than `nsTArray<mozilla::UniquePtr<nsIID>>`. If we are willing to
    depend on `mozilla::UniquePtr<T>`'s in-memory representation, we could also
    do this, however.

 5. There are no restrictions on what types can appear inside of a `Sequence<T>`
    or what can appear inside an `[array] T`. We may want to add restrictions
    either at the xpidl level or in XPConnect.

Depends On D2109

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2110
2018-07-31 17:53:01 -04:00
Nika Layzell 5ee2c61291 Bug 1474369 - Part 1: Clean up value initialization codepaths in XPConnect, r=mccr8
Summary:
A goal of the Sequence<T> work is to allow using more complex types within lists
in XPConnect. For example, we ideally want to support `Sequence<AString>`,
rather than requiring people to use the unergonomic 'wstring' type.

These types require initialization before they can be read into. Currently this
initialization for parameters is directly handled by XPCWrappedNative's
CallMethodHelper object.

This patch introduces a new function to the `xpc` namespace to initialize a
specific value from an uninitialized state to a safe state.

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2105
2018-07-31 17:53:00 -04:00
qiaopengcheng ffa75bd086 Bug 1478560 - Fix the compiling error of the struct nsXPTCVariant. r=glandium 2018-07-31 09:39:31 +09:00
Cosmin Sabou e748fd8968 Backed out 15 changesets (bug 1475409, bug 1461450, bug 1474369, bug 1471726) for causing rooting hazards and browser chrome failures. CLOSED TREE
Backed out changeset 7ce27aa3ce68 (bug 1474369)
Backed out changeset a8a4e2414daa (bug 1474369)
Backed out changeset 13c9626970e2 (bug 1474369)
Backed out changeset 9817819b7765 (bug 1475409)
Backed out changeset 39fcebfe6529 (bug 1475409)
Backed out changeset c19ca740d3d1 (bug 1475409)
Backed out changeset b26c90518fca (bug 1474369)
Backed out changeset cbdde0474521 (bug 1474369)
Backed out changeset ccea3049fe0f (bug 1474369)
Backed out changeset e9f6d2544a82 (bug 1474369)
Backed out changeset 99c4d07d4b88 (bug 1474369)
Backed out changeset c721ada8a6d6 (bug 1461450)
Backed out changeset 961379be0f5e (bug 1461450)
Backed out changeset cf2448b2635f (bug 1471726)
Backed out changeset 408961783c95 (bug 1471726)
2018-07-30 20:31:24 +03:00
Nika Layzell 72ed07e711 Bug 1474369 - Part 8: Rename from Sequence to Array in xpidl, r=mccr8
Summary:
This more closely matches the C++ names, and reflects the fact that the
reflected type is not WebIDL's mozilla::dom::Sequence. The reasoning behind this
type difference is for ergonomics, due to xpidl only being exposed to internal
JS code.

Depends On D2335

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2337
2018-07-30 11:31:41 -04:00
Nika Layzell e1f1115f9a Bug 1475409 - Part 2: Be more explicit about the type of nsXPTType::Tag(), r=mccr8
This will get us both more clarity as to what types are, but also will improve switch exhaustiveness checks.

Summary: Depends On D2113

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1475409

Differential Revision: https://phabricator.services.mozilla.com/D2114
2018-07-30 11:28:17 -04:00
Nika Layzell 0f6863aece Bug 1474369 - Part 4: Add support for Sequence<T> types to xpidl and XPConnect, r=mccr8
Summary:
This patch adds support for the `Sequence<T>` type. This is largely a
straightforward type propagation patch, but there are a few notable things:

 1. We allow `[iid_is(x)] Sequence<nsQIResult>`, so Sequence can be Dependent.

 2. `Sequence<T>` is reflected into C++ as a `nsTArray<T>`, which is different
    than WebIDL's `mozilla::dom::Sequence<T>` type. This decision was made for
    general ergonomics reasons, as `nsTArray<T>` is more prevailent throughout
    the codebase, and lengths in this case cannot be controlled by content, as
    XPConnect is only exposed to Chrome JS.

 3. Owned pointers in `Sequence<T>` are not reflected as their owned
    counterparts. For example, `Sequence<nsISupports>` is reflected as
    `nsTArray<nsISupports*>` rather than `nsTArray<RefPtr<nsISupports>>`. This
    was done to avoid depending on `RefPtr<T>` and `T*` having the same
    in-memory representation, however if that is considered an acceptable
    dependency, it would be nice to support that.

 4. We also don't reflect singly-owned pointers as their owned counterparts. For
    example, `nsTArray<nsIIDPtr>` would be reflected as `nsTArray<nsIID*>`
    rather than `nsTArray<mozilla::UniquePtr<nsIID>>`. If we are willing to
    depend on `mozilla::UniquePtr<T>`'s in-memory representation, we could also
    do this, however.

 5. There are no restrictions on what types can appear inside of a `Sequence<T>`
    or what can appear inside an `[array] T`. We may want to add restrictions
    either at the xpidl level or in XPConnect.

Depends On D2109

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2110
2018-07-30 11:28:08 -04:00
Nika Layzell 6391732616 Bug 1474369 - Part 1: Clean up value initialization codepaths in XPConnect, r=mccr8
Summary:
A goal of the Sequence<T> work is to allow using more complex types within lists
in XPConnect. For example, we ideally want to support `Sequence<AString>`,
rather than requiring people to use the unergonomic 'wstring' type.

These types require initialization before they can be read into. Currently this
initialization for parameters is directly handled by XPCWrappedNative's
CallMethodHelper object.

This patch introduces a new function to the `xpc` namespace to initialize a
specific value from an uninitialized state to a safe state.

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2105
2018-07-30 11:28:00 -04:00
Nathan Froyd 695cb9d23b Bug 1477081 - remove TARGET_CPU use from moz.build files; r=ted.mielczarek
TARGET_CPU is not canonicalized, whereas CPU_ARCH is, so we should be
using CPU_ARCH to get consistent values everywhere.
2018-07-24 16:08:55 -04:00
Nathan Froyd 309ddc0be2 Bug 1477048 - part 2 - remove non-ipc/chromium moz.build uses of OS_TEST; r=gps
The deletions in xptcall are when we don't even have support for the CPU
in moz.configure, so I assume that people haven't been compiling on
those architectures for quite some time.
2018-07-24 16:08:56 -04:00
Nathan Froyd 5158597854 Bug 1477048 - part 1 - remove `'86' in CONFIG['OS_TEST']` stanzas from moz.build files; r=gps
The current code is somewhat non-obvious to a first-time reader, and
OS_TEST is a bizarre thing anyway, since it's actually the name of the
CPU we're running on.  We'd do well to minimize the use of OS_TEST.

Note that the complete nuking of the xptcall/md/unix/moz.build lines are
because we don't support OS X/x86 anymore.
2018-07-24 16:08:56 -04:00
Robert Bartlensky 06d2e947d6 Bug 1476313: Fix DEAD_STORE errors in xpcom/reflect/xptcall/md/unix/*. r=mccr8
MozReview-Commit-ID: 29GpsKzXQhq

--HG--
extra : rebase_source : 25e5028f0aadb3cbf8f3e50e3b3af1cf8dc827f2
2018-07-19 11:36:42 +01:00
Bobby Holley 4d4dfa4633 Bug 1476987 - Eliminate nsXPTCVariant::ptr. r=nika
MozReview-Commit-ID: JCazltUuMBf

Differential Revision: https://phabricator.services.mozilla.com/D2241

--HG--
extra : moz-landing-system : lando
2018-07-21 01:25:37 +00:00
Jan de Mooij ef23676856 Bug 1475699 - Support invoking JS-implemented XPIDL methods/attributes marked as [implicit_jscontext]. r=mccr8 2018-07-17 18:11:03 +02:00
Jacek Caban 16173fb976 Bug 1470993 - Fix reflect mingw clang compilation r=dmajor
MozReview-Commit-ID: 4al9Yid9prK

--HG--
extra : rebase_source : 97d59d43270bd2ee23380d0b3cade2dbf9c517d0
2018-06-25 21:51:39 +02:00
David Major a22b21c63c Bug 1470488 - don't instrument win32's xptcall SharedStub; r=froydnj
Compiler-inserted instrumentation is going to do terrible things to this
function, so don't let the compiler do that.
2018-06-22 13:51:13 -04:00
Nika Layzell 3043db4105 Bug 1457972 - Part 10: Make sure to allocate ExtendedVal inline, r=froydnj 2018-05-14 17:55:57 -04:00
Nika Layzell e2240ec5a2 Bug 1457972 - Part 4: Remove dipper types, r=mccr8
In XPConnect, native values are passed around within nsXPTCMiniVariant objects.
an [nsXPTCMiniVariant] contains 64-bits of data in a union type.

nsXPTCMiniVariant values are created by the platform-specific glue code and
passed into XPConnect proper when calling from C++ into JS.

When calling from JS into C++, we instead create nsXPTCVariant objects and pass
them into the glue code. These objects have extra information in addition to the
nsXPTCMiniVariant: namely they also have a `type` field with the type stored in
the variant, space for flags, and a `ptr` field which is passed over IPC instead
of the inner nsXPTCMiniVariant when a flag (`PTR_IS_DATA`) is set.

The JSValue type in XPConnect is always passed as a pointer to a JSValue object,
both for in parameters and out parameters. This is handled by making the JSValue
type be unconditionally flagged as [`IsIndirect()`] This flag is also used for
all types of outparameters.

When the `IsIndirect()` flag is set, it means that the actual data is stored in
the nsXPTCVariant's val field, and it sets the flag to tell the glue code to
instead pass the `ptr` field (which is always pointing to the `val` field for
[legacy reasons]) into the C++ code.

In contrast "dipper" is a different and super weird flag. Currently only the
string class types (nsACString & nsAString) are marked as "dipper". A "dipper"
type is always passed as an "in" type (and thus always passed "directly"), even
when it's actually an out parameter.

XPConnect treats these types as though they are pointer types (nsAString*). This
means that there is no space in the nsXPTCVariant to store the actual nsAString
types when passing from JS into C++, so these values have to be allocated by a
different mechanism (in the current code, there is a size 2 buffer for each
string type in the context and once that buffer is exceeded, we heap allocate
the nsString values).

In effect, the current state looks something like this:
+------------+---------------------+---------------------+
| type       | out (xpt/native)    | in (xpt/native)     |
+------------+---------------------+---------------------+
| TD_INT32   | indirect (int32_t*) | direct (int32_t)    |
+------------+---------------------+---------------------+
| TD_JSVAL   | indirect (JSValue*) | indirect (JSValue*) |
+------------+---------------------+---------------------+
| TD_ASTRING | direct (nsAString*) | direct (nsAString*) |
+------------+---------------------+---------------------+

This patch ensures there is enough space in the nsXPTCVariant to fit the
nsString value, and switches string class types to being unconditionally
indirect instead of using the dipper system. This allows us to delete a ton of
dipper-specific code, and unify the indirect and string class codepaths.

This only affects the size of nsXPTCVariant objects, and does not affect
nsXPTCMiniVariant objects. nsXPTCVariant objects are never allocated by the
platform-specific binding code, rather, they are allocated in an AutoTArray on
the stack as part of the CallMethodHelper object.

The size increase is a total of 1 word, so 4 bytes in 32-bit builds, and 8 bytes
in 64-bit builds, which is ignorable for stack allocated objects.

[nsXPTCMiniVariant]: https://searchfox.org/mozilla-central/rev/eb6c5214a63e20a3fff455e92c876287a8d2e188/xpcom/reflect/xptcall/xptcall.h#20-47
[`IsIndirect()`]: https://searchfox.org/mozilla-central/rev/c0d81882c7941c4ff13a50603e37095cdab0d1ea/xpcom/reflect/xptinfo/xptinfo.h#371
[legacy reasons]: https://searchfox.org/mozilla-central/rev/eb6c5214a63e20a3fff455e92c876287a8d2e188/xpcom/reflect/xptcall/xptcall.h#66-79
2018-05-14 17:55:55 -04:00
Nika Layzell c9d0fe3dd2 Bug 1455217 - Part 1: Add an explicit Promise type to xpidl, r=mccr8
This type is fairly simple on the idl parsing side of things. I handle it in the
same way that special types such as ns[C]String, nsid, and jsval are handled, by
using a special native type.

The logic for converting the value between C++ and JS follows the existing logic
from the nsISupports <=> JS Promise conversions.
2018-05-14 17:55:53 -04:00
Jeff Walden 04d21ccac0 Bug 1451248. r=jorendorff, r=bz
--HG--
extra : rebase_source : e26439a5954162bdaf332fbd63d623a3810e19e0
2018-04-25 19:40:09 -07:00
Nika Layzell e5f31c03d8 Bug 1444991 - Part 4: Handle DOM Objects in XPConnect, r=mccr8
This patch goes through the XPConnect conversion methods, and adds cases for
T_DOMOBJECT which call the Wrap, Unwrap, and Cleanup methods from the
nsXPTDOMObjectInfo objects created in the last part.

For consistency with normal interface pointers, and because it wasn't too
complex, I also added support for including T_DOMOBJECTs in XPCOM arrays.
2018-04-17 19:21:03 -04:00
Nika Layzell 14da321a67 Bug 1444745 - Part 5: Update consumers of nsIInterfaceInfo to use the nsXPTInterfaceInfo directly, r=mccr8
Due to the decision to keep the old API on nsXPTInterfaceInfo in part 4, this is
a fairly straightforward patch.

1. I had to change a couple of consumers of `IsRetval()` due to the movement of
that flag.
2. I changed all code which held a nsIInterfaceInfo to hold an `const
nsXPTInterfaceInfo*` instead.
3. I changed code which used the nsIInterfaceInfoManager to instead call the
static methods on nsXPTInterfaceInfo.
2018-04-17 19:20:56 -04:00
Nika Layzell f5f86c989e Bug 1444745 - Part 1: Clear out xptinfo and typelib to make way for the this patch, r=mccr8
Unfortunately, I wasn't able to figure out a way to make firefox build & run in
the intermediate stages of these commits. Because of this, I am going to just
delete most of the code which I am deleting in the first patch, as I figure that
those are somewhat uninteresting changes, and then make the other changes in the
following patches.

In total, the following things are deleted:
1. All of xpcom/typelib, except for `xpt/tools` - this directory is being
subsumed entirely into xpcom/reflect/xptinfo.
2. Most of the code in xpcom/reflect/xptinfo, it is being rewritten to avoid
allocating and contain all of the necessary data structures.
3. idl-parser's typelib.py XPT generator, as it will be replaced.
4. Most includes of files which have been deleted.

NOTE: xpcom/typelib/xpt/tools/xpt.py was not removed, as it is used by bundling
code & bundling tests, which we don't want to remove yet.
2018-04-17 19:20:50 -04:00