Commit Graph

60144 Commits

Author SHA1 Message Date
Lars T Hansen
a6e6b012ac Bug 1338217 - Only preserve bytecode when it's needed, rs=luke
--HG--
extra : rebase_source : 155d222ea9b43a0e7b453c36719377372dc72587
2017-05-02 18:05:14 +02:00
Lars T Hansen
9f9ab9d992 Bug 1338217 - Share code between Wasm instances. r=luke
--HG--
extra : rebase_source : 067b72ea242a043e3e5f61addbd2b17a0fc69659
2017-05-02 14:44:38 +02:00
Iris Hsiao
553dbd294c Merge mozilla-central to mozilla-inbound 2017-05-04 11:29:49 +08:00
Iris Hsiao
e71485e5b0 merge mozilla-inbound to mozilla-central a=merge 2017-05-04 11:18:36 +08:00
Wes Kocher
4e89a77541 Merge m-c to autoland, a=merge
MozReview-Commit-ID: F7qkNALe0WT
2017-05-03 13:52:24 -07:00
David Major
eeaa91fc5c Bug 1359507: Replace the stack walk workaround lock with an atomic counter of suppressions. r=mstange,froydnj
This fixes a deadlock by removing one of the two sides of a mutual-wait.
2017-05-03 12:10:48 -04:00
Nathan Froyd
3261352ea3 Bug 1361514 - convert XPCLocaleObserver to NS_DECL_OWNINGTHREAD; r=gabor
The pattern we're using here has a name, so let's use that instead.
2017-05-03 11:48:54 -04:00
Jeff Walden
f1f39aa341 Bug 1351107 - Make Reflect.parse code work with a TokenStreamAnyChars, not a TokenStream. r=arai 2017-04-21 01:45:39 -07:00
Jeff Walden
072906b158 Bug 1351107 - Enclose most of TokenStream.cpp in js::frontend namespace blocks so that template specializations don't need their own custom namespace blocks. r=arai 2017-04-28 16:15:51 -07:00
Jeff Walden
1d9f2f3159 Bug 1351107 - Make jscompartment.h and GlobalObject.h not #include builtin/RegExp.h, to address yet more thorny cyclic dependency issues in subsequent patches. r=arai 2017-04-20 00:23:28 -07:00
Jeff Walden
4e5271b990 Bug 1351107 - Make the DeprecatedLanguageExtensions enum an enum class in a new header, to address a thorny cyclic dependency issue in subsequent patches. r=arai 2017-04-20 00:17:08 -07:00
Eric Rahm
edf884fdd1 Bug 935809 - Part 3: Remove JSCList. r=jimb
MozReview-Commit-ID: Du6i1FlJ3Uu
2017-05-03 19:22:57 -07:00
Eric Rahm
e5680a660e Bug 935809 - Part 2: Convert onNewGlobalUpdateWatchers to DoublyLinkedList. r=jimb
MozReview-Commit-ID: 75SY0ab5gxn
2017-05-03 19:22:51 -07:00
Eric Rahm
7900dc0fab Bug 935809 - Part 1: Convert breakpoint lists to DoublyLinkedList. r=jimb
MozReview-Commit-ID: J4jdqLOksND
2017-05-03 19:22:45 -07:00
Jeff Walden
0e9d30f091 Bug 1351107 - Rename TokenStreamBase to TokenStreamAnyChars, anticipating this class eventually not being a base class. r=arai 2017-04-13 17:52:43 -07:00
Ted Campbell
4e110f1b5d Bug 1337773 - Use IonInIC for MIn and rename to MInCache r=jandem
MozReview-Commit-ID: 2Nl70H4MpPa

--HG--
extra : rebase_source : c8c54a4c32769e6bfd323f9acd7860d043f9656a
2017-04-17 13:31:12 -04:00
Ted Campbell
8e7ddb1ceb Bug 1337773 - Add IonInIC r=jandem
MozReview-Commit-ID: BmHPnJnMjVP

