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

5684 Коммитов

Автор SHA1 Сообщение Дата
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
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
Jan de Mooij f480e9ecdf Bug 1237504 - Refactor proxy slot layout to allow proxies to have more than 2 slots. r=bz,jonco
The patch makes the following proxy changes:

* The number of slots in ProxyValueArray is now dynamic and depends on the number of reserved slots we get from the Class.
* "Extra slots" was renamed to "Reserved slots" to make this clearer.
* All proxy Classes now have 2 reserved slots, but it should be easy to change that for proxy Classes that need more than 2 slots.
* Proxies now store a pointer to these slots and this means GetReservedSlot and SetReservedSlot can be used on proxies as well. We no longer need GetReservedOrProxyPrivateSlot and SetReservedOrProxyPrivateSlot.

And some changes to make DOM Proxies work with this:

* We now store the C++ object in the first reserved slot (DOM_OBJECT_SLOT) instead of in the proxy's private slot. This is pretty nice because it matches what we do for non-proxy DOM objects.
* We now store the expando in the proxy's private slot so I removed GetDOMProxyExpandoSlot and changed the IC code to get the expando from the private slot instead.
2017-04-28 14:12:28 +02: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 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
Wes Kocher c90904f9bf Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: 9HQViJrDT6S
2017-04-26 17:30:31 -07:00
Tom Tromey 3e96a70858 Bug 1334278 - have FormatStackDump return UniqueChars; r=froydnj
Change FormatStackDump to return UniqueChars and fix up the users.  This
removes a bit more manual memory management.

MozReview-Commit-ID: 60GBgeS4rzg

--HG--
extra : rebase_source : 15060321f567816ca434cdf1ef816d8322ceefff
2017-04-21 12:47:06 -06:00
Jon Coppeard eb3c9870bf Bug 1352430 - Add barrier to wrapper cache to clear dying objects that have not yet been finalized r=bz r=sfink
* * *
Code review followup

--HG--
extra : rebase_source : 10c1fd603c2dd1ac2ff5770ae9aec2e9131681ce
2017-04-26 11:18:39 +01:00
Jon Coppeard f67bc06071 Bug 1352430 - Update XPConnect sweeping to handle incrementally finalized objects r=mccr8 r=sfink
--HG--
extra : rebase_source : 10c974bedd003cf23de9e32ad7ae202441c92db9
2017-04-26 11:18:13 +01:00
Jon Coppeard 8c75ba5bbb Bug 1352430 - Update the GC finalize callback to communicate the new state r=sfink r=mccr8
--HG--
extra : rebase_source : ebd661eee50bbf48f21c12e6a1c6df9015f81beb
2017-04-26 10:57:08 +01:00
Carsten "Tomcat" Book 68e9a2dfd5 Merge mozilla-central to mozilla-inbound 2017-04-26 09:04:59 +02:00
Nicholas Nethercote bc1d6a21a2 Bug 1358320 - Make TimeStamp::ProcessCreation()'s outparam optional. r=gsvelto.
TimeStamp::ProcessCreations()'s aIsInconsistent outparam is ignored by the
majority of its caller. This patch makes it optional. Notably, this makes
ProcessCreation() easier to use in a constructor's initializer list.
2017-04-26 14:55:54 +10:00
Wes Kocher 5e8bdb175d Merge inbound to m-c a=merge
MozReview-Commit-ID: A85cs7Yriqj
2017-04-25 13:53:00 -07:00
Jon Coppeard d7e0c83dcc Bug 1359001 - Make AutoAssertGCCallback a no-op in opt builds r=sfink 2017-04-25 10:56:34 +01:00
Aryeh Gregor af57d2df0f Bug 1251198 - Remove various obsolete events from document.createEvent r=smaug
Other browsers do not support any of these (IIRC), telemetry reports
essentially zero usage, and supporting them is contrary to the DOM spec.

Notes on specific events:

CommandEvent and SimpleGestureEvent: These are not supposed to be
web-exposed APIs, so I hid the interfaces from web content too
(necessary to avoid test_all_synthetic_events.html failures).

DataContainerEvent: This was a non-standard substitute for CustomEvent
that seemed to have only one user, so I removed it entirely and switched
the user (MozillaFileLogger.js) to CustomEvent.

ScrollAreaEvent: This is entirely non-standard, but we apparently expose
it deliberately to web content, so I didn't see any reason to remove it
from createEvent.

SimpleGestureEvent and XULCommandEvent: Can still be created from
createEvent(), but not by content.

TimeEvent: This is still in because it has no constructor, so there's no
other way to create it.  Ideally we'd update the SMIL spec to add a
constructor.  I did remove TimeEvents.

MozReview-Commit-ID: 7Yi2oCl9SM2

