Commit Graph

56538 Commits

Author SHA1 Message Date
Jeff Walden
0bfc5e193f Bug 1288459 - Forbid GeneratorDeclaration as a child of LabelledStatement. r=arai
--HG--
extra : rebase_source : 7ad37e87fbc2974f33f151c66a7fa0bb9591f476
2016-08-27 00:41:39 -07:00
Jeff Walden
36fadecb91 Bug 1288459 - Implement static semantics restrictions on labeled functions when 'function' is first encountered after a label, not some weird time later. r=arai
--HG--
extra : rebase_source : 4c971ab1918e1cca5fb8390c5bc9dafa27062f7d
2016-08-24 22:06:29 -07:00
Jeff Walden
2127ca60f4 Bug 1288459 - Make Parser::statement and Parser::statementListItem behave exactly as the spec productions do. Particularly: function/lexical declarations are disallowed as Statements, "let" isn't a valid label in strict mode code, and "yield" is sometimes a permissible identifier in |let| declarations. Also add various tests. r=arai
--HG--
extra : rebase_source : 6162c04298a04ce45e32d564c1718f4216b130b6
2016-08-25 14:11:17 -07:00
Jeff Walden
58af55055c Bug 1288459 - Convert a few existing calls to Parser::statement over to Parser::statementListItem (which still has identical functionality at present), before the two functions' behavior is made to differ. r=arai
--HG--
extra : rebase_source : 7eac11fa962864ded95cda2ee9a1069b90f12ae4
2016-08-24 22:16:34 -07:00
Jeff Walden
fd76796d50 Bug 1288459 - Copy Parser::statement into an identical (but not-yet-called) Parser::statementListItem. r=arai
--HG--
extra : rebase_source : f96511543842982cbc5cbd5e43e908ea7ec02071
2016-08-24 21:45:48 -07:00
Jeff Walden
138071041c Bug 1288459 - Add a test for 'let' as a label in strict and non-strict code. r=arai
--HG--
extra : rebase_source : 3ebdf77ffe81c75a4fbd083d7328264b362d5f17
2016-08-27 11:52:09 -07:00
Jeff Walden
5ac0890268 Bug 1288459 - Make the statement-like children of an |if(-else)| properly understand FunctionStatement. r=arai
--HG--
extra : rebase_source : d0c73ee34abfca2a70eb0731c159900d1a8e82bd
2016-08-27 00:41:39 -07:00
Jeff Walden
13d0662af1 Bug 1288459 - Make Parser::labeledStatement use a new Parser::labeledItem function to parse its nested statement, anticipating when Parser::statement no longer parses FunctionDeclarations. r=arai
--HG--
extra : rebase_source : 6e0aef62aeaaacade56589b1f40aab1a20047529
2016-08-24 21:53:40 -07:00
Jeff Walden
151707db5d Bug 1288459 - Split variable-statement parsing into its own parser function. r=arai
--HG--
extra : rebase_source : 574f08e92b8e8e9f0f35e86a48986e956828c09a
2016-08-24 17:28:39 -07:00
Jeff Walden
978e38289a Bug 1288459 - Rename Parser::statements to Parser::statementList, the actual grammar term. r=arai
--HG--
extra : rebase_source : d423ec20ba08f429a7a591e0fef162ce0101096b
2016-08-24 16:57:43 -07:00
Tom Schuster
c0468b53d1 Bug 1296851 - Always allow SetPrototype with the same value as the current [[Prototype]]. r=Waldo 2016-08-27 21:47:01 +02:00
Jan de Mooij
6df1030632 Bug 1245965 - Remove the NewObjectCache. r=terrence 2016-08-27 19:57:34 +02:00
Wes Kocher
cbdf3625fa Merge m-c to inbound, a=merge 2016-08-26 16:32:56 -07:00
Wes Kocher
f09e8fef1a Merge inbound to central, a=merge 2016-08-26 16:20:50 -07:00
Boris Zbarsky
6a73ce5a82 Bug 1295322 part 1. Make ThrowExceptionObject return void, instead of bool. r=bholley 2016-08-26 15:38:16 -04:00
Luke Wagner
f7ea839a1d Bug 1292724 - Baldr: don't fail to validate i64 imports and exports; throw runtime errors (r=sunfish)
MozReview-Commit-ID: 8KDCNutTjnB

