Commit Graph

17785 Commits

Author SHA1 Message Date
Dorel Luca
2b4e625186 Backed out changeset b57df5aa1534 (bug 1457813) for conflict after bug 833098 got backed out. CLOSED TREE 2018-05-08 14:49:35 +03:00
Chris Peterson
5a63a12794 Bug 1457813 - Part 3: Remove NS_PRECONDITION definition. r=froydnj
Use fatal MOZ_ASSERT or non-fatal NS_ASSERTION instead.

MozReview-Commit-ID: 1QAsgoWpXDn

--HG--
extra : source : 9ca972b6b3e7d3b576e20a0bf412df51d82aad9f
extra : intermediate-source : a909a9d7bc9a53095e963a4bea45f4fc4aa85b72
2018-04-27 21:42:24 -07:00
Chris Peterson
71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
sotaro
b482332d39 Bug 1457387 - Remove WrExternalLogHandler r=jrmuizel 2018-05-04 14:31:32 +09:00
Kris Maglione
a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
sotaro
666719aa81 Bug 1456350 - Forward webrender error log to gfxCriticalNote r=bholley 2018-04-27 16:48:39 +09:00
Boris Zbarsky
6bf97b61c0 Bug 1455674 part 13. Remove remaining xpidl uses of nsIDOMElement. r=qdot 2018-04-26 23:37:29 -04:00
Emilio Cobos Álvarez
0faef276ec Bug 1455885: Make the SVG context paint not use a node property, but a member in SVGDocument. r=jwatt
MozReview-Commit-ID: H6SRTsDL5Rh
2018-04-26 17:07:39 +02:00
Jeff Walden
04d21ccac0 Bug 1451248. r=jorendorff, r=bz
--HG--
extra : rebase_source : e26439a5954162bdaf332fbd63d623a3810e19e0
2018-04-25 19:40:09 -07:00
Michael Kaply
c2f87a5b92 Bug 1418953 - Remove NS_APP_USER_SEARCH_DIR. r=florian
MozReview-Commit-ID: DYzdJtz5aEH

--HG--
extra : rebase_source : 4dc75dfb011a174b7baf50e6f7faa720d88e4723
2018-04-24 15:19:47 -05:00
Brindusan Cristian
9265429dcd Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-04-25 00:57:49 +03:00
Brindusan Cristian
59f801793b Merge inbound to mozilla-central. a=merge 2018-04-25 00:50:59 +03:00
Tarek Ziadé
90bafd1f42 Bug 1452580 - remove RELEASE_OR_BETA defines for PerformanceCounter usage - r=baku,erahm,farre
PerformanceCounters are currently disabled in two ways:

- a preference that's off by default "dom.performance.enable_scheduler_timing"
- calls made only for nightly using #ifndef RELEASE_OR_BETA

In order to simplify the code, let's remove the #ifndef and rely only on the pref.
That will also allows us to use the feature in every version going forward.

The performance will not be impacted since the current code is already using
the (cached) pref value to determine if the counters are used.

MozReview-Commit-ID: 47t2M1O13aH

--HG--
extra : rebase_source : e129e1829f1dc37c019e50e156474c4876d6d6cb
2018-04-24 22:03:06 +02:00
Boris Zbarsky
4b6ed4c011 Bug 1456261. Add cycle collection bits for WebIDL dictionaries. r=smaug 2018-04-24 11:57:40 -04:00
Kris Maglione
33ff77dabf Bug 1363925: Part 3 - Move more install logic from XPIProvider to XPIInstall. r=aswan
MozReview-Commit-ID: 87PXV43Lpn9

--HG--
extra : rebase_source : dfc38cfb001455243449d7fe0da7f9294e88c8c2
extra : histedit_source : 6e561d0601dcca8da34c926b72e65a126bd40572
2018-04-21 18:29:33 -07:00
Gijs Kruitbosch
c4a85a5a4d Bug 1456171 - make getPluginBlocklistState API asynchronous, r=kmag
MozReview-Commit-ID: KcDWtkdkNKs

--HG--
extra : rebase_source : 3c96317565b0efecc796ba4429324aa6c2945a69
2018-04-23 17:11:34 +01:00
Nathan Froyd
2d58b9d7fb Bug 1455178 - avoid static constructors for atom initialization; r=njn
For reasons unknown, if you give MSVC:

// Foo.h
struct Foo
{
  ...
};

extern const Foo gFoo;

// Foo.cpp, which necessarily includes Foo.h.
extern constexpr Foo gFoo = {
};