--HG--
extra : rebase_source : d8ca3f631dd2da0bfb5b87b4db1ceac323f6131d
2017-04-17 13:55:27 -04:00
Ted Campbell
43e26a60a0 Bug 1359952 - Add HasPropIRGenerator r=jandem
This combines InIRGenerator with HasOwnIRGenerator.

MozReview-Commit-ID: 7FQX5YmVrM7

--HG--
extra : rebase_source : 9b0e735e303f6fa57d4407bec5b81bc8307d365a
2017-04-27 12:11:17 -04:00
Ted Campbell
d561466341 Bug 1359952 - Add ownProp flag to CanAttachDenseElementHole r=jandem
MozReview-Commit-ID: EvpCisLDTk2

--HG--
extra : rebase_source : ca652cb2e1c2ce2a208363bac7f283757afa5abf
2017-04-27 12:06:13 -04:00
Ted Campbell
46f8075f1a Bug 1359952 - Remove shape arg from TestMatchingReceiver r=jandem
MozReview-Commit-ID: L2EiAUvK5rW

--HG--
extra : rebase_source : 487d447a05a14952a9a4b6d5260b9309d7e601a2
2017-04-26 16:06:42 -04:00
Ted Campbell
786416aaf1 Bug 1359952 - Fix CacheIRCompiler handling of boolean results r=jandem
MozReview-Commit-ID: 5xeZQyprlpm

--HG--
extra : rebase_source : f3df3bae4ab544d2de5610134ad9399d161288ad
2017-04-21 14:21:36 -04:00
Jeff Walden
9c9398fbf2 Bug 1351107 - Adapt BytecodeEmitter to contemplate working with Parsers working on both single- and double-byte source text. r=arai 2017-04-06 20:39:27 -07:00
Jeff Walden
ad5d6337ea Bug 1351107 - Move RegExpFlags, RegExpShared, and RegExpCompartment into vm/RegExpShared.h so that users requiring only those types don't have to import everything RegExpObject requires. r=arai
--HG--
rename : js/src/vm/RegExpObject.h => js/src/vm/RegExpShared.h
2017-04-19 16:30:18 -07:00
Jeff Walden
b87d68dcc0 Bug 1351107 - Use unicode::{LINE,PARA}_SEPARATOR instead of hand-rolling them for TokenStream code. r=arai 2017-05-01 19:40:51 -07:00
Jeff Walden
a053255a13 Bug 1359980 - Make RegExpParser::ReportError give better error messages that point directly at the offending character within the pattern, rather than just at the start of the RegExp literal. r=arai 2017-04-25 23:36:22 -07:00
Jeff Walden
26c6222d22 Make Interpreter.h not #include ParseNode.h. No bug, r=shu 2017-05-01 19:40:51 -07:00
Jeff Walden
78b45ca267 Remove or curtail a bunch of unnecessary dependencies on frontend/TokenStream.h to substantially reduce the number of files that must be recompiled for a change to TokenStream.h. No bug, rs=bbouvier 2017-04-25 23:36:22 -07:00
Jeff Walden
9c2af0d44e Make Nursery.cpp's CanaryMagicValue a constexpr so it doesn't break (some) builds with -Werror=unused-const-variable. No bug, r=sparky 2017-05-03 13:58:36 -07:00
Till Schneidereit
4662c498be Bug 1324140 - Unwrap given Promise in some JSAPI functions. r=bz
To make Promise-related JSAPI functions easier to use, this patch unwraps handed-in Promise objects automatically. Some functions don't unwrap, mostly debugging-related ones and, notably, JS::IsPromiseObject. The latter doesn't unwrap in order to stay conservative: if JSAPI-using code uses IsPromiseObject to verify that an object is a Promise, it should always be fine to say "no".

MozReview-Commit-ID: 7DuCqCj95JR

