Commit Graph

5966 Commits

Author SHA1 Message Date
Sebastian Hengst
43bc951ac7 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: ES9rKhiQo10
2017-09-01 10:38:51 +02:00
Kris Maglione
6bad4f8ef7 Bug 1366511: Part 3 - Add mozilla::ToResult() to convert other result types to equivalent Result. r=nbp,ehsan
Also adds a mozilla/ResultExtensions.h header to define the appropriate
conversion functions for nsresult and PRResult. This is in a separate header
since those types are not available in Spidermonkey, and this is the pattern
other *Extensions.h headers follow.

Also removes equivalent NS_TRY macros and WrapNSResult inlines that served the
same purpose in existing code, and are no longer necessary.

MozReview-Commit-ID: A85PCAeyWhx

--HG--
extra : rebase_source : a5988ff770888f901dd0798e7717bcf6254460cd
2017-08-29 21:28:31 -07:00
Kris Maglione
c9899cb3fa Bug 1366511: Part 2 - Allow autoconverting Err(nsresult) to nsresult. r=ehsan,nbp
This allows MOZ_TRY and MOZ_TRY_VAR to be transparently used in XPCOM methods
when compatible Result types are used.

Also removes a compatibility macro in SimpleChannel.cpp, and an identical
specialization in AddonManagerStartup, which are no longer necessary after
this change.

MozReview-Commit-ID: 94iNrPDJEnN

--HG--
extra : rebase_source : 24ad4a54cbd170eb04ded21794530e56b1dfbd82
2017-08-29 21:28:22 -07:00
Bevis Tseng
215842a23c Bug 1392500 - Name the users of setTimeout() in Timer.jsm. r=billm,mccr8
1. Make nsINamed queriable on WrappedJSHolder.
2. Identify callers via |Cu.generateXPCWrappedJS(aCallback).QueryInterface(Ci.nsINamed).name|.

--HG--
extra : amend_source : 5d4201059f66e46c869c30a963921b6f7b91c389
2017-08-24 14:56:18 +08:00
Blake Kaplan
d383834094 Bug 1376507 - Handle a list of contexts instead of a single context. r=billm
This might be prematurely optimized as it uses two lists (one list of active
contexts and one list of inactive contexts) but I was really attracted by the
idea of being able to answer questions like "is any context active" by only
looking at a single context and not having to iterate the whole list every
time we needed to do anything.

It is really important that nobody touches any of the timestamps (or the
mActive member) outside of the Watchdog lock. I thought about trying to
encapsulate that data in its own class, but that felt like overkill. Let me
know if you disagree.

There are still a couple of uses of XPCJSContext::Get that probably need to be
stamped out, but I think doing so will depend on the details of how we map
JSContexts to XPCJSContext (and XPCJSRuntimes). I think that should wait for a
separate bug.

MozReview-Commit-ID: 9UZlh7Jutne

--HG--
extra : rebase_source : 039b50bc70547b03bc0724435de0a10a29fcf85e
2017-08-28 16:05:11 -07:00
Blake Kaplan
2c3b159a1a Bug 1376507 - Move state onto XPCJSContext. r=billm
The current code assumes it can store data about "the" XPCJSContext on the
WatchdogManager singleton. Once we have more than one XPCJSContext running
around, that won't be possible. This moves the needed data onto the
XPCJSContext itself and gives the WatchdogManager the proper context to
operate on.

MozReview-Commit-ID: AxyFKp9LmH3

--HG--
extra : rebase_source : 113e3b8986563016d43b25e753bde61f7af49291
2017-08-23 17:40:09 -07:00
Wes Kocher
e31150aea5 Backed out 2 changesets (bug 1376507) for build bustage a=backout
Backed out changeset 266611b269cc (bug 1376507)
Backed out changeset 04ecce0d1392 (bug 1376507)

MozReview-Commit-ID: JC6tERhgDoS
2017-08-31 17:08:29 -07:00
Blake Kaplan
c4cdfbe15a Bug 1376507 - Handle a list of contexts instead of a single context. r=billm
This might be prematurely optimized as it uses two lists (one list of active
contexts and one list of inactive contexts) but I was really attracted by the
idea of being able to answer questions like "is any context active" by only
looking at a single context and not having to iterate the whole list every
time we needed to do anything.

It is really important that nobody touches any of the timestamps (or the
mActive member) outside of the Watchdog lock. I thought about trying to
encapsulate that data in its own class, but that felt like overkill. Let me
know if you disagree.

There are still a couple of uses of XPCJSContext::Get that probably need to be
stamped out, but I think doing so will depend on the details of how we map
JSContexts to XPCJSContext (and XPCJSRuntimes). I think that should wait for a
separate bug.

