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

6812 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru dd5741407b Bug 1498586 - Add clang-format off to avoid the reformatting of the data structures r=Ehsan
Too hard/impossible for the tool to format correctly these structs

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

--HG--
extra : moz-landing-system : lando
2018-10-12 20:48:24 +00:00
Andrew McCreight 53217795fe Bug 1493237 - Use a test-only non-nsISupports wrapper cached WebIDL class in a weak map test r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D8134

--HG--
extra : moz-landing-system : lando
2018-10-11 23:02:10 +00:00
Andrew McCreight 59038534b1 Bug 1497342, part 3 - Turn some WeakMap chrome mochitests into plain mochitests r=bzbarsky
This only requires changing the surrounding test boilerplate and using
SpecialPowers to access chrome-privileged functions.

Depends on D8132

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

--HG--
extra : moz-landing-system : lando
2018-10-10 17:35:56 +00:00
Andrew McCreight 397f9ae888 Bug 1497342, part 2 - Move some weak map tests r=bzbarsky
This patch moves some Chrome mochitests into the plain mochitest
directory, in order to try to preserve the history. It also removes
them from the list of tests. The next patch will fix the tests and
start running them again.

Depends on D8131

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

--HG--
rename : js/xpconnect/tests/chrome/test_getweakmapkeys.xul => js/xpconnect/tests/mochitest/test_getweakmapkeys.html
rename : js/xpconnect/tests/chrome/test_paris_weakmap_keys.xul => js/xpconnect/tests/mochitest/test_paris_weakmap_keys.html
rename : js/xpconnect/tests/chrome/test_weakmaps.xul => js/xpconnect/tests/mochitest/test_weakmaps.html
extra : moz-landing-system : lando
2018-10-10 17:35:54 +00:00
Gurzau Raul fa37566219 Merge inbound to mozilla-central. a=merge 2018-10-10 07:35:14 +03:00
Kris Maglione c0ccca38cd Bug 1455637: Use RefPtr rather than nsCOMPtr to avoid data race. r=mccr8
getter_AddRefs for nsCOMPtr does an AssertNoQueryNeeded check when its
temporary is destroyed. For the mReaderThread, this happens at a time when
control of the member variable has been handed over to the reader thread,
which causes a data race in the query needed check when the reader thread
shuts itself down and clears the member.

Switching to RefPtr solves this problem by removing the unnecessary check.

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

--HG--
extra : rebase_source : 0532d152b6be57451e5729bf6b72e2056f3ed300
2018-10-09 13:22:28 -07:00
Andrew McCreight 8739b376bd Bug 1490507, part 2 - Fix up the comment about double wrapping r=bholley
Depends on D5690

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

--HG--
extra : moz-landing-system : lando
2018-10-09 21:14:39 +00:00
Andrew McCreight ddf48a298f Bug 1490507, part 1 - Remove nsIXPCWrappedJSObjectGetter and move the comment r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D5690

--HG--
extra : moz-landing-system : lando
2018-10-09 21:14:37 +00:00
Csoregi Natalia 9d55d83f31 Merge inbound to mozilla-central. a=merge 2018-10-05 01:29:38 +03:00
Brian Hackett d905141ac5 Bug 1495272 Part 2 - Use DeferredFinalize in SweepTearOffs when recording/replaying, r=smaug.
--HG--
extra : rebase_source : 829a3dea58f123893c591c05795fd6b4f4bba0e9
2018-10-03 15:03:37 -10:00
Narcis Beleuzu b9b1c8ff17 Merge inbound to mozilla-central. a=merge 2018-10-04 18:48:04 +03:00
Jon Coppeard 6c612a4a15 Backed out changeset ba122021b8b5 (bug 1481196) 2018-10-04 11:50:55 +01:00
Andrew Creskey 00474fc9c9 Bug 1495431 Expose baseline and ion JIT warm up threshold options to preferences, about:config r=nbp
JIT warmup options were exposed to preferences to facilitate experimentation/optimization.

The baseline and ion warm up thresholds had already been exposed through JSAPI, just needed to read from Preferences.

The ion JitOption, frequentBailoutThreshold, was also exposed to JSAPI and Preferences.

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