--HG--
extra : rebase_source : 86e5b837c68fcbd1c1930dffefc22856b02cf3b1
2017-05-03 10:53:19 -04:00
Carsten "Tomcat" Book
0b5ec8c1f2 Backed out changeset 74a0a0207e08 (bug 1338217) for linux failures 2017-05-03 15:27:26 +02:00
Carsten "Tomcat" Book
b3a8a13d69 Backed out changeset feb47dd8a60b (bug 1338217) 2017-05-03 15:27:05 +02:00
Lars T Hansen
dae85a2f45 Bug 1338217 - Only preserve bytecode when it's needed, rs=luke
--HG--
extra : rebase_source : 149ddc845100a831e66672daedc928436317bd14
2017-05-02 18:05:14 +02:00
Lars T Hansen
1dfe0353ba Bug 1338217 - Share code between Wasm instances. r=luke
--HG--
extra : rebase_source : f94d6c5b7463c5b9efc14f988bc542daf8828d9f
2017-05-02 14:44:38 +02:00
Jon Coppeard
17cafc9dee Bug 1360526 - Add separate stats phases for all the sweep tasks r=sfink
--HG--
extra : rebase_source : 6435702d7d86b131df9f4b3894cf27688227b75e
2017-05-03 11:42:05 +01:00
Jon Coppeard
271a7eafb3 Bug 1360526 - Add RAII class to start/join a GC sweep task r=sfink
--HG--
extra : rebase_source : 11ab7144f5ddfad3c03614ac969989c2686cf6e3
2017-05-03 11:40:46 +01:00
Jon Coppeard
dcdecbcd8a Bug 1360526 - Move sweeping JIT-related data into its own method r=sfink
--HG--
extra : rebase_source : 93b0fa75734fcead56e9108ca3dde06bbd85763c
2017-05-03 11:37:19 +01:00
Jon Coppeard
5202298eba Bug 1360526 - Sweep unique IDs in parallel with other sweeping r=sfink
--HG--
extra : rebase_source : cdee41f02b8422f4229f0c30e75e6062f90389eb
2017-05-03 11:36:14 +01:00
Jon Coppeard
c68fce716d Bug 1360526 - Sweep runtime-wide weak caches as part of the weak cache sweeping task r=sfink
--HG--
extra : rebase_source : 47a957dba1707f06b17942c128823b9bc30eff21
2017-05-03 11:34:55 +01:00
Jon Coppeard
fc496d2511 Bug 1360526 - Move more miscellaneous sweeping off the main thread r=sfink
--HG--
extra : rebase_source : 32ce6f137eebe07740f9e855d452a83b3d7a922c
2017-05-03 11:27:55 +01:00
Jon Coppeard
f9b398f422 Bug 1360526 - Sweep weakmaps in parallel with other sweeping r=sfink
--HG--
extra : rebase_source : 77d50ed900253ce2d37f2b53355fc7d2f462b49f
2017-05-03 11:26:36 +01:00
Jon Coppeard
00d998b339 Bug 1360526 - Refactor queing arenas for sweeping to use a single loop r=sfink
--HG--
extra : rebase_source : 0dc02838c0ad9e365b3975ce1642a3da390fe21f
2017-05-03 11:26:02 +01:00
Jon Coppeard
65e6107a3b Bug 1361401 - Make gc::Statistics counts atomic as these can be updated by helper threads r=sfink
--HG--
extra : rebase_source : 3856839f0dbfb2e6ad1e12d07d89e162dccba8e8
2017-05-03 11:26:00 +01:00
Till Schneidereit
30d10d8dfc Bug 1358879 - Optimize handling of internally-created Promise objects. r=bz
MozReview-Commit-ID: FNVrNNjOwSR
2017-05-03 12:46:00 +02:00
Jan de Mooij
72890d1b86 Bug 1361383 - Enable x86/x64 asm spew only in JS_JITSPEW builds. r=nbp 2017-05-03 10:42:05 +02:00
Jan Beich
480b73c38c Bug 1359142 - Define EPC_sig and RFP_sig for JS_CODEGEN_(ARM64|MIPS) on BSDs. r=luke
MozReview-Commit-ID: IAJOQ7RfM4s