--HG--
extra : rebase_source : 199ab921acfc531b8b85e77f90fcd799b03c887b
2017-04-20 15:45:37 +03:00
Tom Tromey bcbdcb14bb Bug 1334278 - change JS_smprintf to return UniqueChars; r=froydnj
This changes JS_smprintf to return UniqueChars, rather than relying on
manual memory management.

MozReview-Commit-ID: ENjQJODYdD1

--HG--
extra : rebase_source : 4c8ad4719dce205a7ef25e41eca25c5af793bb47
2017-03-03 15:10:11 -07:00
Jan de Mooij 113e7692b5 Bug 1358047 - Move Baseline CacheIR code map from JitCompartment to JitZone. r=djvj 2017-04-24 12:41:04 +02:00
Wes Kocher d973551173 Merge inbound to central, a=merge
MozReview-Commit-ID: FHfhKIIlItM
2017-04-21 17:30:43 -07:00
Zibi Braniecki 61ac53ebb8 Bug 1358543 - Only set new locale callbacks in xpc_LocalizeContext if they're not set. r=smaug
With changes introduced in bug 1356066 I made the xpc_LocalizeContext be
called on each app locale change to update the default locale in each context.

Unfortunately, this function is also assigning the locale callbacks and
with my change it started doing it on each language change.

In this patch I'm first checking if we do have XPCLocaleCallbacks for the
given context and only if we don't, I assign them.

MozReview-Commit-ID: 7AiCsJfKBID

--HG--
extra : rebase_source : 1efe65895759ffc07e0047d063a405d757cb1092
2017-04-21 09:49:42 -07:00
Hannes Verschore e8f7043d0b Bug 1319746: Add a memory reporter for CFGGraph on BaselineScript, r=njn 2017-04-21 19:37:06 +02:00
Hannes Verschore 31296801c2 Bug 1334409 - TraceLogging: Add memory reporter for TraceLogging, r=njn 2017-04-21 19:37:04 +02:00
Cervantes Yu cc5836fbae Bug 1024669 - Part 1: Annotate crash reports with thread names. r=gsvelto
NS_SetCurrentThreadName() is added as an alternative to PR_SetCurrentThreadName()
inside libxul. The thread names are collected in the form of crash annotation to
be processed on socorro.

MozReview-Commit-ID: 4RpAWzTuvPs
2017-02-07 18:57:23 +08:00
Chris Peterson eea325c79d Bug 1356843 - Fix -Wcomma warnings in js/. r=jorendorff
clang's -Wcomma warning warns about suspicious use of the comma operator such as between two statements or to call a function for side effects within an expression.

js/src/builtin/MapObject.cpp:786:48 [-Wcomma] possible misuse of comma operator here
js/src/builtin/MapObject.cpp:1371:48 [-Wcomma] possible misuse of comma operator here
js/src/builtin/RegExp.cpp:1266:62 [-Wcomma] possible misuse of comma operator here
js/src/jit/x64/BaseAssembler-x64.h:624:99 [-Wcomma] possible misuse of comma operator here
js/src/jsarray.cpp:2416:27 [-Wcomma] possible misuse of comma operator here
js/src/jscompartment.cpp:120:48 [-Wcomma] possible misuse of comma operator here
js/src/jsstr.cpp:3346:14 [-Wcomma] possible misuse of comma operator here
js/xpconnect/src/XPCWrappedNativeJSOps.cpp:316:71 [-Wcomma] possible misuse of comma operator here

MozReview-Commit-ID: BbT4otUXczV

--HG--
extra : rebase_source : b232d10b5280c567f8fe390fcb56012b78da580a
2017-04-09 21:15:01 -07:00
Wes Kocher cb8ce82cca Merge inbound to m-c a=merge 2017-04-19 17:10:04 -07:00
Kris Maglione 32d79e3539 Bug 1356810: Follow-up: Fix xpcshell test for async subscript return value.
MozReview-Commit-ID: 2lgw8KzvjBT

--HG--
extra : rebase_source : db0dfd6eaf3dc32f56b25ba319dd797ec1b7b06a
2017-04-19 12:07:52 -07:00
Andrew McCreight 30fb73cef2 Bug 1357828 - Remove B2G-specific code from mozJSComponentLoader::ReallyInit(). r=mrbkap
MozReview-Commit-ID: I0h6Y9VQETJ

--HG--
extra : rebase_source : 87b885ae6eff09b5a7b6b5d1ad5e36d433814bba
2017-04-19 10:33:04 -07:00
Kris Maglione fe513a5fbc Bug 1356810: Use noScriptRval option by default for loadSubScript. r=billm
MozReview-Commit-ID: 50QVvrG4lzV