--HG--
extra : moz-landing-system : lando
2018-10-03 19:23:54 +00:00
Narcis Beleuzu de85cdbfc7 Merge mozilla-central to autoland. CLOSED TREE 2018-10-04 18:58:42 +03:00
Henrik Skupin 2141453224 Bug 1433905 - Temporarily disable test_loader_global_sharing.py for opt/pgo builds on Windows. r=gbrown
Marionette currently doesn't handle restarts of Firefox that well,
and as such needs a fix on bug 1433873. Sadly this patch cannot be
landed until the mozprocess issues on bug 1433905 have been fixed.

This patch temporarily disables the test for opt/pgo Windows builds
only. Re-enabling is tracked via bug 1495667.

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

--HG--
extra : moz-landing-system : lando
2018-10-04 10:48:07 +00:00
Andrew McCreight 5cbe1e4d48 Bug 1495820 - Inline do_QueryWrappedNative() r=bzbarsky
This method does very little, and is called in only a few places, so
just inline it. The error variant is not called at all. Simplifying
this makes it easier for me to change do_QueryInterface.

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

--HG--
extra : moz-landing-system : lando
2018-10-03 21:40:26 +00:00
Brendan Dahl 856ed80bda Bug 1461798 - Migrate <tooltip> to a C++ implementation. r=smaug
Move the implementation of the XBL tooltip to C++ so the element can safely
be created during native anonymous content creation. The 'mouseover' and
'mouseout' event handlers were not moved as they appear to be legacy code
that is no longer needed.

A number of tests started perma-failing after this patch. Most failures
were caused by a timing change where plugins sometimes load after the
document "load" event. Many of the failures had intermittents associated
with them and the tests were not waiting for plugins to load before
starting. The test "test_weakmap_keys_preserved2.xul" had a bug where it
was possible for it to finish before all the tests were run.

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

--HG--
extra : moz-landing-system : lando
2018-10-03 20:42:19 +00:00
Lina Cambridge a21adc384b Bug 1495723 - Add support for importing extra symbols to `defineLazyGlobalGetters`. r=kmag
Some global imports, like `fetch`, expose multiple symbols. This patch
ensures we can define lazy getters for those symbols, by mapping the
extra symbol name to the main import name.

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

--HG--
extra : moz-landing-system : lando
2018-10-02 20:10:04 +00:00
Andrew McCreight ea6021b769 Bug 1494127 - Fix trivial calls to do_QueryInterface that return an nsresult r=smaug
Calls to do_QueryInterface to a base class can be replaced by a static
cast, which is faster.

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

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:43 +00:00
Nicholas Nethercote 0979695a1a Bug 1489047 - Remove C++ support for, and testing of, the XPIDL DOMString type. r=nika
--HG--
extra : rebase_source : 21df3192cfff8f9d9254306a5be4f8ad84397eb7
2018-09-06 18:03:18 +10:00
Eric Rahm e5d83b78fd Bug 1494827 - Add USS telemetry for content process startup. r=kmag
This adds telemetry for content processes' USS memory usage on startup.

--HG--
extra : rebase_source : 199a74448a31a5ad31216ca44e5822358f15c2f2
2018-09-27 18:13:05 -07:00
Boris Zbarsky 7d6b9e16ef Bug 1396482 part 2. Enumerate JS standard classes on Window Xrays, just like we enumerateWebIDL interfaces. r=bholley 2018-09-28 10:49:44 -04:00
Andreea Pavel b49640be9b Backed out 2 changesets (bug 1396482) for failing dom/tests/mochitest/general/test_interfaces.html on a CLOSED TREE
Backed out changeset 8c9b27320d6e (bug 1396482)
Backed out changeset c23086c12393 (bug 1396482)
2018-09-28 19:45:27 +03:00
Boris Zbarsky 918ee28a32 Bug 1396482 part 2. Enumerate JS standard classes on Window Xrays, just like we enumerateWebIDL interfaces. r=bholley 2018-09-28 10:49:44 -04:00
Benjamin Bouvier 4c5347b2ed Bug 1490251: Add a pref switch to use Cranelift for wasm compilation; r=luke
--HG--
extra : rebase_source : 9814fd3836b7c06d84b5c8ae08f61a052f076215
extra : histedit_source : 31a2933472deb17e61e02432a69a86048227efde
2018-09-13 12:32:17 +02:00
Emilio Cobos Álvarez d8c0080a10 Bug 1493222 - Expose InspectorUtils to fuzzers. r=bzbarsky
I can be more granular if we want, by adding more ChromeOnly annotations for the
functions that we don't want to expose.

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