MSVC will create a static initializer for gFoo and place it in the
read/write data section, rather than the read-only data section.
Removing the `extern const` declaration seems to be enough to make this
problem go away.  We need to adjust the declaration of other variables
to compensate for the non-visibility of gFoo in the header file.
2018-04-22 16:53:22 -04:00
Gabriele Svelto
902c8cde47 Bug 1451002 - Send ongoing memory pressure notifications when a low-memory condition persists for a long time; r=njn
--HG--
extra : rebase_source : d98800a5116e13dfc28e546cbf26beb0d6090147
2018-04-18 17:07:39 +02:00
Aaron Klotz
5317435ec0 Bug 1432653: Refactor the DLL interceptor and parameterize its memory operations; r=handyman
MozReview-Commit-ID: EYxVsQ1kicy

--HG--
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherBase.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherDetour.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherNopSpace.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/nsWindowsDllInterceptor.h
rename : toolkit/xre/test/win/TestDllInterceptor.cpp => mozglue/tests/interceptor/TestDllInterceptor.cpp
extra : amend_source : 84a7590b40a649f7321eb05feca4f9256ecc5d22
2018-04-09 13:37:52 -06:00
Jorg K
7559921ade Bug 1455221 - Part 3: Increase size of table used by perfect hash function from 256 to 512. r=nika 2018-04-20 10:13:00 +03:00
Nika Layzell
7653728855 Bug 1455221 - Part 2: Assert if there is a duplicated UUID or name in xptcodegen.py, r=mccr8 2018-04-19 10:28:00 +03:00
Kris Maglione
903e86e865 Bug 1455458: De-XPIDLify the blocklist service. r=gijs
Going through XPConnect for JS-to-JS access in the blocklist service adds no
benefit, but does add a lot of overhead and maintenance burden.

MozReview-Commit-ID: Lf1mDK0b0B0

--HG--
extra : rebase_source : 410ed3fcf999d7c7775ef4926c89f67d9e342da8
2018-04-19 16:01:24 -07:00
Dorel Luca
644bf34f8b Backed out 8 changesets (bug 1453011, bug 1452981, bug 1146316) For xpcshell and mochitest failures on multiple files. CLOSED TREE
Backed out changeset 033299f27339 (bug 1453011)
Backed out changeset 4464997475c1 (bug 1453011)
Backed out changeset cae243fb2a3c (bug 1453011)
Backed out changeset adf56a83131b (bug 1453011)
Backed out changeset 80abe3305b24 (bug 1452981)
Backed out changeset 02178545f255 (bug 1452981)
Backed out changeset 719f7596c208 (bug 1146316)
Backed out changeset 1316c78daeb6 (bug 1146316)
2018-04-20 21:40:24 +03:00
Peter Van der Beken
21bd76217a Bug 1453011 - Remove CONTENT_NODE. r=bz.
--HG--
extra : rebase_source : fb900637133ceaf55aa13c7829f168fdd7b80d7d
2018-04-16 12:58:55 +02:00
Peter Van der Beken
79663afa7d Bug 1452981 - Remove qsObjectHelper. r=bz.
--HG--
extra : rebase_source : 931b915a05d026d826ceb5ec919c3909f9bae053
2018-03-01 09:01:00 +01:00
Matt Woodrow
a6e9002c24 Bug 1406727 - Improve diagnostics in BuildDisplayList. r=froydnj
MozReview-Commit-ID: Ctb7HFxgPac

--HG--
extra : rebase_source : 696683a6a905e0f4862e0a7f8a9708c487e5248b
2018-02-06 12:21:31 +13:00
Nathan Froyd
9362ad6e83 Bug 1454052 - make MakeScopeExit a MOZ_MUST_USE function; r=gerald
Otherwise, one can do thinkos like:

  MakeScopeExit(...);

and the scope exiting function will execute much earlier than the
intended:

  auto guard = MakeScopeExit(...);
2018-04-18 12:14:18 -04: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
697573d613 Bug 1444991 - Part 3: Generate DOMObject info for xptinfo, r=mccr8
Unlike the other lists in xptinfo, this list contains relocations. Each
DOMObject has 3 functions generated for it, `Wrap`, `Unwrap` and `Cleanup`,
which perform the necessary actions. These are stored as function pointers.

Wrap gets the DOMObject wrapper using the DOM binding code, Unwrap gets the
underlying C++ object, and addrefs it (as XPCOM methods return native types
via getter_AddRefs), and Cleanup releases a reference to the underlying
C++ object, for when the unwrapped object is used as a temporary during a call.