--HG--
extra : rebase_source : 357d4a4fb03e96efb74de2c5669d4da40ffa618e
2017-04-15 09:32:34 -07:00
Eric Rahm d96cdc6174 Bug 1357585 - Stop inheriting from PRCList in XPCWrappedNativeScope. r=bholley
XPCWrappedNativeScope inherits from PRCList, but is never used in a PRCList.

MozReview-Commit-ID: CGqxwHEleFx
2017-04-19 11:14:49 -07:00
Carsten "Tomcat" Book e2b810f97e Merge mozilla-central to mozilla-inbound 2017-04-19 10:49:57 +02:00
Zibi Braniecki abdb6cbf08 Bug 1356066 - JS_SetDefaultLocale should be updated on intl:app-locales-changed. r=shu,smaug
MozReview-Commit-ID: wDftiQLfax

--HG--
extra : rebase_source : 6080b5aa72bac7712e0a62275c260731aee7db00
2017-04-17 17:41:52 -07:00
Carsten "Tomcat" Book bb87f43c09 merge mozilla-inbound to mozilla-central a=merge 2017-04-18 10:21:31 +02:00
Luke Wagner c39bb259da Bug 1356631 - Change LargeAllocationCallback to be process-wide (r=mccr8)
This is necessary to allow helper threads to attempt large allocations and recover from fragmentation situations with the LargeAllocationFailureCallback.

MozReview-Commit-ID: AyA3pbXcaYy

--HG--
extra : rebase_source : 7a5feb779b690ec7f123481e76f2390c850dac91
2017-04-17 21:19:54 -05:00
Sebastian Hengst 8bd051237a merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JpAhOPjgvkF
2017-04-15 19:59:24 +02:00
Florian Queze 4c6a68d1c9 Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00
Andrew McCreight 39d3aedd82 Bug 1356666, part 4 - Use handles as arguments in mozJSSubscriptLoader. r=mrbkap
MozReview-Commit-ID: 9fClU6BIWfT

--HG--
extra : rebase_source : 0f255542a13fd1fdad3a950892694bc8684c0ac0
2017-04-14 14:38:51 -07:00
Andrew McCreight f5c9d2bf30 Bug 1356666, part 3 - Mark some functions in mozJSSubscriptLoader static. r=mrbkap
MozReview-Commit-ID: 7JsyR6B84Gz

--HG--
extra : rebase_source : 05aecd963e0d5e997613306cfc0ea158b68a0902
2017-04-14 14:33:17 -07:00
Andrew McCreight adaea5fbec Bug 1356666, part 2 - Fix some style issues in mozJSSubScriptLoader. r=mrbkap
mSystemPrincipal is an nsCOMPtr so it does not need to be explicitly
initialized.

Fields don't have to be lined up.

Empty function bodies don't need to be commented as such.

The blank line at the start of mozJSComponentLoader.cpp prevents Emacs
from using the mode line.

MozReview-Commit-ID: 7Az1x8jmxTI

--HG--
extra : rebase_source : 2d818074d82f9a6b1041983efd7a81bde9870619
2017-04-14 14:13:19 -07:00
Andrew McCreight ec4172c47a Bug 1356666, part 1 - Rename target_obj to targetObj in mozJSSubscriptLoader. r=mrbkap
MozReview-Commit-ID: 89WugjhzPLk

--HG--
extra : rebase_source : 0cdfc9702bed43e5712096082ca9daba755834b3
2017-04-14 14:10:40 -07:00
Andrew McCreight 7125a27450 Bug 1356799, part 4 - Remove unused argument to ReadScript. r=mrbkap
MozReview-Commit-ID: I5Jf0Fan7VN

--HG--
extra : rebase_source : d0818725171c7d020dc4226282d053ac43565abe
2017-04-14 16:43:08 -07:00
Andrew McCreight fcd6a8a00e Bug 1356799, part 3 - Handlify the target argument to ReadScript{,Async}. r=mrbkap
MozReview-Commit-ID: GOodGQ647qI

--HG--
extra : rebase_source : ab53decffb8193837223e01b205bae9d94cc17bb
2017-04-14 16:35:34 -07:00
Andrew McCreight ad47781af1 Bug 1356799, part 2 - Don't use JS:: for handle types in subscript loader. r=mrbkap
Also, be consistent with the rest of the code and use a handle
typedef in one place.

MozReview-Commit-ID: KY3cnLemoUl

--HG--
extra : rebase_source : 4c3ae2750c868b5401a686dd164adbd04b45a0b5
2017-04-15 06:47:07 -07:00
Andrew McCreight b38f79c2ac Bug 1356799, part 1 - Use one line per arg for methods with many args in subscript loader. r=mrbkap
MozReview-Commit-ID: BPZp6I0LSBH

--HG--
extra : rebase_source : 635c21fdb76a6fc78f41348a01c95d4428262e9d
2017-04-15 06:44:35 -07:00