--HG--
extra : moz-landing-system : lando
2018-09-27 19:00:33 +00:00
Jason Orendorff e6ab602a75 Bug 1491939 - Part 4: Enable streams on a per-realm basis. Drop dom.streams.enabled and dom.workers.options.streams; use only javascript.options.streams. r=baku
Depends on D6555

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

--HG--
extra : moz-landing-system : lando
2018-09-25 14:11:41 +00:00
Jason Orendorff aaf539046b Bug 1491939 - Part 3: Centralize configuration of JS realm options from prefs. r=baku
Depends on D6554

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

--HG--
extra : moz-landing-system : lando
2018-09-25 14:11:13 +00:00
André Bargull 4c5a158dfe Bug 1463529: Don't add modifiers to built-in or bound function toString representation. r=jorendorff 2018-09-24 10:59:05 -04:00
Jan de Mooij 2ddc8e66b8 Bug 1492759 - Use the principal stored in CompartmentOriginInfo instead of JS_GetCompartmentPrincipals for Xray expandos. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D6467

--HG--
extra : moz-landing-system : lando
2018-09-24 11:20:23 +00:00
Andrew McCreight fee317ab0d Bug 1351501, part 2 - Preserve wrappers for non-nsISupports cycle collected weak map keys r=bzbarsky
A C++ object that is exposed to JS can have its reflector used as a
key in a weak map. Because a weak map does not keep its keys alive,
this means that the reflector can be discarded if it has no other
references aside from the C++ object, which will in turn remove its
weak map entry. If the C++ object can be accessed again later from JS,
it will get a new reflector which will have no weak map entry. This is
bad because it means some internal implementation detail has resulted
in data loss that is visible to JS. (Side note: this is also an issue
for cross compartment wrappers, which is handled by another
mechanism.)

To fix this, we can preserve the wrapper of any DOM reflector used as
a weak map key. This ensures that the reflector and its C++ object
have the same lifetime. If a WebIDL object is not wrapper cached, that
means that it cannot be accessed via C++, so we don't need to preserve
the wrapper. This is currently implemented for nsISupports classes,
but not other classes. For non-nsISupports classes, it would throw an
error rather than silently fail.

My patch adds support for non-nsISupports cycle collected objects. It
turns out that the existing addProperty hook just does wrapper
preservation, so we just call it for cycle collected classes. This
does mean that if addProperty changes in the future to do something
else, this code will need to be changed.

I verified that this test fails if TryPreserveWrapper is changed to do
nothing besides return true in the non-nsISuports case.

Depends on D6197

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

--HG--
extra : moz-landing-system : lando
2018-09-21 18:20:35 +00:00
Andrew McCreight 2abe1a8480 Bug 1351501, part 1 - Handlify TryPreserveWrapper r=bzbarsky
The patch in the next part will need a handle to the object in
TryPreserveWrapper.

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

--HG--
extra : moz-landing-system : lando
2018-09-21 18:20:33 +00:00
Jan de Mooij 4a02cf562c Bug 1491342 - Ignore document.domain in ShouldWaiveXray. r=bholley
We want to get rid of JS_GetCompartmentPrincipals. The origin stored in CompartmentPrivate does not account for document.domain changes because that's a per-realm thing.

Fortunately we should not have waivers in any cases that involve document.domain.

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

--HG--
extra : moz-landing-system : lando
2018-09-21 07:13:15 +00:00
Jan de Mooij 05d25ce307 Bug 1491323 - Use CompartmentOriginInfo instead of deprecated JS_GetCompartmentPrincipals in AccessCheck::subsumes. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D6017

--HG--
extra : moz-landing-system : lando
2018-09-19 15:25:51 +00:00
Kris Maglione dd46a38a66 Bug 1486147: Part 3 - Remove unused XPCOMUtils.IterStringEnumerator method. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4271

