Commit Graph

4744 Commits

Author SHA1 Message Date
Bobby Holley
28a3efa072 Backed out 3 changesets (bug 1165272) for b2g sanity blocker. 2015-08-25 11:16:21 -07:00
Till Schneidereit
422ca60743 Bug 1070767 - Enable {Array, %TypedArray%}.prototype.includes in all builds. r=lth 2015-08-25 12:57:21 +02:00
Yoshi Huang
053573a7c0 Bug 1165272 - Part 2: Replace getNoAppCodebasePrincipal. r=bholley 2015-08-24 01:18:00 -04:00
David Rajchenbach-Teller
ee087b088b Bug 1181175 - Use RDTSC for Performance Monitoring instead of getrusage. r=jandem 2015-08-17 14:57:23 +02:00
Ryan VanderMeulen
e32420bdb9 Merge inbound to m-c. a=merge 2015-08-17 09:06:59 -04:00
Ben Tian
cac4eb9266 Bug 1192693 - [02] Remove bluetooth1 folder and rename webidl files, r=joliu, r=mrbkap 2015-08-17 15:30:34 +08:00
Bill McCloskey
c796607dc2 Bug 1189125 - Allow xpcshell to use GTK (r=karlt) 2015-08-14 15:51:19 -07:00
Terrence Cole
2ac7da03fc Bug 1191529 - Remove JSIdArray and AutoIdArray and replace with Rooted<IdVector>; r=mccr8, r=jonco
* * *
imported patch 2_remove_AutoIdArray_gk
2015-08-05 11:02:00 -07:00
Jan de Mooij
fd84d70d2f Bug 1185653 - Fix enumerate hook on unboxed objects to skip non-enumerable properties. r=jorendorff 2015-08-11 17:42:56 +02:00
Kyle Huey
1ffb03e8dc Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -07:00
Ryan VanderMeulen
c92728a9ac Backed out changesets db4294fb662d and de9ae2ccb73b (bug 1181175) for Android test_compartments.js failures.
CLOSED TREE
2015-08-10 15:07:27 -04:00
David Rajchenbach-Teller
5584b9c372 Bug 1181175 - Use RDTSC for Performance Monitoring instead of getrusage. r=jandem 2015-07-07 18:45:54 +02:00
Birunthan Mohanathas
9b6236a10a Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan
Comment-only so DONTBUILD.
2015-08-04 16:17:36 -07:00
Andrew McCreight
4f96a20314 Bug 1190436 - Part 2: Use an early return in XPCConvert::JSObject2NativeInterface. r=gabor 2015-08-03 11:48:00 -04:00
Andrew McCreight
cbe7e5bf11 Bug 1190436 - Part 1: Use more smart pointers in XPConnect. r=gabor 2015-08-03 11:47:00 -04:00
Andrew McCreight
d8bf4dd122 Bug 1155773 - Remove gotos from XPCConvert::NativeArray2JS(). r=bholley 2015-08-03 11:47:00 +02:00
Nicholas Nethercote
845b474b3c Bug 1189156 (part 4) - Don't use enumeration style for nsBaseHashtable::SizeOf{In,Ex}cludingThis(). r=erahm,jfkthame.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)
2015-07-30 21:19:57 -07:00
Boris Zbarsky
9161435478 Bug 1135961. Implement subclassing of DOM objects. r=peterv 2015-07-31 13:30:55 -04:00
Nicholas Nethercote
d130e7465e Bug 1189156 (part 1) - Don't use enumeration style for PLDHashTable::SizeOf{In,Ex}cludingThis(). r=froydnj.
After this change, we have PLDHashTable::ShallowSizeOf{In,Ex}cludingThis(),
which don't do anything to measure children. (They can be combined with
iteration to measure children.)

This patch also removes the PL_DHashTableSizeOf{In,Ex}cludingThis() functions.
They're not necessary because the methods can be used instead.

Finally, the patch deliberately converts some SizeOfExcludingThis() calls to
SizeOfIncludingThis(). These are all done on heap pointers so this change is
valid.
2015-07-29 22:28:20 -07:00
Alexandre Poirot
898d8dba6d Bug 1182194 - Convert LayoutHelpers.jsm into a commonjs module. r=jwalker 2015-07-30 06:14:08 -07:00
Mike Kaply
13924a4381 Bug 1152512 - Use the latest JavaScript version when parsing AutoConfig files. r=mrbkap 2015-07-28 13:57:55 -05:00
Andrew McCreight
732d1807b7 Bug 1185527 - Split out a refcountless base class for nsScriptError. r=gabor
This avoids shadowing the refcount if nsScriptErrorWithScript inherited from nsScriptError.
2015-07-28 16:51:10 -04:00
Carsten "Tomcat" Book
16094b9031 Backed out changeset 0afe24f16cf4 (bug 1152512) for bustage 2015-07-28 14:38:01 +02:00
Mike Kaply
d8e49ff2b8 Bug 1152512 - Use the latest JavaScript version when parsing AutoConfig files. r=mrbkap 2015-07-28 07:13:26 -05:00
Giovanny Andres Gongora Granada
2df2ce292c Bug 1150312 - Remove MOZ_SHARK. r=glandium 2015-07-23 18:16:00 -04:00
Tom Tromey
e469d3beb5 Bug 1148593 - Create async stack in callback objects. r=bz, r=fitzgen 2015-07-24 07:01:00 -04:00
Andrew McCreight
7540a09e15 Bug 1187410 - Use GetNameShared() in XPCNativeInterface::NewInstance() to avoid a leak. r=mrbkap
GetName() returns a new string, but that string is never freed.