To generate the code, we need to have the declaration of the native C++ type
in scope, so we also emit #include-s for the headerFiles.
2018-04-17 19:21:02 -04:00
Nika Layzell
6969209b41 Bug 1444991 - Part 2: Parse webidl productions in xpidl, r=mccr8
They are parsed into a WebIDL object, and lowered into C++, Rust, and XPT.

For C++ code, we generate a correctly namespaced forward declaration. In Rust,
the types are exposed as `*const c_void`, as we don't have WebIDL type
information there.

The XPT code generator needs to know the header filename in order to perform
correct codegen, so we also get that information.
2018-04-17 19:21:00 -04:00
Nika Layzell
be8b24333a Bug 1444991 - Part 1: Read webidl's Bindings.conf, and pass it into xpidl, r=mccr8
This information is read in order to handle correctly selecting the native
type and header files for WebIDL types.
2018-04-17 19:20:58 -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
04547a4a00 Bug 1444745 - Part 4: Rewrite xptinfo, and write a new xptcodegen.py to generate the required datastructures, r=mccr8
This patch contains the meat of the changes here. The following summarize the changes:
1. xptinfo.h is rewritten to expose the new interface for reading the XPT data,

The nsXPTInterfaceInfo object exposes methods with the same signatures as
the methods on nsIInterfaceInfo, to make converting code which used
nsIInterfaceInfo as easy as possible, even when those methods don't have
signatures which make a ton of sense anymore. There are also a few methods
which are unnecessary (they return `true` or similar), which should be
removed over time.

Members of the data structures are made private in order to prevent reading
them directly. Code should instead call the getter methods. This should make
it easier to change their memory representation in the future. Constructing
these structs is made possible by making the structs `friend class` with the
XPTConstruct class, which is implemented by the code generator, and is able
to access the private fields.

In addition, rather than using integers with flag constants, I opted for
using C++ bitfields to store individual flags, as I found it made it easier
to both write the code generator, and reason about the layouts of the types.

I was able to shave a byte off of each nsXPTParamInfo (4 bytes -> 3 bytes)
by shoving the flags into spare bits in the nsXPTType. Unfortunately there
was not enough room for the retval flag. Fortunately, we already depend in
our code on the retval parameter being the last parameter, so I worked
around this by removing the retval flag and instead having a `hasretval`
flag on the method itself.

2. An xptinfo.cpp file is added for out-of-line definitions of more complex
methods, and the internal implementation details of the perfect hash.

Notable is the handling of xptshim interfaces. As the type is uniform, a
flag is checked when trying to read constant information, and a different
table with pointers into webidl data structures is checked when the type is
determined to be a shim.

Ideally we could remove this once we remove the remaining consumers of the
existing shim interfaces.

3. A python code generator which takes in the json XPT files generated in the
previous part, and emits a xptdata.cpp file with the data structures. I did
my best to heavily comment the code.

This code uses the friend class trick to construct the private fields of the
structs, and avoid a dependency on the ordering of fields in xptinfo.h.

The sInterfaces array's order is determined by a generated perfect hash
which is also written into the binary. This should allow for fast lookups by
IID or name of interfaces in memory. The hash function used for the perfect
hash is a simple FNV hash, as they're pretty fast.

For perfect hashing of names, another table is created which contains
indexes into the sInterfaces table. Lookup by name is less common, and this
form of lookup should still be very fast.

4. The necessary Makefiles are updated to use the new code generator, and
generate the file correctly.
2018-04-17 19:20:55 -04:00
Nika Layzell
95b7d44e5d Bug 1444745 - Part 3: Replace the XPT file format with a JSON based one, r=mccr8
This patch adds a python script based on the old typelib.py script which takes
in a parsed XPIDL file, and generates a json-based XPT file to use as a build
intermediate. I did my best to keep the generated format simple.
2018-04-17 19:20:53 -04:00
Nika Layzell
c29896177a Bug 1444745 - Part 2: Add the xptshim and xptshimfile attributes to xpidl, r=mccr8
In the previous patch, one of the files which was deleted is ShimInterfaceInfo.
This is an implementor of nsIInterfaceInfo which exists for legacy reasons, in
order to allow Components.interfaces.nsIDOM* to have the correct constants and
IIDs associated with them.

As that file was deleted, this information now has to be stored in the typelib.
To do this, the information is moved to the xptshim and xptshimfile attributes
on the relevant xpcom interfaces.

xptshim(...) means that this xpcom interface is a shim for the WebIDL interface
with the specified name.