--HG--
extra : rebase_source : c2e91a04a0e0999c376f9d747f7afeae4f2a9d37
extra : histedit_source : 72af67a0e2667ba782e102f44ce5a0f0a62804ee
2018-08-24 16:23:03 -07:00
Kris Maglione 1c20e8cbbb Bug 1486147: Part 2 - Update JS string enumerator callers to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4270

--HG--
extra : rebase_source : 2adadcc8e51a7bce1da02f4bee1333b77bfa9944
extra : histedit_source : 9df920fd186f8c96a5d8b9cbff53ea9529f26ee0
2018-08-24 16:22:40 -07:00
Jeff Walden 9725076b9b Bug 1491137 - Remove the two setUTF8(bool) CompileOptions functions now that the underlying field they alter is gone. r=jandem
--HG--
extra : rebase_source : c06e34549bd3b895d34cad93c5c3113ed4748390
2018-09-18 08:41:41 -07:00
Jeff Walden 389643b114 Bug 1491137 - Remove JS::Evaluate that takes const char*/size_t, rewriting all callers to use JS::Evaluate{Latin1,Utf8}, including opting some callers in to UTF-8 where they had not used it before. r=jandem
--HG--
extra : rebase_source : f3ec0fbca691474981a1366b744da48a61006edc
2018-09-17 11:24:37 -07:00
Ehsan Akhgari 15d11d2475 Bug 1491561 follow-up: Build bustage fix
Landed on a CLOSED TREE
2018-09-18 11:27:24 -04:00
Ehsan Akhgari 5d33bd136d Bug 1491561 follow-up: Add back Cu.createCommandParams() which was accidentally removed 2018-09-18 11:12:21 -04:00
Ehsan Akhgari 5d9d4af0cd Bug 1491574 - Part 2: Remove the XPCOM registration for nsPersistentProperties; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5950
2018-09-18 00:58:52 -04:00
Coroiu Cristina 40028657f0 Backed out 3 changesets (bug 1491574) for build bustage at builds/worker/workspace/build/src/netwerk/base/nsNetUtil.cpp on a CLOSED TREE
Backed out changeset 5390b485f7e4 (bug 1491574)
Backed out changeset 3d11b69de826 (bug 1491574)
Backed out changeset e7e8f3f70f8b (bug 1491574)
2018-09-18 07:10:20 +03:00
Ehsan Akhgari 9b9060a876 Bug 1491574 - Part 2: Remove the XPCOM registration for nsPersistentProperties; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5950
2018-09-17 22:05:34 -04:00
Ehsan Akhgari d720ddf0c3 Bug 1491561 follow-up: Fix a build problem 2018-09-17 21:35:25 -04:00
Ehsan Akhgari 02f08121ff Bug 1491561 - Remove the XPCOM registrations for LoadContext; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D5945
2018-09-17 21:28:39 -04:00
Bogdan Tara c8f52c0158 Merge inbound to mozilla-central. a=merge 2018-09-18 00:58:07 +03:00
Jan de Mooij 50690041b2 Bug 1491533 - Null check CompartmentPrivate in SetCompartmentChangedDocumentDomain. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D5998

--HG--
extra : moz-landing-system : lando
2018-09-17 17:13:05 +00:00
Gurzau Raul a30d892e47 Merge inbound to mozilla-central. a=merge 2018-09-17 19:46:05 +03:00
Jeff Walden 9667f8bf7d Bug 1491137 - Remove JS_Compile{,UC}Script, because except for argument ordering they're exactly identical to existing JS::Compile* functions. r=jandem
--HG--
extra : rebase_source : 89ae632dbc654f1f29f8186955042d4586aeeeff
2018-09-13 16:41:00 -07:00
Jeff Walden c1d9c9d203 Bug 1491137 - Rename JS_BufferIsCompilableUnit to JS_Utf8BufferIsCompilableUnit, consistent with how it already interprets that data, and propagate that presumption of UTF-8-ness a little bit further along into callers. r=jandem
--HG--
extra : rebase_source : e2ab50b48d4faf12a6791b0925b080818334421d
2018-09-13 13:30:38 -07:00