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

56421 Коммитов

Автор SHA1 Сообщение Дата
Wes Kocher f09e8fef1a Merge inbound to central, a=merge 2016-08-26 16:20:50 -07:00
Terrence Cole dea2d7e2f4 Bug 1296484 - Automatically run a CC if COMPARTMENT_REVIVED GC ends mostly gray; r=jonco,r=mccr8
--HG--
extra : rebase_source : 94482f4c09e640ca9e0436316c992457dd5b9f61
2016-08-18 13:30:32 -07:00
Till Schneidereit a3a1f7aa3e Bug 1289318 - Part 9: Port Promise.resolve and Promise.reject to C++ and optimize various common cases. r=efaust
This adds a lot of C++ code, but it allows us to optimize cases that would be annoying to optimize in JS.

MozReview-Commit-ID: CbKWXEs8pMv
2016-08-26 17:45:03 +02:00
Till Schneidereit 36380475eb Bug 1289318 - Part 8: Combine Promise state and rejection handling info into a single flags field. r=efaust
The rejection handling state will be required even without devtools being open once projection rejection tracking events[1] are implemented, so it should always be tracked on the Promise itself. The other debugging state will be moved into a debug-only object referenced via a slot on Promise.

MozReview-Commit-ID: LM10qruLDxz
2016-08-26 17:45:02 +02:00
Till Schneidereit e2d055ae6b Bug 1289318 - Part 7: Store the Promise reactions list in the same slot as the result. r=efaust
A Promise can only have either a list of reactions, if it's pending, or a result/reason, if it's resolved.

This gets us down to 3 non-debug-info slots. If we now move the debug info into its own object and only allocate that when the debugger is open, Promise instances only need 4 slots.

MozReview-Commit-ID: FuLAwhmFTBe
2016-08-26 17:45:01 +02:00
Till Schneidereit d589429ecc Bug 1289318 - Part 6: Don't store a reference to the reject function on Promise instances themselves. r=efaust
The reject function is reachable via the resolve function, so we can save a slot.

MozReview-Commit-ID: 9SPdRdnt98T
2016-08-26 17:45:01 +02:00
Till Schneidereit 18ec965154 Bug 1289318 - Part 5: Port most Promise functions directly involved in Promise resolution from JS to C++. r=efaust
Importantly, CreateResolvingFunctions, ResolvePromise, and TriggerPromiseReactions have been ported.

This reduces memory usage because before, the `resolve` and `reject` functions stored on a pending Promise kept track of each other and the Promise they belong to using a closure. Now, that state is stored in the functions' extended slots - which they have anyway.

It should also improve performance, as fewer switches between JS and C++ code occur during processing of Promise reaction job lists.

MozReview-Commit-ID: 9Wp0sDFayTy
2016-08-26 17:45:00 +02:00
Till Schneidereit cad9414a19 Bug 1289318 - Part 4: Only allocate the Promise reactions array once the first reaction record is added. r=efaust
Saves 96 bytes on reaction-less promises. It also saves 32 bytes on promises that have up to two reactions: empty arrays are initialized with an allocated length of 8, whereas providing an initial element initializes to 2.

MozReview-Commit-ID: 3PtT7LDwL3k
2016-08-26 17:44:59 +02:00
Till Schneidereit bd90ea737d Bug 1289318 - Part 3: Merge Promise fulfillment and rejection reaction lists into a single list. r=efaust
This saves a slot on Promise instances, an Array allocation, and a rejection record per dependent promise.

While the first doesn't in itself save anything (going from 12 to 11 slots doesn't do anything), the second saves 96 bytes per Promise, and the third 64 bytes per dependent Promise.

MozReview-Commit-ID: BglU9tx89rD
2016-08-26 17:44:58 +02:00
Till Schneidereit 35cd874478 Bug 1289318 - Part 2: Make Promise reaction records their own object type with a constructor and all. r=efaust
That allows them to be unboxed, saving 32 bytes per instance. It's nicer, too.

MozReview-Commit-ID: HHvb5PihUUD
2016-08-26 17:44:58 +02:00
Till Schneidereit 9a23b3933f Bug 1289318 - Part 1: Store contents of spec-defined `capabilities` struct in Promise reaction jobs directly. r=efaust
No need to keep create an additional object for this.