xptshimfile(...) is for use when the webidl interface is declared in another
interface's .webidl file, (in our case, MessageManager.webidl). It contains the
name of the parent binding, such that we can #include the correct file in our
generated code.

This patch does not add the code which uses these changes, only the parsing
logic.
2018-04-17 19:20:51 -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
Csoregi Natalia
12a8bddd95 Merge inbound to mozilla-central. a=merge 2018-04-18 00:52:25 +03:00
Nathan Froyd
32dc58b2ba Bug 1451255 - make nsTraceRefcnt handle multibyte characters in log files; r=mccr8
...on Windows, at least.  Apparently if you have environment variables
set that contain multibyte characters, and ask for them with getenv, you
get garbage.  Or perhaps you get something sensible, but then passing it
to fopen produces garbage.  Either way, the most reasonable way to
handle this is to use the Windows wide-character APIs all over.
2018-04-17 10:13:42 -04:00
Nicholas Nethercote
59e46f2358 Bug 1451535 - Remove NS_ConstExprIsAscii() functions. r=froydnj 2018-04-17 20:03:52 +09:00
Jan Horak
bda48ed89f Bug 1411589 - Export ShouldUseFlatpakPortal(); r=stransky
We need to detect the flatpak environment on multiple places.
Making the ShouldUseFlatpakPortal() exported to the nsIGIOService
allows us to reuse it.

MozReview-Commit-ID: 41NJyR3fqZQ

--HG--
extra : rebase_source : 4ebb9ba2ff98d3c6d924223485e028929eb801ed
2018-03-08 17:39:59 +01:00
Makoto Kato
d7238e0835 Bug 1453551 - Don't use i8 as c_char in xpcom-gtest. r=mystor
c_char isn't i8 on some platforms such as Android/arm, so we should use c_char
instead.

MozReview-Commit-ID: 486BCGvYAE0

--HG--
extra : rebase_source : 0ee9d510de5cd8ab20daa1709c7425ca95dc8793
2018-04-12 15:28:08 +09:00
Margareta Eliza Balazs
c67897746e Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-04-16 21:50:32 +03:00
Margareta Eliza Balazs
dbef13782c Backed out 2 changesets (bug 1451278) for breaking windows pgo builds a=backout
Backed out changeset ac685df07bfc (bug 1451278)
Backed out changeset 5944ccd5060d (bug 1451278)
2018-04-16 21:41:03 +03:00
Nicholas Nethercote
2224229b3d Bug 1451278 - Remove NS_ConstExprIsAscii() functions. r=froydnj
MozReview-Commit-ID: DG2HUOa7x6y

--HG--
extra : rebase_source : a0e2f24f96cb688d11984827acb1361abc4988e6
2018-04-16 08:37:25 +10:00
Nicholas Nethercote
e1318b1d03 Bug 1451278 - Remove ConstExpr hash functions. r=froydnj
MozReview-Commit-ID: L6yRyt4DZRR

--HG--
extra : rebase_source : 2d56a50b1a99e66c397165b9b851e23ca66d97a0
2018-04-16 08:37:15 +10:00
Gijs Kruitbosch
7e069d9ac9 Bug 1452618 - make getAddonBlocklistEntry asynchronous, r=kmag
MozReview-Commit-ID: 4Kpx7M57404

--HG--
extra : rebase_source : d5ec8fa24ebbcc1463079ab9e06ab7080115ca90
2018-04-09 16:00:38 +01:00
Jeff Walden
821db93ccc Bug 1453456 - Replace nsCRT::IsAscii{Alpha,Digit} with mfbt/TextUtils.h versions. r=froydnj
--HG--
extra : rebase_source : b31986c0e6828be79442cfb0cf369eb80c232139
2018-04-12 20:19:30 -07:00
Noemi Erli
1b65998665 Merge inbound to mozilla-central. a=merge 2018-04-14 12:49:03 +03:00
Jan de Mooij
2dd36cfeae Bug 1452982 part 9 - Remove/rename remaining ZoneGroup references. r=jonco 2018-04-14 09:03:47 +02:00
Andreea Pavel
64cb3f9968 Backed out 4 changesets (bug 1453456) for build bustages at js/src/jit-test/tests/ctypes/conversion-primitive.js on a CLOSED TREE
Backed out changeset 50cd4a60a402
Backed out changeset e0f8f325c2ce (bug 1453456)
Backed out changeset 6a84718ddfe1 (bug 1453456)
Backed out changeset fde6a66eb317 (bug 1453456)
2018-04-14 00:52:06 +03:00