This patch avoids the leak by not copying the string. This is okay because
the scope of intfNameChars is within the scope of aInfo.
2015-07-26 14:26:23 -07:00
Bobby Holley
60e84ed187 Bug 1186213 - Add an API to deep-freeze the result of Cu.cloneInto. r=gkrizsanits 2015-07-21 14:57:00 +02:00
Terrence Cole
20cac448e7 Bug 1186156 - Move the PersistentRooted list heads into RootLists; r=sfink 2015-07-09 14:13:10 -07:00
Andrew McCreight
4d7b5da27d Bug 931571, part 13 - Add a destructor for nsDiscriminatedUnion. r=froydnj
The existing nsDiscriminateUnions either always call Cleanup() when they
are about to go away, or they only handle scalar values so it is safe to
call Cleanup() on them without worrying about another discriminated union
having taken over any memory owned by this union.
2015-07-23 12:28:30 -07:00
Andrew McCreight
6a195e4cef Bug 931571, part 12 - Add nsDiscriminatedUnion::GetType(). r=froydnj
This is not quite enough to make the data members private because
XPCVariant pokes around to do some JS array stuff.
2015-07-23 12:28:30 -07:00
Andrew McCreight
51cea2f479 Bug 931571, part 11 - Turn nsDiscriminatedUnion's Traverse function into a method. r=froydnj 2015-07-23 12:28:30 -07:00
Andrew McCreight
e53e412412 Bug 931571, part 9 - Turn most of the nsVariant setters into nsDiscriminated methods. r=froydnj
This also adds a new nsDiscriminatedUnion method SetFromDOMString, as somebody added an nsVariant method without the corresponding helper.
2015-07-23 12:28:30 -07:00
Andrew McCreight
12d7da659e Bug 931571, part 8 - Turn ConvertToISupports, ConvertToInterface and ConvertToArray to methods. r=froydnj 2015-07-23 12:28:30 -07:00
Andrew McCreight
fc5c442ba0 Bug 931571, part 7 - Turn ConvertTo*String and ToString into methods. r=froydnj 2015-07-23 12:28:30 -07:00
Andrew McCreight
86c0a53064 Bug 931571, part 6 - Make ConvertToID and String2ID into methods. r=froydnj 2015-07-23 12:28:30 -07:00
Andrew McCreight
b3ac30a78e Bug 931571, part 5 - Turn basic ConvertTo functions into methods. r=froydnj 2015-07-23 12:28:30 -07:00
Andrew McCreight
065193dbb7 Bug 931571, part 2 - Convert Cleanup() and FreeArray() to methods. r=froydnj 2015-07-23 12:28:29 -07:00
Andrew McCreight
a76af36e15 Bug 931571, part 1 - Use a constructor for nsDiscriminatedUnion. r=froydnj 2015-07-23 12:28:29 -07:00
Andrew McCreight
9214859718 Bug 1176341 - De-holder nsIXPConnect::CreateSandbox. r=baku,gabor 2015-07-21 11:31:44 -07:00
Ryan VanderMeulen
09933c4462 Backed out changeset 553a3e1e7b18 (bug 1176341) for bustage.
CLOSED TREE
2015-07-21 13:00:55 -04:00
Andrew McCreight
e4b73b7879 Bug 1176341 - De-holder nsIXPConnect::CreateSandbox. r=baku,gabor 2015-07-21 09:44:37 -07:00
Andrew McCreight
ec84671bad Bug 1185144 - nsConsoleService::LogMessageWithMode() should release the retired message on the main thread. r=froydnj
Also, add release asserts that the other methods that addref or release console messages are only run on the main thread.

Finally, add an assert that nsScriptErrorWithStack is only created on the main thread.
2015-07-21 07:50:09 -07:00
Andrew McCreight
13dba4f177 Bug 1185634 - Part 2: Remove obsolete comment. r=gabor 2015-07-20 11:46:00 -04:00
Andrew McCreight
3bb92d1def Bug 1185634 - Part 1: SandboxPrivate shouldn't be public. r=gabor 2015-07-20 11:46:00 -04:00
Andrew McCreight
e43fb0894e Bug 1185056 - Use the normal CC macros for XPCWrappedNative. r=smaug 2015-07-17 14:14:00 +02:00
Jan de Mooij
a7ae949817 Bug 1184564 part 1 - Use Value instead of jsval in XPConnect. r=bholley 2015-07-18 21:45:35 +02:00
Brian Hackett
fff928dd10 Bug 1183480 - Return old timeout value in setScriptTimeout(), r=bholley. 2015-07-17 09:45:08 -07:00
Ryan VanderMeulen
9f708a5c1b Backed out changesets fa9fe193778f and 3eaf867930dd (bug 1148593) for test_async_setTimeout_stack.html and test_async_setTimeout_stack_across_globals.html failures. 2015-07-17 12:37:24 -04:00
Tom Tromey
2e72ef5901 Bug 1148593 - Create async stack in callback objects. r=bz, r=fitzgen 2015-07-17 07:48:00 -04:00