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

367461 Коммитов

Автор SHA1 Сообщение Дата
Jon Coppeard f946c37a6e Bug 1028358; r=terrence
--HG--
extra : rebase_source : 9a11ed18dc2a94ef2397eb61a24eb74d764f0df7
2014-06-23 12:36:54 -07:00
Terrence Cole 06bb27de7f Bug 1028358; r=jonco
--HG--
extra : rebase_source : 41cf1eaa104bf386c77777be906236d1d15a2622
2014-06-23 12:36:36 -07:00
Kartikaya Gupta edbfc0d3f6 Bug 1025507 - Adjust overscroll prefs based on UX feedback. r=milan 2014-06-23 15:33:18 -04:00
David Burns 9d779cfb83 Bug 1024642: Update layout tests to incorporate rebeccapurple as color in element properties; r=dbaron 2014-06-23 10:24:17 +01:00
David Burns 9d6b77b2b5 Bug 1024642: Add in rebeccapurple to color lists in gfx; r=dbaron 2014-06-23 10:24:17 +01:00
David Burns 7c74403f7c Bug 1024642: Update devtools source editor and test to add rebeccapurple; r=jwalker 2014-06-23 10:24:17 +01:00
David Burns faf23bff44 Bug 1024642: Remove extra white space from files, no functional changes; r=dbaron 2014-06-23 10:24:16 +01:00
David Burns 0c03caf3e9 bug 1024642: Add rebeccapurple to mochitest colors; r=jmaher 2014-06-23 10:24:08 +01:00
Jason Orendorff 33a5ebaee6 Bug 645416, part 29 - Implement Symbol.keyFor(). r=efaust.
--HG--
extra : rebase_source : 2494792929754ba1915f380c0384471c3d5cb8e0
2014-06-23 10:57:04 -05:00
Jason Orendorff 0c9e328dc6 Bug 645416, part 28 - Update Object.prototype.toSource for symbol-keyed properties. r=Waldo.
The new output uses syntax with square brackets: {[Symbol.for("key")]: "value"}
This syntax is not yet supported in SpiderMonkey, but it is part of ES6 (see
bug 924688 or search the ES6 drafts for ComputedPropertyName).

--HG--
extra : rebase_source : 6976a1025c268aaed3462d900b83fa6a33515e78
2014-06-23 10:57:03 -05:00
Jason Orendorff 3d134987af Bug 645416, part 27 - Implement Object.getOwnPropertySymbols(). r=Waldo.
--HG--
extra : rebase_source : 88b44837f0b845f88a881d4b472d3c9ef44bcbf0
2014-06-23 10:57:03 -05:00
Jason Orendorff 9a4a0f2647 Bug 645417, part 26 - Update jsid sorting for JS_MORE_DETERMINISTIC. r=luke.
Unfortunately, with symbols, the original goal of this code is apparently
impossible. For two unique symbols with the same description, short of doing
extra bookkeeping at run time, there's no ordering that's sure to be consistent
across runs. The new code orders all other symbols.

--HG--
extra : rebase_source : 0734906d046e577d4c7d65149ec688dd0b80e885
2014-06-23 10:57:03 -05:00
Jason Orendorff 0582d104f2 Bug 645416, part 25 - Add support for enumerating symbol-keyed properties. r=Waldo.
Object.keys, Object.getOwnPropertyNames, and for-in loops skip symbol-keyed
properties per spec, but Object.defineProperties sees them, and a future
Reflect.ownKeys API will need to be able to see them.

This patch changes the comments on JSITER_FOREACH and JSITER_KEYVALUE, but not
the behavior. The comments were just wrong.

--HG--
extra : rebase_source : f1ad99d416df8a8acef5598bef2cde4b72dcdb31
2014-06-23 10:57:03 -05:00
Jason Orendorff 04be8d105f Bug 645416, part 24 - Modify proxy tests to add testing for symbol-keyed properties. r=efaust.
This patch also updates legacy direct proxies to cope with symbols. Uniform
behavior seems like the easiest thing to carry forward.