--HG--
extra : rebase_source : 23a508527d888071471ec198fcd5f77403b3cf19
2017-04-24 18:08:12 +00:00
Wes Kocher
e141e24ffb Merge m-c to autoland, a=merge
MozReview-Commit-ID: 1peTFbNMVnU
2017-05-02 17:38:11 -07:00
Wes Kocher
ad7e3a0ce1 Backed out changeset d3197ffef609 (bug 1338217) for failures in test_webassembly_compile.html on at least Windows VM debug a=backout a=merge
MozReview-Commit-ID: 35G0IT8FJML

--HG--
extra : source : 0b6169107c9b0a396fbec47c5d78a45e81281dea
2017-05-02 13:21:31 -07:00
Tom Schuster
9a7b7937e6 Bug 1350263 - Typeof object CacheIR support. r=jandem 2017-05-02 18:24:04 +02:00
Tom Schuster
ad4425f805 Bug 1350263 - Ion/MacroAssembler typeof object improvements. r=jandem 2017-05-02 18:24:04 +02:00
Tom Schuster
204d59dfd0 Bug 1350263 - Primitive typeof CacheIR support. r=jandem 2017-05-02 18:24:03 +02:00
Lars T Hansen
fd01f61f18 Bug 1338217 - Share code between Wasm instances. r=luke
--HG--
extra : rebase_source : 44ddfa61bce96a4ad36034755f406ecce277770b
extra : histedit_source : 112168f6c44b7968e997800dbefb327e47b23485
2017-05-02 14:44:38 +02:00
Jan de Mooij
37a5962246 Bug 1353353 - Add GetName and BindName CacheIR spew. r=evilpie 2017-05-02 15:38:13 +02:00
Jan de Mooij
3cad77631d Bug 1361021 - Remove jump + haltingAlign(8) in MacroAssembler::guardedCallPreBarrier. r=djvj 2017-05-02 15:37:35 +02:00
Jan de Mooij
6f02dca89c Bug 1357680 part 3 - Don't mark the new group as having unknown properties when changing an object's proto. r=bhackett 2017-05-02 14:26:44 +02:00
Andrew McCreight
173d5653f5 Bug 1361547, part 2 - Implement missing cases in JS_GetTraceThingInfo(). r=sfink
MozReview-Commit-ID: GNteLjfArfg

--HG--
extra : rebase_source : 911aa4f458e8622e1482e41874f1cce50bcbdd1a
2017-05-02 15:38:04 -07:00
Andrew McCreight
471bef90b5 Bug 1361547, part 1 - Alphabetically sort existing cases in JS_GetTraceThingInfo(). r=sfink
A comment by TraceKind says to sort alphabetically. Currently, these
cases appear to not be in any particular order.

MozReview-Commit-ID: 3owHBViGUs5

--HG--
extra : rebase_source : f8fb4f19700e0248a73556d0de1cdf8aec5c9df0
2017-05-02 15:35:28 -07:00
Sean Stangl
16d70f440e Bug 1359051 - Define cacheFlush for non-Simulator ARM64 builds. r=tcampbell
--HG--
extra : rebase_source : c590b90b784df2676df6ccd9c43d4e5ca82c1fd3
2017-04-24 07:10:58 -07:00
Jon Coppeard
16df2c682c Bug 1360502 - Prioritise GC parallel tasks when selecting tasks to run on helper threads r=jandem 2017-05-02 10:40:32 +01:00
Bill McCloskey
bb2fc6efce Bug 1360372 - Avoid rooting hazard when entering atoms compartment (r=sfink)
This patch avoids a rooting hazard involving the atoms compartment. There is
code in jsatom.cpp that enters the atoms compartment while unrooted pointers
are on the stack. Now that enterZoneGroup can potentially yield, this leads to
a rooting hazard. This patch avoids the hazard by using a totally separate path
that avoids enterZoneGroup when entering the atoms compartment.