MozReview-Commit-ID: 9UZlh7Jutne

--HG--
extra : rebase_source : a927511fbf5a7bbdb75f616b751ec3fb51e76903
2017-08-28 16:05:11 -07:00
Blake Kaplan
5c7a14294c Bug 1376507 - Move state onto XPCJSContext. r=billm
The current code assumes it can store data about "the" XPCJSContext on the
WatchdogManager singleton. Once we have more than one XPCJSContext running
around, that won't be possible. This moves the needed data onto the
XPCJSContext itself and gives the WatchdogManager the proper context to
operate on.

MozReview-Commit-ID: AxyFKp9LmH3

--HG--
extra : rebase_source : 113e3b8986563016d43b25e753bde61f7af49291
2017-08-23 17:40:09 -07:00
Kris Maglione
fdbe5511ae Bug 1394556: Part 2 - Compile all JSM/module scripts in strict mode. r=Mossop
MozReview-Commit-ID: 5BLvaHEFCqv

--HG--
extra : rebase_source : f28cdc2acf5f0c26885feeb48105513f2bf6f5ef
extra : histedit_source : 1ead5f8843a091aa0beba4ccb26681ac2078e934
2017-08-28 11:39:06 -07:00
Jan de Mooij
bc31f1ee31 Bug 1394835 part 1 - Spit JS_DefineProperty* APIs in separate data/accessor overloads. r=evilpie,bz 2017-08-30 15:35:06 +02:00
Masatoshi Kimura
452d3a0896 Bug 1098412 - Remove __iterator__ implementation. r=luke
MozReview-Commit-ID: 6qqSSrB4Vvh

--HG--
extra : rebase_source : b8e6ef46d6bae1aecfe3874d81bd537e506bdba3
2017-08-24 22:17:40 +09:00
Masatoshi Kimura
42afc8970b Bug 1098412 - Remove and update tests that use the legacy Iterator constructor. r=luke
MozReview-Commit-ID: G7q3ARzOYFf

--HG--
extra : rebase_source : d36ddf7abba4068d766d9f068f87616bdd316158
2017-08-24 22:45:53 +09:00
Jon Coppeard
00f55c5fed Bug 1376899 - Remove unused isZoneGC parameter from GC finalize callback r=sfink r=mccr8 2017-08-29 11:58:26 +01:00
Kris Maglione
c5a2868365 Bug 1394467: Remove unused procompileScript method. r=mccr8
MozReview-Commit-ID: 6s2Nqtcd9uS

--HG--
extra : rebase_source : ec4f96e7281e3f72be01aeb8faa1c9b34a61f534
2017-08-28 09:21:46 -07:00
Jan de Mooij
3e1a11f41d Bug 1393790 part 1 - Remove JS_STUBGETTER and JS_STUBSETTER. r=jorendorff 2017-08-28 10:39:57 +02:00
Phil Ringnalda
6e0931231e Backed out changeset eca521df662f (bug 1388221) for browser_library_downloads.js, browser_library_infoBox.js and browser_library_search.js failures on OS X
MozReview-Commit-ID: CrYUAKCFCMK
2017-08-26 17:34:08 -07:00
Kris Maglione
46c134a432 Bug 1388221: Optimize defineLazyModuleGetter for already-loaded modules. r=florian
Creating and populating temporary export objects is fairly expensive. Defining
and then redefining lazy getters is sometimes even more expensive.

Caching the export objects from module imports, and immediately defining
properties from already-imported modules appears to save a considerable amount
of overhead at startup.

MozReview-Commit-ID: 2jR1i0WpIcw

--HG--
extra : rebase_source : d64e3380f290b12a004177be678abad88530bbc5
2017-08-09 13:13:25 -07:00
Wes Kocher
68149d6a59 Merge inbound to central, a=merge
MozReview-Commit-ID: 3N9jinnrmjb
2017-08-25 16:21:57 -07:00
Gabriele Svelto
7387dc791b Bug 1393435 - Remove unnecessary inclusions of the crash reporter header files; r=mconley
MozReview-Commit-ID: 3tdFDrTYql8

--HG--
extra : rebase_source : cc862688f19afb8a5cf8c7cf915a5d3d45f041b5
2017-08-07 14:10:02 +02:00
Jan de Mooij
0f2181d932 Bug 1393715 - Remove JSFUN_STUB_GSOPS and JS_FS. r=arai 2017-08-25 17:04:12 +02:00
Nicholas Nethercote
7e120ce35e Bug 1393636 (part 3) - Pass nsWindowSizes to more AddSizeOf*() functions. r=heycam.
This is a purely non-functional plumbing change. Instead of passing a
SizeOfState and an nsStyleSizes a bunch of places, we pass an nsWindowSizes,
which contains both of them.