--HG--
extra : rebase_source : 5e5251c942e879a4440d7c0524343cf6fc744c7e
2014-06-23 10:57:02 -05:00
Jason Orendorff d4ba9cc2c7 Bug 645416, part 23 - Implement ValueToId for symbols. This makes symbols work as property keys. r=efaust.
--HG--
extra : rebase_source : eec18157d90daf54afc300b81d351011e5b669d5
2014-06-23 10:57:02 -05:00
Jason Orendorff 76d9f6e407 Bug 645416, part 22 - Remove JSCompartment::wrapId. r=terrence.
This is unnecessary now that object jsids no longer exist. Both string and
symbol jsids point only to GC things in the atoms compartment, which are safe
to pass to any compartment without wrapping.

--HG--
extra : rebase_source : 82c21e8474df05b1bb42c14d872c981205bbe879
2014-06-23 10:57:02 -05:00
Jason Orendorff edb4532fbf Bug 645416, part 21 - Add symbol jsids (SYMBOL_TO_JSID), removing the legacy support for object jsids (OBJECT_TO_JSID). r=terrence,r=jimb,r=efaust.
With just this patch, there are not actually any symbol jsids flowing through
the system, just as there are not actually any object jsids. But a subsequent
patch (part 23) changes this.

This patch deletes some code in CTypes.cpp that is simply confused about how
element accesses work: Int64 and UInt64 objects were never actually converted
to object jsids, so the code being removed here was already dead code.

--HG--
extra : rebase_source : 86f421c6454344e76ce5219b7b1aed5c83b45f24
2014-06-23 10:56:52 -05:00
Jason Orendorff fa961606bb Bug 645416, part 20 - Add JS::Symbol::dump() method for debugging. r=efaust.
--HG--
extra : rebase_source : 2e2539f319593d51876ef39caa0c96800b6d605e
2014-06-23 10:56:52 -05:00
Jason Orendorff 22c648d33d Bug 645416, part 19 - Update assertDeepEq for symbols. r=till.
The contract of assertDeepEq(a, b) is that the assertion passes iff a and b
have the isomorphic heap graphs. Symbols, like objects, are treated as nodes in
this graph. So, for example, if a and b are distinct symbols, then [a, b] is
not deepEq to [b, b] because they have distinct graphs. There are three nodes
in [a, b]: the array, a, and b.  There are only two nodes in [b, b]: the array,
and b.

--HG--
extra : rebase_source : 9415559bab9f0ed132dd49d3790892b3209fa77b
2014-06-23 10:56:51 -05:00
Jason Orendorff d6d2b72b23 Bug 645416, part 18 - Update ValueToSource for symbols. r=sfink.
--HG--
extra : rebase_source : 8d3702bd625ba2126f691810e1ea2a7736fd77e7
2014-06-23 10:56:51 -05:00
Jason Orendorff de554c1ace Bug 645416, part 17 - Implement ToPrimitive on Symbol wrapper objects. r=sfink.
The spec defines this by way of a @@toPrimitive method. We fake it using a
JSClass::convert hook. (Once @@toPrimitive is implemented, convert hooks
can be removed entirely, but we need symbols first.)

--HG--
extra : rebase_source : c8c7ed3eead8bd79bb38b70f448ebb98c5b3d780
2014-06-23 10:56:51 -05:00
Jason Orendorff 172720b7fd Bug 645416, part 16 - Implement Symbol.prototype.valueOf. r=sfink.
--HG--
extra : rebase_source : 12dfad71e0933ccc3e553854f44bdf0f85eccf64
2014-06-23 10:56:51 -05:00
Jason Orendorff d05b2005e2 Bug 645417, part 15 - Tests for ToObject on symbols. r=sfink.
The test as-base-value.js is not testing symbols as property keys (which is
implemented in a later patch), but on the other side of the . operator: as
things that can have property accesses done to them, just like you can do
"name".length or (3.14).toString().

--HG--
extra : rebase_source : 3dac7660999bd021ec32c13985471e1608a29f64
2014-06-23 10:56:51 -05:00
Jason Orendorff 83ab6a2b1a Bug 645416, part 14 - Update ToString for symbols. r=sfink.
The change in jit-test/tests/symbol/toString.js is that we now check that an
exception is actually thrown. Until this patch, stringifying a symbol did not
throw. (The test was mainly checking that we did not assert in Ion.)

No changes in Ion. If a symbol is being stringified, it's ok to be in a slow
path because that is going to throw anyway.