--HG--
extra : rebase_source : 7175217d7ad93d6c2a26b022052961c4aa48170b
2016-08-26 12:51:13 -05: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
Shu-yu Guo
4d275cec0d Bug 1263355 - Fix Scope->zone() comparison to use zoneFromAnyThread to fix CLOSED TREE. 2016-08-25 02:51:50 -07:00
Shu-yu Guo
89a8081f72 Bug 1263355 - Fuzz tests. 2016-08-25 01:28:47 -07:00
Shu-yu Guo
03569f36dd Bug 1263355 - Report memory metrics for Scopes. (r=njn) 2016-08-25 01:28:47 -07:00
Shu-yu Guo
e2b6833e0a Bug 1263355 - Rewrite the frontend: bindings. (r=jorendorff,Waldo) 2016-08-25 01:28:47 -07:00
Nicholas Nethercote
c2306345d5 Bug 1297658 - Avoid unnecessary checking in memory reporters. r=erahm.
This patch removes checking of all the callback calls in memory reporter
CollectReport() functions, because it's not useful.

The patch also does some associated clean-up.

- Replaces some uses of nsIMemoryReporterCallback with the preferred
  nsIHandleReportCallback typedef.

- Replaces aCallback/aCb/aClosure with aHandleRepor/aData for CollectReports()
  parameter names, for consistency.

- Adds MOZ_MUST_USE/[must_use] in a few places in nsIMemoryReporter.idl.

- Uses the MOZ_COLLECT_REPORT macro in all suitable places.

Overall the patch reduces code size by ~300 lines and reduces the size of
libxul by about 37 KiB on my Linux64 builds.

--HG--
extra : rebase_source : e94323614bd10463a0c5134a7276238a7ca1cf23
2016-08-24 15:23:45 +10:00
Andrew McCreight
b9fe49e715 Bug 1290614, part 7 - Further refactor XPCNativeSetKey::Hash. r=mrbkap
Now we can see what is really happening in Hash: first hash the
interfaces from the base set, if any, then hash the additional
interface, if any.

Note that this function is wrong when mBaseSet is null. This will be
fixed in bug 1290239.

MozReview-Commit-ID: KaxQ57ofO1D

--HG--
extra : rebase_source : 42012878839adb2e36580480abce7d9708288db4
2016-07-31 14:19:31 -07:00
Andrew McCreight
bcc1ce175d Bug 1290614, part 6 - Hoist out the common loop over all interfaces in XPCNativeSetKey::Hash(). r=mrbkap
Both cases first hash together all of the existing interfaces.

MozReview-Commit-ID: AnUF5uPSPpN

--HG--
extra : rebase_source : 43ac016974d3ee4dfbd92361348aeeae5b6a793c
2016-07-31 14:16:52 -07:00
Andrew McCreight
c2ef63a1b9 Bug 1290614, part 5 - Split out the last iteration of the XPCNativeSetKey loops. r=mrbkap
Now I take advantage of knowing that any new interface is always being
added to the end of the set.

Further cleanup of Hash() will happen in the next patch.

MozReview-Commit-ID: EoESTOfIOr

--HG--
extra : rebase_source : 8471391d23e3ff27a27156f55badbef3d1a4118b
2016-07-31 14:11:01 -07:00
Andrew McCreight
c597939d49 Bug 1290614, part 4 - Stop storing mPosition in XPCNativeSetKey. r=mrbkap
There are three cases for a key, represented by the three ctors:
1. mBaseSet is non-null, mAddition is null.
2. mBaseSet is null, mAddition is non-null.
3. Both mBaseSet and mAddition are non-null.

In the three places that use the value of mPosition, condition 3
holds, so the key must have been constructed using the third ctor. For
this ctor, mPosition is equal to mBaseSet->GetInterfaceCount(), so I
substitute the value and eliminate the field.