MozReview-Commit-ID: Hj8kpaBe6fL
2016-08-26 17:44:57 +02:00
Sebastian Hengst fc6d401c09 Backed out changeset 477689b30c9e (bug 1278562) for devtools failures (e.g. browser_dbg_promises-allocation-stack.js) and xpcshell failures (test_promise_state-01.js). r=backout on a CLOSED TREE 2016-08-26 15:46:55 +02:00
Sebastian Hengst 996e3a267d Backed out changeset da5623128a3a (bug 1278562) 2016-08-26 15:45:36 +02:00
Sebastian Hengst 7506c3fd3e Backed out changeset 4a66d787e352 (bug 1278562) 2016-08-26 15:45:31 +02:00
Sebastian Hengst 10abbd49e3 Backed out changeset eb2a5dc69ab0 (bug 1278562) 2016-08-26 15:45:27 +02:00
Sebastian Hengst 8567353813 Backed out changeset fa3bb9308449 (bug 1278562) 2016-08-26 15:45:22 +02:00
Ryan VanderMeulen 628ab3deff Merge m-c to inbound. a=merge 2016-08-26 09:39:29 -04:00
Ryan VanderMeulen e1fdfb3b73 Merge inbound to m-c. a=merge 2016-08-26 09:37:03 -04:00
Eddy Bruel a34f37a145 Bug 1278562 - Implement a C++ interface for DebuggerObject.promiseReason. r=jimb 2016-08-26 14:09:17 +02:00
Eddy Bruel af094784e5 Bug 1278562 - Implement a C++ interface for DebuggerObject.promiseValue. r=jimb 2016-08-26 14:08:53 +02:00
Eddy Bruel 8c3262835f Bug 1278562 - Implement a C++ interface for DebuggerObject.promiseState. r=jimb 2016-08-26 14:08:33 +02:00
Eddy Bruel 1addb2460a Bug 1278562 - Make the isPromise getter infallible. r=jimb 2016-08-26 14:08:10 +02:00
Eddy Bruel 5ebc819f4f Bug 1278562 - Split promiseState into promiseState/Value/Reason. r=jimb 2016-08-26 14:07:46 +02:00
Eddy Bruel 6988bb7423 Bug 1278562 - Rename isPromise to getIsPromise. r=jimb 2016-08-26 10:33:14 +02:00
Eddy Bruel 38b90da8b4 Bug 1278562 - Rename scriptedProxyTarget/Handler to getScriptedProxyTarget/Handler. r=jimb 2016-08-26 10:32:30 +02:00
Andrew McCreight e1f78c53f2 Bug 1290239, part 2 - Add assertions about inserting into NativeSetMap. r=mrbkap
If we are inserting an XPCNativeSet into a NativeSetMap, and we failed
to find it, then the insertion should not have found some other set
there already.

Additionally in this case, the hash value of a XPCNativeSetKey for the
set we are inserting should be the same as the key we used to insert
the set into the map. If this property does not hold, then we can't
use Remove() to remove the set from the map. This condition would have
caught the error that part 1 fixes.

MozReview-Commit-ID: 23v37GzA4XV

--HG--
extra : rebase_source : 4dca7ffc436f53214eb2927bc1ff2f71927f7ac3
2016-07-29 13:19:57 -07:00
Andrew McCreight 8d254f9e91 Bug 1290239, part 1 - Compute the correct hash value for an XPCNativeSetKey when mBaseSet is null. r=mrbkap
The current hash function fails to take into account that all
XPCNativeSets have nsISupports as their first element.

MozReview-Commit-ID: 7B8TPVnaM7I

--HG--
extra : rebase_source : a357f88a7d54aa1c9f58b6d429d4a5bbaaa13e80
2016-07-29 11:41:48 -07:00
Andrew McCreight dadb0e9351 Bug 1295684 - Make JSObject2WrappedJSMap infallible. r=mrbkap
We crash sometimes if we fail to add. We should always crash, because
we don't properly attempt to handle failure, and it would be nice to
get proper OOM-annotated crash reports.

MozReview-Commit-ID: EGgYxPdUSky

--HG--
extra : rebase_source : 92faf09c52452089b32cc430c04568b81e677f74
2016-08-16 11:12:00 -07:00
Tooru Fujisawa ed75f228bc Bug 1294940 - Part 3: Add ConstUTF8CharsZ variant for UTF8CharsToNewTwoByteCharsZ and LossyUTF8CharsToNewTwoByteCharsZ. r=jwalden
--HG--
extra : rebase_source : 0e58c098e1b898b5e3d1e7216ae2384af072b5a7
2016-08-15 14:52:56 +09:00
Tooru Fujisawa c12ce2fc48 Bug 1294940 - Part 2: Add validation for ConstUTF8CharsZ. r=jwalden
--HG--
extra : rebase_source : eb101f4fa5eacf839908d3f5f6729763dca78992
2016-08-13 23:03:30 +09:00
Tooru Fujisawa fc1c230284 Bug 1294940 - Part 1: Add ConstUTF8CharsZ class for const UTF8 string. r=jwalden
--HG--
extra : rebase_source : 6f8b433038c1db36902aaeba1c7f5694bf5900a5
2016-08-15 14:52:56 +09:00
Tooru Fujisawa a60af5b6e9 Bug 1294940 - Part 0.2: Make InflateUTF8StringHelper template function instead of passing count action function. r=jwalden
--HG--
extra : rebase_source : 1c951880961df07744e00ce61bd8141492bde020
2016-08-15 14:52:56 +09:00
Tooru Fujisawa ad712d491e Bug 1294940 - Part 0.1: Capitalize template parameter "action" of InflateUTF8StringToBuffer. r=jwalden
--HG--
extra : rebase_source : b30dea0109cef5a03d36ff8179a13f835e63c6e3
2016-08-15 14:52:55 +09:00
Steve Fink f67135bc5e Bug 1296878 - TraceLogger: report thread name when available, r=h4writer
--HG--
extra : rebase_source : f36d81f2a56f04a3d1fd0c03c3686ed03dbeaae8
extra : source : 05f3d17beffe1409c77122f32ffbff450d3b0cd1
2016-08-22 15:30:12 -07:00
Steve Fink d11313e8cd Bug 1296878 - Implement js::ThisThread::GetName for limited set of platforms, r=fitzgen,glandium
--HG--
extra : rebase_source : 53c84abaf62a045894b502c9fb7b206766b45019
2016-08-22 16:07:53 -07:00
Steve Fink 69a5acf100 Bug 1296876 - TraceLogger: write files to $TLDIR, r=h4writer
--HG--
extra : rebase_source : aeecbca402b37b716f5fb0976a75d36aec9f4484
extra : source : 3fe209e9ca79cf9b93140b4906ca62ab5d7d59d6
2016-08-25 11:10:34 -07:00
Steve Fink 1d98c6b03f Bug 1296875 - Minor TraceLogger cleanups, comments, refactoring; r=h4writer
--HG--
extra : rebase_source : 71c1484374b8cf97a9991db85cbcb1ccbd01271b
extra : source : 8b45dd84cc086a76c197de13a81d8783dfd866c3
2016-08-18 13:10:07 -07:00
Phil Ringnalda 52892dd9cf Backed out changeset c1cf1e462ff9 (bug 1287967) for SM shell build bustage
CLOSED TREE