This is a necessary precursor for the next patch.

MozReview-Commit-ID: Ek03wDM50rB

--HG--
extra : rebase_source : 7b05708bd21dc4e3812ea041647fa74bb413d0b9
2017-08-25 14:47:54 +10:00
Jan de Mooij
a5de55dced Bug 1389510 part 3 - Remove getProperty/setProperty hooks from ClassOps. r=evilpie 2017-08-25 10:12:16 +02:00
Jan de Mooij
599d67d484 Bug 1389510 part 1 - Remove getProperty/setProperty hooks from XPConnect. r=mrbkap 2017-08-25 10:10:56 +02:00
Benjamin Bouvier
b5407c81cc Bug 1391633: Remove the unused JSContext parameter in SetDocumentAndPageUseCounter; r=froydnj
MozReview-Commit-ID: KtVP5JgLIFC

--HG--
extra : rebase_source : 210f0a479cf0919e1d6e589a5857f43fb50fa8c5
extra : histedit_source : 2f08891b3dba80e117e3f5e4a0e0367b51e42606
2017-08-18 16:02:15 +02:00
Benjamin Bouvier
e8f41447d2 Bug 1391633: Integrate use counters in the JavaScript engine; r=jonco, r=froydnj, data-review=francois
MozReview-Commit-ID: 1KOo0Zz0ccG

--HG--
extra : rebase_source : 1bdd89205a3d96f6d8314fc0cf08423b5c141cb6
extra : histedit_source : a000151b02c6423c967a72054b22679b08e25df9
2017-08-18 15:48:49 +02:00
Nicholas Nethercote
f582d96b98 Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm.
This is straightforward, with only two notable things.

- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
  throughout, because all nsXPIDLString.h did was include nsString.h. The
  exception is for files which already include nsString.h, in which case the
  patch just removes the nsXPIDLString.h inclusion.

- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
  cover some of its ground, e.g. testing Adopt(nullptr).

--HG--
extra : rebase_source : 452cc4a08046a1adb1a8099a7e85a1917de5add8
2017-08-17 15:29:03 +10:00
Sebastian Hengst
142b3bf28b Backed out changeset 109e89a7d561 (bug 1391420) for busting Linux pgo builds. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 6a4421254e4de31071785b73abdd1186638e31f2
2017-08-23 18:12:46 +02:00
David Major
8cb2cb650a Bug 1391420: Set NO_PGO on a bunch of binaries that we don't ship. r=ted 2017-08-23 11:10:39 -04:00
Andrew McCreight
e9b051a4af Bug 1366896, part 2 - Add and use Cc.Initialize method. r=krizsa
MozReview-Commit-ID: Amqt9JsTMqG

--HG--
extra : rebase_source : dff173ed60a254fa449b2e85d71eee6cc7daba26
2017-05-24 14:12:11 -07:00
Andrew McCreight
0f344f2aed Bug 1366896, part 1 - Factor out initialize code and make initialize work with CIDs. r=krizsa
MozReview-Commit-ID: 3spZGOqlU1j

--HG--
extra : rebase_source : e346183b972ece2f4986091f36c3ecee13674832
2017-05-24 10:49:31 -07:00
Nicholas Nethercote
8a72cf2251 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm.
--HG--
extra : rebase_source : 69d58b0cfb56efc6b03d8e2d7be2ce3c3e6cd843
2017-08-21 20:01:27 +10:00
Kris Maglione
267cf409eb Bug 1356334: Part 6 - Allow completely terminating a slow content script sandbox. r=billm
MozReview-Commit-ID: 5CDLHrAeuDt

--HG--
extra : source : d832803270ac831fd760356f36e16ef2a2d6d45b
extra : histedit_source : 11b535e7924700b86747f2855ef33c9707db719a
2017-04-16 14:01:16 -07:00
Kris Maglione
6aef819287 Bug 1356334: Part 5 - Add add-on name to slow script messages. r=billm
MozReview-Commit-ID: 2nyDmoiBKp4

--HG--
extra : source : b83aea215a82d44bec7443b69e60feef32f5fb2c
extra : histedit_source : 5a94f13db992c197ebb49fbb8e6a91bb97288fb6
2017-08-17 20:17:51 -07:00
Kris Maglione
faa8815613 Bug 1356334: Part 3 - Enforce a stricter slow script timeout for extension content scripts. r=billm
MozReview-Commit-ID: LLvPQn1x1Xj