This makes a check in NewInstanceMutate() trivially false, so I
eliminated that, too.

MozReview-Commit-ID: 1SOF6GyccU7

--HG--
extra : rebase_source : e215da19d77d6f88c216a48a07b9450c4d0e12bb
2016-07-31 13:50:11 -07:00
Andrew McCreight
d01e63e95e Bug 1290614, part 3 - The last argument to the third XPCNativeSetKey ctor is always the interface count. r=mrbkap
The mPosition field will be eliminated in a later patch.

MozReview-Commit-ID: EyVYZGgUWrH

--HG--
extra : rebase_source : 229ec989485bdd3ef86670a7c7db4149281a8d79
2016-07-31 13:36:39 -07:00
Andrew McCreight
d55f0d4d23 Bug 1290614, part 2 - Split XPCNativeSetKey into three constructors. r=mrbkap
This explicitly represents the three types of keys that are used:

1. A key for an existing set.
2. A key for a new set with one interface added.
3. A key for an existing set with one new interface added at a
specified position.

MozReview-Commit-ID: Ctw41EymHbd

--HG--
extra : rebase_source : d7ce7d608a3d09df752313116c99bc2079d15a13
2016-07-31 13:25:05 -07:00
Andrew McCreight
e453d61e92 Bug 1290614, part 1 - Pass around XPCNativeSetKeys to better encapsulate argument invariants. r=mrbkap
XPCNativeSet::GetNewOrUsed() and ::NewInstanceMutate() essentially
take XPCNativeSetKeys as arguments, but pass them around
unboxed. Passing around the keys explicitly will allow later changes
to enforce stronger invariants on keys.

MozReview-Commit-ID: CyQU3bUGinq

--HG--
extra : rebase_source : 5cdc651c1e4b9566dccd61b66de5e2bb8d6f33f5
2016-07-31 13:00:02 -07:00
Heiher
a2d3815921 Bug 1297581 - IonMonkey: MIPS64: Fix crash on running octane richards. r=jonco
---
 js/src/jit/mips64/MacroAssembler-mips64.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
2016-08-24 23:59:55 +08:00
Andi-Bogdan Postelnicu
366e6556f1 Bug 1282408 - add ignore initialization check flag for variables from ElemSegment. r=luke
MozReview-Commit-ID: 1jd0JbeVapq
2016-08-24 17:27:52 +03:00
Nick Fitzgerald
957dd2a412 Bug 1297404 - Remove the JS_CallOnce JSAPI function. r=terrence
--HG--
extra : rebase_source : 7f751d6a11887096fbe66ee9800b21c8c3b900bf
2016-08-23 11:25:00 -04:00
Andi-Bogdan Postelnicu
bc874a67d5 Bug 1282408 - add ignore initialization check flag for pod from FuncExport. r=luke
MozReview-Commit-ID: 71zQBOwH6tS
2016-08-24 17:05:03 +03:00
Jon Coppeard
12b04bb312 Bug 1293057 - Add compartment checking assertions to promise API r=till 2016-08-24 14:18:11 +01:00
Jon Coppeard
24b7080184 bug 1296016 - Store shell off thread compilation state in ShellContext r=jandem 2016-08-24 14:18:11 +01:00
Jon Coppeard
d1435a2a8c Bug 1296688 - Add JSCLASS_FOREGROUND_FINALIZE flag r=sfink r=smaug 2016-08-24 14:18:10 +01:00
Jon Coppeard
b62f84aa49 Bug 1288579 - Fix hang when GC is decommitting r=terrence
--HG--
extra : rebase_source : af726ecbebecd6c545c6e11342dee121e910b0f0
2016-08-24 10:13:58 +01:00
Terrence Cole
2d06bc1282 Bug 1297067 - Remove unused decommit threshold r=jonco
--HG--
extra : rebase_source : 83c4d2b86bdda4912c8213d60a8a3789c87e0c61
2016-08-22 15:01:40 -07:00
Kan-Ru Chen
b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Phil Ringnalda
b25ad4c181 Back out changeset bba47d5c2583 (bug 1296484) for isNurseryAllocAllowed() assertion failures in devtools tests
CLOSED TREE
2016-08-23 22:37:03 -07:00
Chris Manchester
942b77d16c Bug 1294803 - Move MOZ_SYSTEM_FFI to moz.configure in preparation for moving libffi to our build system. r=glandium
This patch introduces a small change in behavior: we now unconditionally
require libffi > 3.0.9 when using system ffi, rather than accepting 3.0.9
when using GCC, as 3.0.10 was released 5 years ago, and should be widely
available.