--HG--
extra : rebase_source : cd75d4d00f429ee9d5f5e97ef1f90616b0153855
2016-08-25 20:19:18 -07:00
Dimo c8efba87ec Bug 1287967 - Baldr: Add current_memory and grow_memory (r=luke, sunfish) 2016-08-25 19:51:01 -07:00
Leo Gaspard 2df9fd1853 Bug 1297244 - Assert on the type given as a parameter to Heap. r=terrence
--HG--
extra : rebase_source : 2523f190a45bf3669f40392226df6a0b6fbc9806
2016-08-24 14:21:42 -07:00
Michael Smith d12bd6f89d Bug 1297858: Check getPendingException status before clearing exception r=jandem
--HG--
extra : rebase_source : 7dd03ac437d254a51775d92498f11d7259bd9ad4
2016-08-24 15:16:55 -07:00
Michael Smith c0d87090ab Bug 1296087: Improve getter cache r=nbp
--HG--
extra : rebase_source : f533477e09d0ecd6b3f3b9de74cd9728b92d633c
2016-08-17 13:53:08 -07:00
Wes Kocher 00bdbfd6e2 Backed out changeset bbd6bdd463b1 (bug 1296484) for asan leaks in XPCJSRuntime a=backout 2016-08-25 17:25:00 -07:00
Shu-yu Guo c19214d4e7 Bug 1285213 - Fix runtime lexical errors with Debugger environments on the environment chain. (r=jimb)
Some background first. For names that must be looked up dynamically, TDZ
checks are built in to the various NAME ops. For an assignment |x = 42|,
we emit:

BINDNAME "x"
INT8 42
SETNAME "x"

where the order of operations is:

1) BINDNAME first looks up the env where "x" is bound,
2) The RHS is evaluated,
3) The resulting value is assigned to "x" in the env from step 1)

That is, spec requires it that 3) is what throws any TDZ violations,
meaning we must evaluate RHS first. However, the implementation of
SETNAME is ultimately a call into SetProperty. Slowing down SetProperty
calls with TDZ checks was a non-starter. What we do instead is that if
BINDNAME sees a TDZ poison value when looking up the environment,
instead of pushing the actual environment, it pushes a magical
LexicalRuntimeErrorObject, which throws TDZ errors if it's touched in
any way (sets, gets, has-own-property, etc).

The code that created the LexicalRuntimeErrorObject did not understand
how to unwrap DebugScopeObjects, thus it considered that
DebugScopeObjects could never generate TDZ errors, leading to this bug.
2016-08-25 15:59:13 -07:00
Wes Kocher 50954c6f31 Merge m-c to autoland, a=merge 2016-08-25 17:15:05 -07:00
Emanuel Hoogeveen 8210833803 Bug 1294732 - Back out all of bug 1271165 as it has served its purpose. r=glandium 2016-08-23 08:45:00 -04:00
Jon Coppeard 9a8de4b899 Bug 1297667 - Add array buffer compartment checking assertions at the API level r=sfink 2016-08-25 12:00:56 +01:00
Jon Coppeard a30843aba8 Bug 1297026 - Replace outdated references to 'compartment GC' with 'zone GC' r=terrence 2016-08-25 12:00:56 +01:00
Jon Coppeard 1977427503 Bug 1297343 - Make some more object classes background finalized r=sfink 2016-08-25 12:00:56 +01:00
Jon Coppeard ed08c39923 Bug 1295967 - Update some comments now shapes are shared within a zone r=jandem 2016-08-25 12:00:55 +01:00