MozReview-Commit-ID: ExG1ofCbN8C
2017-05-01 16:18:10 -07:00
Bill McCloskey
a20cb19dce Bug 1360372 - Acquire cooperative lock when entering system zone group (r=bhackett)
MozReview-Commit-ID: 92SgTKMD6xt
2017-05-01 16:17:58 -07:00
Shu-yu Guo
c619f9ac87 Bug 1360839 - Call IteratorClose due to abrupt completion from yield. (r=arai) 2017-05-01 15:08:03 -07:00
Jim Chen
50d30e203b Bug 1357874 - Add more AArch64 support to JS code; r=luke
* Fix a parentheses warning when compiling testGCAllocator.cpp.

* Define GETRANDOM_NR macro for AArch64.

* Disable Android workarounds in jsnativestack.cpp and
  WasmSignalHandlers.cpp for AArch64, because AArch64 is only supported
  on API 21+, in which case those workarounds don't apply.

* Enable trace logging in TraceLogging.cpp.
2017-05-01 14:46:00 -04:00
Jan de Mooij
e4f46ab99f Bug 1360852 - Fix emitGuardIsInt32Index to allocate input register before calling addFailurePath. r=evilpie
--HG--
extra : amend_source : ca2f2995afbe85ab9b8b3662bb7f8bbf22d91b22
2017-05-01 12:38:51 -04:00
Kannan Vijayan
3e15b3041e Bug 1358599 - Use runtime guards for jitcode pre-barriers instead of patchable jumps. r=jandem r=sfink 2017-04-30 08:42:34 -04:00
Sebastian Hengst
bb580f3e71 Backed out changeset fd049b7bf3d2 (bug 1360372) for hazards. r=backout 2017-04-30 10:03:17 +02:00
Bill McCloskey
32eac2e449 Bug 1360372 - Acquire cooperative lock when entering system zone group (r=bhackett)
MozReview-Commit-ID: 92SgTKMD6xt
2017-04-29 20:59:45 -07:00
Sebastian Hengst
218d14273c merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: BTRXNHiIEWd
2017-04-29 21:30:59 +02:00
Jan de Mooij
8ddc231e13 Bug 1360523 - Define number of reserved slots explicitly for each proxy js::Class. r=bz 2017-04-29 14:41:49 +02:00
Jan de Mooij
35bcc30a53 Bug 1360520 - Add a GrayLinkReservedSlot constant and use it instead of hardcoding 1. r=jonco 2017-04-29 14:36:18 +02:00
Sebastian Hengst
22de13017e Backed out changeset 0e150cf52e59 as the last remnants of the push which started the hazards (also tracking in bug 1359980). r=backout 2017-04-29 14:23:06 +02:00
Sebastian Hengst
6069f365a3 Backed out changeset f42d614a7227 2017-04-29 14:20:24 +02:00
Sebastian Hengst
1b21c4fa80 Backed out changeset de236ed88685 (bug 1351107) to hopefully fixing rooting hazard. r=backout 2017-04-29 12:51:52 +02:00
Sebastian Hengst
f48836bad3 Backed out changeset 2c965dfef6c8 (bug 1359980) for hazard. r=backout 2017-04-29 11:05:03 +02:00
Sebastian Hengst
736c2cb1d9 Backed out changeset 21447217ddbd (bug 1359980) 2017-04-29 11:00:42 +02:00
Jeff Walden
9a87fb6fae Bug 1359980 - Followup hazard fix. (Maybe the varargs threw off the hazard analysis, where the suppress-GC operation occurred *inside* a varargs function? *shrug*) r=bustage 2017-04-28 19:35:52 -07:00
Sebastian Hengst
f4f104e7e0 merge mozilla-central to autoland. r=merge a=merge 2017-04-29 11:11:48 +02:00
Andrew Swan
f38ced1fc9 Bug 1354682 Add transform to XPCOMUtils.defineLazyPreferenceGetter r=kmag
MozReview-Commit-ID: Lm59IHMNcy9

--HG--
extra : rebase_source : 3250d759b1b9909bcc7564139a3d7066d8376b60
2017-04-28 22:39:13 -07:00
Phil Ringnalda
f8d5e6ddf9 Backed out 3 changesets (bug 1354682) for sessionstore browser-chrome bustage
CLOSED TREE