--HG--
extra : rebase_source : 9cf314dafa7392a20fee9d3b5acc4ad7fc1c5229
2014-06-23 10:56:50 -05:00
Jason Orendorff d62667069d Bug 645416, part 13 - Update ToNumber for symbols. r=sfink.
Not terribly interesting; converting a symbol to a number always produces NaN.

--HG--
extra : rebase_source : ded251ef9e92d92483b5cc18cf16e2910084bbff
2014-06-23 10:56:50 -05:00
Jason Orendorff 0ae3ca17bf Bug 645416, part 12 - Update ToBoolean for symbols. r=sfink.
--HG--
extra : rebase_source : 24d444b77bbfdbc35e3f99c73e5b182e2ecad029
2014-06-23 10:56:50 -05:00
Jason Orendorff 8cd4301733 Bug 645416, part 11 - Update GDB pretty-printers for symbols. r=jimb.
--HG--
extra : rebase_source : ab2063ab6073b748069c6a8ad1cd34ab0d5e7d86
2014-06-23 10:56:50 -05:00
Jason Orendorff 2cb085b263 Bug 645417, part 10 - Well-known symbols. r=terrence,r=efaust.
At present there is only one, Symbol.iterator, and it is not hooked up to
anything (this happens in bug 918828). ES6 defines 8 well-known symbols. Each
one is attached to a feature, so we'll add the symbols as we add features.
Symbol.create will appear when @@create semantics are implemented.

--HG--
extra : rebase_source : aab40a7487708c8bbd23dcfbe935ece1903d75ff
2014-06-23 10:56:49 -05:00
Jason Orendorff c4c60bf082 Bug 645416, part 9 - Implement the symbol registry and Symbol.for(). r=terrence,r=efaust.
--HG--
extra : rebase_source : df06d065f70756dea63dfd8e9df56610ff46d393
2014-06-23 10:56:49 -05:00
Jason Orendorff 157c34e600 Bug 645416, part 8 - Support passing symbols across compartment boundaries. r=terrence.
Trivial. Since symbols are always allocated in the atoms compartment and all
compartments are allowed to have direct references to them, Compartment::wrap
on a symbol is a no-op.

--HG--
extra : rebase_source : 2f51ff0b3870885de8c6ef6a82efa7398e17d5e8
2014-06-23 10:56:49 -05:00
Jason Orendorff b158e0b883 Bug 645416, part 7 - Support symbols as Map keys. r=terrence.
--HG--
extra : rebase_source : 5e40fe2514e7eb9ca874b1c271ed4a4e11f9c2ff
2014-06-23 10:56:48 -05:00
Jason Orendorff 245965f7f0 Bug 645416, part 6 - JIT support for symbol values. r=jandem.
Symbols are not yet supported as property keys at this point in the stack. The
work here is to pass symbol pointers around in Ion JIT code unboxed.

The baseline compiler doesn't need much new code. A few kinds of ICs need to
know all the primitive types.

--HG--
extra : rebase_source : 3addcd18e913e5879b0ee3700ecf9660b14b1e05
2014-06-23 10:56:18 -05:00
Jason Orendorff db7aa8370b Bug 645416, part 5 - Add the Symbol constructor and Symbol wrapper objects. r=efaust.
This exposes a new primitive type to scripts for the first time since
JavaScript first shipped in Netscape 2, over 13 years ago.

The tests focus on identity, equality, and being able to pass a symbol around
as a value. Of course the point of symbols is that they can be property keys,
but that will have to wait for a later patch in this series.

--HG--
extra : rebase_source : c22cf4b774cca8e7c9f6c757079e054a6eb0f307
2014-06-23 10:55:52 -05:00
Jason Orendorff c755dc4354 Bug 645416, part 4 - Rename DefinePropertiesAndBrand -> DefinePropertiesAndFunctions. r=bhackett.
--HG--
extra : rebase_source : beadd475b66cb17c7fe6f74766a5d90767817cf0
2014-06-23 10:55:52 -05:00
Jason Orendorff 26bdfdcc2f Bug 645416, part 3 - Symbol layout and GC support for allocating them. r=terrence.
Layout: js/src/vm/Symbol.h defines the new class JS::Symbol. JS::Symbol is the
same size as JSString on all platforms, because the allocator does not support
smaller allocations.