MozReview-Commit-ID: DtSDPoZSPcx
2016-08-22 15:07:07 -07:00
Chris Manchester
470a2afbb6 Bug 1294803 - Move BUILD_CTYPES to Python configure. r=glandium
MozReview-Commit-ID: 3TlgdpNDLZW
2016-08-22 12:17:19 -07:00
Terrence Cole
d00af19508 Bug 1296484 - Automatically CycleCollect if COMPARTMENT_REVIVED GC ends mostly gray; r=mccr8,r=jonco
--HG--
extra : rebase_source : d8df564fb782c4d8cfa4a5b153e5cda00e6343a2
2016-08-18 13:30:32 -07:00
Ryan VanderMeulen
cd2e02c188 Merge m-c to inbound. a=merge 2016-08-23 10:06:36 -04:00
Ryan VanderMeulen
82663d8710 Merge inbound to m-c. a=merge 2016-08-23 10:05:18 -04:00
Luke Wagner
5d7e68e2b4 Bug 1296143 - Baldr: remove IsI64Implemented (r=h4writer)
MozReview-Commit-ID: ITGcB7xtwci

--HG--
extra : rebase_source : 025d287ccb46d410d403bcffe97f75d01e5a3101
2016-08-22 23:05:52 -05:00
Andrew McCreight
8fcd1d9885 Bug 1288870, part 5 - Remove the now-vestigial Mark code for XPCNativeInterface. r=billm
XPCNativeInterface::Mark(), Unmark() and IsMarked() don't do anything
any more, so anything that calls them can be deleted. This removes the
only use of XPCCallContext::CanGetInterface(), so delete that, too.

MozReview-Commit-ID: 4w3aPTVXNDI
2016-08-23 05:59:57 -07:00
Andrew McCreight
f1d540176d Bug 1288870, part 4 - Make XPCNativeInterface refcounted. r=billm
There are four classes that call Root() on XPCNativeInterface, and
thus keep interfaces alive. Each of these gets converted to use a
RefPtr:

1. XPCCallContext. This could be on some kind of hot path, but the
FindMemberCall involves various string operations and hashtable
lookups, so adding a single AddRef shouldn't matter. One weirdness
here is that the context only roots the interface when |mState >=
HAVE_NAME|. With a RefPtr<>, this requires nulling out
mInterface. Fortunately, in most cases where it moves from rooting to
non-rooting, it already does this. The one case it does not is in
SystemIsBeingShutDown(), so my patch adds that.

2. XPCNativeSet. This holds an array of interfaces in a weird
placement new array at the end of the object. I wasn't sure how a
non-POD class would interact with the way the array is handled with
casting, so I manually AddRef and Release things put into or removed
from the array.

3. AutoMarkingNativeInterfacePtr simply becomes RefPtr<>. This is the
bulk of the patch, in terms of number of lines changed.

4. Similarly, the one AutoMarkingNativeInterfacePtrArrayPtr becomes
nsTArray<RefPtr<>>. This is the last use of the auto marking array
class, so I deleted it.

Here are some other notes on what the patch does:

- XPCNativeInterfaces are created with placement new. This requires a
special version of refcounting that calls DestroyInstance, defined in
the previous patch. The GetNewOrUsed methods used to explicitly call
DestroyInstance(), but with refcounting this is no longer needed.

- The Mark() etc. methods are gutted so they don't do anything and
mMarked is removed because it is no longer used. The methods will be
cleaned up in later patches in this bug.

- Interfaces are removed from mIID2NativeInterfaceMap in the dtor
instead of during sweeping, requiring an extra hash table lookup.