Backed out changeset 55405fd328f9 (bug 1354682)
Backed out changeset 56b8122e64a3 (bug 1354682)
Backed out changeset 9374009a95e5 (bug 1354682)

MozReview-Commit-ID: BNVhwID8NwD
2017-04-28 20:24:34 -07:00
Jeff Walden
d1bac2da78 Bug 1351107 - Use unicode::{LINE,PARA}_SEPARATOR instead of hand-rolling them for TokenStream code. r=arai
--HG--
extra : rebase_source : 928d87700a93fe6ccaa5eac45de9c304f2b0f03f
2017-04-15 00:51:56 -07:00
Jeff Walden
c69ddc19ad Bug 1359980 - Make RegExpParser::ReportError give better error messages that point directly at the offending character within the pattern, rather than just at the start of the RegExp literal. r=arai
--HG--
extra : rebase_source : 9ac96d60605e4cd44347a1507b1ae0dc418d3daa
2017-04-25 23:36:22 -07:00
Jeff Walden
8f9c41e0d0 Remove or curtail a bunch of unnecessary dependencies on frontend/TokenStream.h to substantially reduce the number of files that must be recompiled for a change to TokenStream.h. No bug, rs=bbouvier
--HG--
extra : rebase_source : 222f24e2792df0d5afef2a258f1572cd67648cf2
2017-04-25 23:36:22 -07:00
Jeff Walden
b4fe419d1d Make Interpreter.h not #include ParseNode.h. No bug, r=shu
--HG--
extra : rebase_source : 0659a1d8e0408d3b4a2a22988a5d394857a891b8
2017-04-25 23:36:22 -07:00
Andrew Swan
46e486f880 Bug 1354682 Add transform to XPCOMUtils.defineLazyPreferenceGetter r=kmag
MozReview-Commit-ID: Lm59IHMNcy9

--HG--
extra : rebase_source : 796d9b0b7a6bf94782ebeeaf35d237176687c0ac
2017-04-28 16:10:44 -07:00
Jon Coppeard
8711eef9cd Bug 1359252 - Add pre-write barrier for JIT writes to NativeIterator::obj r=jandem 2017-04-28 12:05:30 +01:00
Carsten "Tomcat" Book
1045b9730a merge mozilla-inbound to mozilla-central a=merge 2017-04-28 10:36:11 +02:00
Bill McCloskey
7c672b4158 Bug 1359245 - Fix compiler error on CLOSED TREE
MozReview-Commit-ID: 57cVUcTV1Rv
2017-04-27 15:53:37 -07:00
Bill McCloskey
34a4f034bb Bug 1359245 - Remove references to context from the cycle collector (r=mccr8)
MozReview-Commit-ID: 1QoNEiZMvBf
2017-04-27 15:34:46 -07:00
Bill McCloskey
9862d9c932 Bug 1359245 - Remove some tracing callbacks at shutdown (r=mccr8)
When we just had CycleCollectedJSContext (and no CycleCollectedJSRuntime) a
weird thing happened at shutdown:
1. We would call JS_DestroyContext from ~CycleCollectedJSContext. By that time,
   the ~XPCJSContext destructor had already finished.
2. Destroying the context runs a final GC. That GC would call back into various
   GC callbacks, such as TraceBlackJS and TraceGrayJS.
3. These callbacks would do a virtual method call:
   http://searchfox.org/mozilla-central/rev/876c7dd30586f9c6f9c99ef7444f2d73c7acfe7c/xpcom/base/CycleCollectedJSRuntime.cpp#791
4. Normally this method call would call into
   XPCContext::TraceNativeBlackRoots. However, C++ changes the vtable for an
   object during destruction. So we would only call CycleCollectedJSContext's
   version of TraceNativeBlackRoots, which is empty. So we never traced anything.

When I moved this code into the runtime, we actually do call into
XPCJSRuntime::TraceNativeBlackRoots at that time. So the behavior changed, and
that was causing crashes once I nulled out the TLS as you asked. So I removed
these callbacks for the last GC.