Allocation: Since the purpose of symbols is to serve as property keys, they are
always allocated in the atoms compartment.

We take a lock when allocating. This could probably be replaced with a
main-thread-only assertion. However, if atom allocation is not already a
bottleneck, symbol allocation probably never will be.

Symbols are given their own finalize-class in the GC. This means we allocate a
page per zone for symbols, even though they are only ever allocated in the
atoms zone. Terrence thought this could be easily fixed later. It should be; we
never touch the page, but a 32-bit virtual address space does not just have
infinite pages to spare.

A jsapi-test exercises the new symbol allocation code. A few oddities in
jsapi-tests are fixed in passing.

Discussion after review led to some new assertions about minimum object size in
AllocateObject and AllocateNonObject.

--HG--
extra : rebase_source : 45abb651d3b1b493d77a5dd0eb554f96b058c63a
2014-06-23 10:55:51 -05:00
Jason Orendorff 64a2896773 Bug 645416, part 2 - Add support for symbols to JS::Value. r=luke.
The API for symbol Values is much like the API for strings.

The implementation behind all this is in a later patch. Here, a class
JS::Symbol is declared, but not defined anywhere yet.

The constants being deleted from js/public/Value.h probably haven't been used
since Tracemonkey days.

--HG--
extra : rebase_source : 5b2d0cc4d99223483e850ee80913eef3854c427c
2014-06-23 10:55:51 -05:00
Jason Orendorff cc9b00ab80 Bug 645416, part 1 - Add an enum for symbols to JSValueType. r=nbp.
JSVAL_TYPE_SYMBOL is inserted between STRING and NULL, rather than added at the
end, in order to preserve all the inequality relations on JSValueTypes used
throughout Value.h. (Search the header for the operators < > <= >=.)

Otherwise, this pretty much just works. Some details of Ion snapshot layout
had to change to accommodate 4-bit types.

--HG--
extra : rebase_source : e3141e6a9ee32ef563dab43a4942a9e67d234865
2014-06-23 10:55:51 -05:00
Benoit Jacob 7784d25921 Bug 1028420 - Non-unified build fails when using --enable-warnings-as-errors - bustage fix, no review 2014-06-23 14:49:09 -04:00
Benoit Jacob 6cbcf7b515 Bug 1028588 - Fix dangerous public destructors in uriloader - r=smaug 2014-06-23 14:49:09 -04:00
Benoit Jacob 5023541089 Bug 1028588 - Fix dangerous public destructors in docshell/ - r=smaug 2014-06-23 14:49:08 -04:00
Benoit Jacob 7c35ffa41a Bug 1028588 - Fix dangerous public destructors in dom/bindings - r=bz 2014-06-23 14:49:08 -04:00
Benoit Jacob 27fb6960a5 Bug 1028588 - Fix dangerous public destructors in js/xpconnect - r=bholley 2014-06-23 14:49:08 -04:00
Benoit Jacob 9a1a886bf7 Bug 1028588 - Fix dangerous public destructors in image/ - r=jrmuizel 2014-06-23 14:49:08 -04:00
Benoit Jacob 360bdb42d9 Bug 1028588 - Fix dangerous public destructors in gfx - r=jrmuizel 2014-06-23 14:49:07 -04:00
Kartikaya Gupta baf58c16c3 Back out bug 1021248 for causing bug 1028271. r=backout 2014-06-23 14:38:02 -04:00
Jeremy Poulin 8ca3668763 Bug 1028426 - Move check for unused speculative connections to where they are removed. r=hurley 2014-06-20 15:17:23 -07:00
Nick Fitzgerald 1ebd53e382 Bug 1027157 - Make warnings reported with JSEXN_NONE so that they don't appear as errors in the console. r=Waldo 2014-06-19 15:44:00 -04:00
Walter Litwinczyk 8da3a57ada Bug 1004376 - Remove reliance on legacy skia apis GETTOTALCLIP. r=gw280 2014-06-20 11:03:09 -07:00
Rishab Arora 02797d3a96 Bug 956525 - Replace 'Lower lower' in log messages with 'Lower layer'. r=abr 2014-01-20 07:38:00 -05:00
Honza Bambas d8b9a11e34 Bug 1023748 - Allow NTLMv1 over SSL/TLS by default, r=jduell 2014-06-23 19:43:40 +02:00