- All of the methods that can create a new interface (NewInstance,
GetISupports, GetNewOrUsed) now return an already_AddRefed<>, which
gives some static checking that we don't accidentally fail to hold
onto a newly created interface.

MozReview-Commit-ID: CrlH1ENAzvr
2016-08-23 05:59:57 -07:00
Andrew McCreight
e410eeed77 Bug 1288870, part 3 - Root the return value of the prewrap callback. r=mrbkap,terrence
Like part 2, this patch is to work around a false GC hazard in
~XPCNativeInterface in part 4. This hazard is around the return value
of WrapperFactory::PrepareForWrapping(), because ~XPCCallContext might
call ~XPCNativeInterface. The fix is to pass the return value into a
mutable handle. Unfortunately, this function is used in the JSAPI, so
JS minor engine changes are also needed.

MozReview-Commit-ID: GwFxmrXFXmb
2016-08-23 05:59:57 -07:00
Andrew McCreight
f487fbbfce Bug 1288870, part 2 - Handlify the argument to XPCNativeSet::FindMember(). r=mrbkap
This is to work around false GC hazards in ~XPCNativeInterface in part
4 of this bug. Putting RefPtr<XPCNativeInterface> on the stack means
that ~XPCNativeInterface can get called in various places, and the GC
hazard analysis does not understand the virtual methods involved, so
it assumes they might possibly GC.

This fixes one hazard by taking a jsid handle argument. The callers
already pass in handles, so no other changes are needed.

MozReview-Commit-ID: LpNpTlujpkm
2016-08-23 05:59:56 -07:00
Wes Kocher
b38dbd1378 Backed out 2 changesets (bug 1279086) for causing painting issues a=backout
Backed out changeset b1c893387fdd (bug 1279086)
Backed out changeset 277c54118c8a (bug 1279086)
2016-08-22 16:00:34 -07:00
Jon Coppeard
af074367fe Bug 1296715 - Fix android bustage r=me a=merge
--HG--
extra : source : 21efe1ace6eb4b64e3cd15fef9782a87f799fe34
2016-08-22 12:41:06 +01:00
Jon Coppeard
9f4800de7a Bug 1296715 - Add line-based profiling output for major GC r=terrence 2016-08-22 11:14:24 +01:00
Jon Coppeard
956dd02162 Bug 1295991 - Don't give FreeOp a runtime pointer if it's used off the main thread r=sfink 2016-08-22 11:14:24 +01:00
Jon Coppeard
187d91a66e Bug 1296639 - Remove SpiderMonkey's periodic full GC r=sfink 2016-08-22 11:14:24 +01:00
Jan de Mooij
d8047f2b2f Bug 1295967 - Share Shapes and BaseShapes across compartments. r=jonco,fitzgen,njn 2016-08-23 11:25:54 +02:00
Steve Fink
2042159803 Backed out 5 changesets (bug 1296878, bug 1296876, bug 1296875) for compilation failures, a=CLOSED TREE
Backed out changeset e000f50cb73d
Backed out changeset 05f3d17beffe (bug 1296878)
Backed out changeset cfbac36772eb (bug 1296878)
Backed out changeset 3fe209e9ca79 (bug 1296878, bug 1296876)
Backed out changeset 8b45dd84cc08 (bug 1296878, bug 1296876, bug 1296875)