MozReview-Commit-ID: 3do13bjpwQj
2017-04-27 15:34:46 -07:00
Bill McCloskey
1d5c5ef48b Bug 1359245 - Keep a linked list of CycleCollectedJSContexts in the runtime (r=mccr8)
This patch keeps a list of all the cooperatively scheduled contexts that are
linked to a runtime. In places where we need to iterate over all contexts (for
GC, specifically), it iterates over the list.

MozReview-Commit-ID: 3pKJX78f2l0
2017-04-27 15:34:46 -07:00
Bill McCloskey
267ad1f2b0 Bug 1359245 - Initial support for cooperative contexts (r=mccr8)
This patch adds initial support for cooperatively scheduled
CycleCollectedJSContexts.

MozReview-Commit-ID: 5pfPubHUanL
2017-04-27 15:34:46 -07:00
Bill McCloskey
ee9f642133 Bug 1359245 - Remove CycleCollectedJSRuntime::mJSContext (r=mccr8,sfink)
This patch eliminates a field where we assume that there is one
CycleCollectedJSContext per runtime.

MozReview-Commit-ID: 5cEL5Ml6Y9v
2017-04-27 15:34:46 -07:00
Bill McCloskey
11b1f07146 Bug 1359245 - Get rid of CycleCollectedJSRuntime::MainContext (r=mccr8)
This is another method that assumes one context per runtime. This patch
eliminates the method.

MozReview-Commit-ID: JHcQ1nyiHSP
2017-04-27 15:34:46 -07:00
Bill McCloskey
1e5747d0b4 Bug 1359245 - Eliminate nsXPConnect::mContext (r=mccr8)
This field assumes there is one XPCJSContext globally (i.e., per nsXPConnect
instance). This patch eliminates the field by using different paths to
reach the context.

MozReview-Commit-ID: FjR6cTZ5QfZ
2017-04-27 15:34:46 -07:00
Bill McCloskey
133ed14a85 Bug 1359245 - Eliminate some XPCJSContext::Get() usage (r=mccr8)
XPCJSContext::Get() now does a TLS lookup, which is a little more expensive
than looking up a global variable. This patch removes as many of the TLS
lookups as possible.

MozReview-Commit-ID: GsqzJn55Lya
2017-04-27 15:34:46 -07:00
Bill McCloskey
3e774f9f8a Bug 1359245 - Eliminate nsXPConnect::GetContextInstance() (r=mccr8)
This method assumes there is one global XPCJSContext. This patch eliminates
uses of it.

MozReview-Commit-ID: L2AkBGh5TnC
2017-04-27 15:34:46 -07:00
Bill McCloskey
51147a69b6 Bug 1359245 - Use TLS to return XPCJSContext::Get() (r=mccr8)
Once we have multiple XPCJSContext's, we may have to figure out which one we're
using with TLS. A later patch tries to remove as many of these TLS lookups
as possible so that performance doesn't suffer.

MozReview-Commit-ID: 50uHpDLZmUH
2017-04-27 15:34:46 -07:00
Bill McCloskey
6df90ba01c Bug 1359245 - Move JS engine promise callbacks from JSRuntime to JSContext (r=till)
The promise callbacks are intended to run on the XPCJSContext, so the data
that is associated with them should be per-context. We might as well make
the callbacks themselves per-context as well.

MozReview-Commit-ID: LmQNz1EovJx
2017-04-27 15:34:46 -07:00
Wes Kocher
9528ad9a03 Merge m-c to inbound, a=merge
MozReview-Commit-ID: DaH1djmEY5A
2017-04-27 13:29:07 -07:00
Carsten "Tomcat" Book
e1e203f1f5 Merge mozilla-central to autoland 2017-04-27 16:36:41 +02:00
Tom Tromey
9a70d783bc Bug 1360152 - null-check correct value in ToDisassemblySource; r=froydnj
MozReview-Commit-ID: 3HR4ZofDlyW

--HG--
extra : rebase_source : 62d158727e11a8ccda64cdc36631dbaeb3b548cb
2017-04-27 07:29:09 -06:00