--HG--
extra : source : 805c568069301ae91ead5780cdc118af73907229
extra : histedit_source : b188836d1dc3ad8021bf2d0b1c89aebedf2db185%2C8c7b51c9f4af4eb5ad67811c29b56c72b43fa31d
2017-08-18 11:04:55 -07:00
Ryan VanderMeulen
3fe1f45009 Backed out 8 changesets (bug 1356334) for frequent test_ext_contentscript_async_loading.html failures on Android debug on a CLOSED TREE.
Backed out changeset 9c677ebfdda0 (bug 1356334)
Backed out changeset 16b49fd1c38a (bug 1356334)
Backed out changeset 4f5bcd2b2dc6 (bug 1356334)
Backed out changeset d832803270ac (bug 1356334)
Backed out changeset b83aea215a82 (bug 1356334)
Backed out changeset b2a663ffd144 (bug 1356334)
Backed out changeset 805c56806930 (bug 1356334)
Backed out changeset 7c880eca810a (bug 1356334)
2017-08-18 11:32:18 -04:00
Ryan VanderMeulen
24c9581b48 Backed out changeset fbf0e8609abb (bug 1390428) for Windows clipboard test failures on a CLOSED TREE. 2017-08-18 10:58:47 -04:00
Lars T Hansen
1783392f5e Bug 1277562 - Part 16b: Implement javascript.options.wasm_ionjit. r=billm
--HG--
extra : rebase_source : 6956d4002670590667f83cf9f5f6a2f82df6ba84
2017-06-29 15:37:01 -07:00
Lars T Hansen
16a023dd8a Bug 1277562 - Part 5a: Change the meaning of the wasm-baseline switch. r=luke
--HG--
extra : rebase_source : 793eacb33d1901565d2b7b2e84501cc8917a4149
extra : source : 392b626dc954766ac5a077f4cad7ab489fd907aa
2017-02-02 13:22:40 +01:00
Nicholas Nethercote
5241bea863 Bug 1390428 (part 2) - Remove more nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is used in ways that rely on the implicit conversion
to |char*|. The patch uses get() and EqualsLiteral() calls to replace the
implicit conversions.
2017-08-16 13:58:55 +10:00
Kris Maglione
bdbbf869dd Bug 1356334: Part 6 - Allow completely terminating a slow content script sandbox. r=billm
MozReview-Commit-ID: 5CDLHrAeuDt

--HG--
extra : rebase_source : 00f75b5be53e38d912b90b8fe777c5aa7ff135bf
2017-04-16 14:01:16 -07:00
Kris Maglione
2c6fe4f014 Bug 1356334: Part 5 - Add add-on name to slow script messages. r=billm
MozReview-Commit-ID: 2nyDmoiBKp4

--HG--
extra : rebase_source : 311d9ad486210e6d5fa3a06bb837d3597b9d2800
2017-08-11 22:11:25 -07:00
Kris Maglione
b23753e90d Bug 1356334: Part 3 - Enforce a stricter slow script timeout for extension content scripts. r=billm
MozReview-Commit-ID: LLvPQn1x1Xj

--HG--
extra : rebase_source : d2b85e92c00faef8664b036be6236dd109074af4
2017-08-11 21:30:54 -07:00
Nicholas Nethercote
025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Carsten "Tomcat" Book
eea1986e03 merge mozilla-inbound to mozilla-central a=merge 2017-08-16 11:23:24 +02:00
Jan de Mooij
9a7bf50e92 Bug 1390159 - Remove throw-on-set setProperty hooks on WrappedNatives. r=mrbkap 2017-08-16 09:01:56 +02:00
Jan de Mooij
503f557cde Bug 1390471 - Remove xpcshell's environment object. r=bholley 2017-08-16 09:00:44 +02:00
Wes Kocher
3945278423 Merge m-c to autoland, a=merge
MozReview-Commit-ID: D96bIJACwZe
2017-08-15 19:16:12 -07:00
Masatoshi Kimura
43dd1b22af Bug 1390106 - Stop using versioned scripts in js/xpconnect. r=mccr8
MozReview-Commit-ID: LP7bXQd7ahD

--HG--
extra : rebase_source : b0d3b9052d333698dbb1e6e6a0da9556fe60a91b
2017-08-14 20:45:14 +09:00
Bill McCloskey
268004b056 Bug 1382172 - Compute names for all JS-implemented XPCOM objects (r=mrbkap)
MozReview-Commit-ID: 4kPbqOpGYnq
2017-08-14 22:42:42 -07:00