--HG--
extra : amend_source : 53a3a3c116844c8ab035c7c85de15abedfc128af
2016-08-22 15:37:06 -07:00
Steve Fink
898aa04e50 No bug. Fix compilation failure. a=CLOSED TREE
--HG--
extra : amend_source : 945ed7cd38c5b7e3bd6f9081966840d9296d8412
2016-08-22 15:30:12 -07:00
Steve Fink
f320639a55 Bug 1296878 - TraceLogger: report thread name when available, r=h4writer
--HG--
extra : rebase_source : 9331a4b69cd773c9bfbd100461ee977d89a11d95
2016-08-20 11:56:19 -07:00
Steve Fink
843bd9aad4 Bug 1296878 - Implement js::ThisThread::GetName for limited set of platforms, r=fitzgen
--HG--
extra : rebase_source : 43c3a5efd7e73e7b32728a58648f8606463b0147
2016-08-20 11:55:37 -07:00
Steve Fink
6d99bf51ce Bug 1296876 - TraceLogger: write files to $TLDIR, r=h4writer
--HG--
extra : rebase_source : faaa83213fbf972a695a5a26ecc4c65a351210fb
2016-08-20 11:56:01 -07:00
Steve Fink
4518b4b69c Bug 1296875 - Minor TraceLogger cleanups, comments, refactoring; r=h4writer
--HG--
extra : rebase_source : 68d175b552626f61516e0e443dd75f999335554c
2016-08-18 13:10:07 -07:00
Morgan Phillips
ffd6e78083 Bug 1296846 - Backout bad Unicode changes 2/2; r=efaust 2016-08-20 04:04:40 -07:00
Morgan Phillips
e8d173feb0 Bug 1296846 - Backout bad Unicode changes 1/2; r=efaust 2016-08-20 04:03:51 -07:00
Eric Faust
8c5b1eddc8 Bug 1287340 - Part 3: Properly forward new.target in bound function subclassing. (r=till) 2016-08-22 09:56:37 -07:00
Eric Faust
442bd1050b Bug 1287340 - Part 2: Improve new.target jit performance. (r=h4writer) 2016-08-22 09:56:35 -07:00
Eric Faust
538b483b3c Bug 1287340 - Part 1: Implement constructContentFunction for self-hosted code. (r=till) 2016-08-22 09:56:33 -07:00
Nick Fitzgerald
5dc6200d46 Bug 1295741 - jslock.h is dead, long live jsnspr.h; r=terrence
This commit makes the following changes:

* Removed unnecessary includes of jslock.h from files that are using
  js/src/thread/* primitives now.

* Removed includes of prcvar.h, prlock.h, and prthread.h in jslock.h.

* Renamed jslock.h to jsnspr.h since its only remaining utility is to either
  wrap the few NSPR headers we still use, or alternatively include the
  vm/PosixNSPR.h shim instead if JS_POSIX_NSPR is defined.

--HG--
rename : js/src/jslock.h => js/src/jsnspr.h
2016-08-22 10:15:53 -07:00
Nick Fitzgerald
e3a0952fa0 Bug 1295740 - Print the test thread's bit instead of PR_GetCurrentThread() in testThreadingExclusiveData.cpp; r=terrence 2016-08-22 10:15:53 -07:00
Nick Fitzgerald
3db551e975 Bug 1295739 - Make JSRuntime::ownerThread_ a js::Thread::Id instead of void*; r=terrence 2016-08-22 10:15:53 -07:00
Nick Fitzgerald
40f60d4c9e Bug 1295738 - Remove the unused JSAPI function JS_GetCurrentThread; r=terrence 2016-08-22 10:15:53 -07:00
Nick Fitzgerald
012adba4db Bug 1275749 - Part 1: Remove the DEBUG-only js::FutexRuntime::lockHolder_ member, since we already get those checks by using js::Mutex; r=terrence 2016-08-22 10:15:53 -07:00
Nick Fitzgerald
811426746c Bug 1275749 - Part 0: Use js::Mutex and js::ConditionVariable instead of PRLock and PRCondVar in js::FutexRuntime; r=lth 2016-08-22 10:15:53 -07:00
Jon Coppeard
89ae3db372 Bug 1293239 - Fix error when reverting nursery resize heuristic change r=terrence 2016-08-22 17:43:14 +01:00
Kan-Ru Chen
b4cf4bec61 Bug 1264642 - Part 6. Mark JSStructuredCloneData as MOZ_NON_MEMMOVABLE and add specializations in nsTArray.h. r=froydnj
MozReview-Commit-ID: HltgzBnxMsn
2016-08-23 00:40:47 +08:00
Kan-Ru Chen
506dfe6ea3 Bug 1264642 - Part 4. Use BufferList to replace raw buffers in StructuredClone. r=baku r=billm r=jorendorff
In JS StructuredClone BufferList<SystemAllocPolicy> is typedef'd to
JSStructuredCloneData and use everywhere in gecko that stores structured
clone data.

This patch changed some raw pointers to UniquePtr<JSStructuredCloneData>
and some to stack allocated JSStructuredCloneData for better life time
management. Some parameters or methods are deleted because of changing
to the new data structure.

MessagePortMessage now has the exactly same structure with
ClonedMessageData. Maybe in the future they can be consolidated.

MozReview-Commit-ID: 1IY9p5eKLgv
2016-08-23 00:40:46 +08:00
Eddy Bruel
ee92cf5d9d Bug 1294013 - Remove callHook from handleUncaughtException(Helper). r=jimb 2016-08-22 16:03:32 +02:00
Eddy Bruel
6894301270 Bug 1294013 - Factor out reportUncaughtException. r=jimb 2016-08-22 16:01:38 +02:00
Eddy Bruel
1b409bc7be Bug 1294013 - Rename parseResumptionValue to processHandlerResult. r=jimb 2016-08-22 15:54:32 +02:00
Eddy Bruel
7b55a7b52d Bug 1294013 - Replace JSTrapStatus* with JSTrapStatus&. r=jimb 2016-08-22 15:52:28 +02:00
Jon Coppeard
e3e08ba4b2 Bug 1296715 - Fix android bustage r=me 2016-08-22 12:41:06 +01:00
Heiher
b4e4ac2868 Bug 1294606 - Part 3: Add tests for SignExtend. r=nbp
---
 .../jit-test/tests/ion/dce-with-rinstructions.js   | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)
2016-08-21 22:16:11 +08:00
Heiher
7a337d2603 Bug 1294606 - Part 2: Folds Lsh/Rsh same bits to SignExntend. r=nbp
---
 js/src/jit/CodeGenerator.cpp                       | 16 +++++++++
 js/src/jit/CodeGenerator.h                         |  1 +
 js/src/jit/Lowering.cpp                            | 13 ++++++++
 js/src/jit/Lowering.h                              |  1 +
 js/src/jit/MIR.cpp                                 | 27 +++++++++++++++
 js/src/jit/MIR.h                                   | 39 ++++++++++++++++++++++
 js/src/jit/MOpcodes.h                              |  1 +
 js/src/jit/MacroAssembler.h                        |  3 ++
 js/src/jit/Recover.cpp                             | 37 ++++++++++++++++++++
 js/src/jit/Recover.h                               | 12 +++++++
 js/src/jit/arm/MacroAssembler-arm-inl.h            | 12 +++++++
 js/src/jit/arm64/MacroAssembler-arm64-inl.h        | 12 +++++++
 .../mips-shared/MacroAssembler-mips-shared-inl.h   | 12 +++++++
 js/src/jit/shared/LIR-shared.h                     | 16 +++++++++
 js/src/jit/shared/LOpcodes-shared.h                |  1 +
 .../jit/x86-shared/MacroAssembler-x86-shared-inl.h | 12 +++++++
 js/src/vm/Interpreter-inl.h                        | 11 ++++++
 17 files changed, 226 insertions(+)
2016-08-21 22:16:10 +08:00
Heiher
246b59f85c Bug 1294606 - Part 1: Implement LIRGenerator::useByteOpRegisterAtStart. r=nbp
---
 js/src/jit/arm/Lowering-arm.cpp                 | 6 ++++++
 js/src/jit/arm/Lowering-arm.h                   | 1 +
 js/src/jit/arm64/Lowering-arm64.cpp             | 6 ++++++
 js/src/jit/arm64/Lowering-arm64.h               | 1 +
 js/src/jit/mips-shared/Lowering-mips-shared.cpp | 6 ++++++
 js/src/jit/mips-shared/Lowering-mips-shared.h   | 1 +
 js/src/jit/none/Lowering-none.h                 | 1 +
 js/src/jit/x64/Lowering-x64.cpp                 | 6 ++++++
 js/src/jit/x64/Lowering-x64.h                   | 1 +
 js/src/jit/x86/Lowering-x86.cpp                 | 6 ++++++
 js/src/jit/x86/Lowering-x86.h                   | 1 +
 11 files changed, 36 insertions(+)
2016-08-21 22:16:09 +08:00
Sebastian Hengst
55ccc927a5 Backed out changeset 325bdb8f8f80 (bug 1110928) 2016-08-21 12:27:51 +02:00
Andrew McCreight
0e61ad42e5 Bug 1110928, part 3 - Add a method to schedule the system zone for GC. r=terrence
MozReview-Commit-ID: 4L3iQMPWGNe
2016-08-19 15:26:56 -07:00
Bill McCloskey
3a7ee5574b Bug 1279086 - Allow painting for tab switch when JS is running (r=dvander,mconley,mrbkap) 2016-08-19 14:41:26 -07:00
Bill McCloskey
1613c2cbc9 Bug 1279086 - Allow multiple interrupt callbacks (r=dvander) 2016-08-19 14:40:52 -07:00
Luke Wagner
0e064004db Bug 1283924 - Baldr: handle cross-global typed arrays in JS API (r=till)
MozReview-Commit-ID: BzAG4h9o7ua

--HG--
extra : rebase_source : 288bec0533f4601c6bae12c6c09fe0520cc84848
2016-08-19 13:41:52 -05:00
Wes Kocher
3a31be9c17 Backed out 2 changesets (bug 1279086) for failures in browser_menu_item_01.js a=backout
Backed out changeset 00bb53b58e96 (bug 1279086)
Backed out changeset cff59fe2b933 (bug 1279086)
2016-08-19 12:31:55 -07:00
Tooru Fujisawa
5f9bd4abac Bug 1289051 - Add JS_ReportError*Latin1 variants. r=evilpie 2016-08-13 23:03:31 +09:00
Chris Manchester
76d8f148d9 Backed out changeset c0e6aae0b93d (bug 1294803) for breaking artifact builds.
MozReview-Commit-ID: BTrQMCJSCRn
2016-08-19 11:12:07 -07:00
Chris Manchester
65ba8ff0f6 Backed out changeset 7f6047b2bc09 (bug 1294803) for breaking artifact builds.
MozReview-Commit-ID: FdzqUJnaSQT
2016-08-19 11:12:07 -07:00
Terrence Cole
240896825f Bug 1290551 - Part 2: Assert that finishRoots actually unroots everything; r=jonco
--HG--
extra : rebase_source : 322bbaf46bb1dc1b14bef0a939a07702f478c01c
2016-08-05 14:13:35 -07:00
Terrence Cole
3ab082dab8 Bug 1290551 - Part 1: Move finishRoots adjacent to traceRoots; r=jonco
--HG--
extra : rebase_source : d67b41ec9318b36502e0c07c11faf65619c24c6a
2016-08-05 14:13:32 -07:00
Jon Coppeard
509ffe40c1 Bug 1293127 - Fix testcode to handle zeal builds r=me 2016-08-19 18:04:47 +01:00
Bill McCloskey
3799faa926 Bug 1279086 - Allow painting for tab switch when JS is running (r=dvander,mconley,mrbkap) 2016-08-19 09:59:40 -07:00
Bill McCloskey
95c5d71549 Bug 1279086 - Allow multiple interrupt callbacks (r=dvander) 2016-08-19 09:59:39 -07:00
Jon Coppeard
a4026dfbb4 Bug 1293127 - Mark CCW keys that have nursery pointers explicitly rather than using the generic buffer r=terrence 2016-08-19 16:56:25 +01:00
Terrence Cole
73b768f849 Bug 1290550 - Fix markRuntime's interface; r=jonco 2016-07-28 09:42:17 -07:00
Jon Coppeard
35539866a9 Bug 1293239 - Revert nursery resizing heuristics r=terrence 2016-08-19 10:44:01 +01:00
Jon Coppeard
d170af87c1 Bug 1293209 - Don't assert tables are empty if the embedding leaked JS GC things r=terrence 2016-08-19 10:44:01 +01:00