Andreas Gal
b126dc33dd
Fix bug 635137 (r=luke, a=blocker).
2011-02-24 18:52:27 -08:00
Jim Blandy
de75b9fa19
Bug 537873: Add a 'strict' argument to C++ property setter functions. r=brendan
...
This changes the type of setters to JSStrictPropertyOp, which is just like
JSPropertyOp except that it takes a 'JSBool strict' argument. Most of the
patch is introducing distinct types and using the appropriate stubs.
The following are left for subsequent patches:
x Similar fixes to the browser outside SpiderMonkey.
x Actually *using* the newly available strictness information. This patch
should have no user-visible effect. I didn't want the interesting stuff
to get lost in this noise.
2011-02-09 11:31:40 -08:00
Jeff Walden
3de322ba70
Bug 629187 - Strict mode keywords are accepted as argument names and function name for strict mode functions. r=jimb
...
--HG--
extra : rebase_source : adce872db2d58e32a53995d757a85da50c8f63a4
2011-01-26 16:46:38 -08:00
Chris Leary
29a4e97a8f
Bug 617935: Check string lengths using StringBuffer. (r=lw)
2011-01-12 15:28:58 -08:00
Jeff Walden
430108f273
Back out 567f16dd81f3, an existing test is bad, and by appearances poisoning of Boolean.prototype, Number.prototype, and String.prototype will make it hard to quickly fix. r=the O in ROYGBIV
2011-01-11 16:29:09 -06:00
Jeff Walden
0b3ec174d4
Bug 557371 - Make JSON.stringify behavior on Boolean, String, and Number objects to-spec. r=jorendorff
...
--HG--
extra : rebase_source : f329e9274b79abd264cf254d6d95a1b97f466ab9
2010-12-31 11:41:23 -06:00
Luke Wagner
d8719356c0
Bug 609440, part 4 - make JSString::chars() fallible (r=waldo,dvander,igor,dwitte,njn)
2010-12-06 10:26:58 -08:00
Paul Biggar
d5a5d3946f
Bug 612292 - Rename array allocation functions (r=lw)
2010-12-13 16:22:59 -08:00
Jan de Mooij
96d0c8e0fa
Bug 612989 - Try to convert numbers being parsed to int32 in JSON.parse. r=sayrer,jwalden
2010-11-17 21:54:29 +01:00
Nicholas Nethercote
2f1f144989
Bug 599254 - Avoid an unnecessary switch in the JSON parser. r=sayrer.
2010-09-27 17:20:43 -07:00
Gregor Wagner
fdb731becb
Bug 558861 - Compartmental GC (r=gal)
2010-09-24 10:54:39 -07:00
Jim Blandy
ad83424ea2
Bug 594574: Change GetPropertyNames to take its out-parameter by address, not by non-const reference. r=brendan
2010-09-21 11:35:29 -07:00
Jim Blandy
2a3cf83056
Bug 537873, Bug 514574: Have strict mode code report TypeErrors for assignments, deletions. r=brendan
...
TODO: Fix error messages.
2010-09-15 13:43:55 -07:00
Nicholas Nethercote
837cae8aad
Bug 590834 - Clean up number-to-string code. r=jwalden.
2010-09-13 13:08:25 -07:00
Jeff Walden
04a95a7188
Bug 564621, bug 582077 - JSON.parse shouldn't allow {"a" : "b",} or [1,]. But, because Firefox's bookmarks "JSON" generation has historically generated invalid JSON (it no longer does, see bug 505656), preserve a "legacy" mode of parsing that can be used to load bookmarks.json files (at least until we no longer support migration from Firefox <4 profiles :-) ). r=sayrer
2010-07-14 13:48:36 -05:00
Nicholas Nethercote
5d51c58e3d
Fix typo in comment for patch in bug 578216. r=me.
2010-08-25 15:50:32 -07:00
Nicholas Nethercote
c5586f145a
Bug 578216 - Make eval(json-like string) fast. r=sayrer
2010-08-24 11:50:54 -04:00
Nicholas Nethercote
2ab58fd02d
Backed out changeset 74ce80e8782e
2010-08-23 22:38:19 -07:00
Nicholas Nethercote
7ba153876d
Bug 578216 - Make eval(json-like string) fast. r=sayrer.
2010-08-23 18:13:09 -07:00
Jeff Walden
a8738dbbb2
Bug 584909 - Properly handle JSON.stringify(_1, _2, numberGreaterThanOne). Also output a space between ':' and property value when serializing object properties, if the gap specified is non-empty. r=sayrer
...
--HG--
extra : rebase_source : b4868a4a96d1ac89f389b47c0258d68e74e590a9
2010-08-09 16:39:19 -07:00
Jeff Walden
8ccd9fbe20
Bug 584909 - Use AutoIdVector/GetPropertyNames rather than AutoIdArray/JS_Enumerate to avoid unnecessary work and use cleaner APIs. r=sayrer
...
--HG--
extra : rebase_source : a8711da0c9423f9754a5ca01a2b7b3a26365cc9c
2010-08-09 16:39:19 -07:00
Paul Biggar
6634b70997
Split object/function allocation paths to avoid branch (578158, r=brendan).
2010-08-09 09:11:22 -07:00
Robert Sayre
fdb70f359e
Change a comment to match the surrounding code.
2010-07-30 20:26:06 -07:00
Igor Bukanov
2019c722fb
bug 571789 - merging JSObjectOps and JSExtendedClass into JSClass. r=jorendorff
2010-06-12 18:29:04 +02:00
Igor Bukanov
181c2cdf3a
Backed out changeset 7b2b90efe57d -- the patch was landed against a tree with a lot of orange. This will hinder the orange resolution.
2010-07-28 14:36:06 +02:00
Igor Bukanov
a69fd0a49f
bug 571789 - merging JSObjectOps and JSExtendedClass into JSClass. r=jorendorff
2010-06-12 18:29:04 +02:00
Jeff Walden
151b088ab6
Bug 578273 - ES5: Properly detect cycles in JSON.stringify (throw TypeError, check for cycles rather than imprecisely rely on recursion limits). r=sayrer
...
--HG--
extra : rebase_source : ce0005b1b7a69b12f89ad33420ac543c4d09777b
2010-07-13 23:32:28 -05:00
Luke Wagner
99411cc93d
Bug 549143 - fatvals
2010-07-14 23:19:36 -07:00
Robert Sayre
1d56325898
Merge mozilla-central to tracemonkey.
2010-06-24 13:47:08 -07:00
Saint Wesonga
15c5e882f9
Bug 512447 - JSON.stringify does not correct handle replacer functions. r=sayrer
2010-06-24 13:32:07 -07:00
Brendan Eich
e672f52623
Eliminate JSClass::reserveSlots and streamline new-object paths (535416, r=gal).
2010-06-18 17:43:02 -07:00
Luke Wagner
f032df96b4
Bug 565157 - typed JS_AddRoot (r=igor)
2010-06-07 17:05:02 -07:00
Nicholas Nethercote
f0550e09e5
Bug 560167 - encapsulate XML-related JSSLOT_* values within JSObject (attempt 2; attempt 1 was backed out due to conflicts). r=brendan.
2010-05-12 18:57:36 -07:00
Robert Sayre
c55787e463
Merge tracemonkey to mozilla-central. a=1hr
2010-04-25 08:59:57 -04:00
Andreas Gal
92692442a2
optimize JSON stringify. bug 561592. r=dvander
2010-04-25 08:51:05 -04:00
Robert Sayre
27452b9484
Bug 560650 - TM: json code should use JS_Enumerate. r=gal
2010-04-24 14:18:10 -04:00
Andreas Gal
df7122d975
backing out clean up bug 560167 due to massive conflicts with the iterator patch
2010-04-23 20:49:06 -07:00
Nicholas Nethercote
a46ca032d4
Bug 560167 - encapsulate XML-related JSSLOT_* values within JSObject. r=brendan.
2010-04-22 16:37:41 -07:00
Nicholas Nethercote
4139494dcc
Bug 559250 - encapsulate JSSLOT_{PRIMITIVE,DATE,REGEXP}_* within JSObject (take 2). r=brendan.
2010-04-14 18:57:30 -07:00
Nicholas Nethercote
00c793c05f
Backed out changeset 681b0067e61b due to massive breakage
2010-04-14 17:09:17 -07:00
Nicholas Nethercote
e240c1f235
Bug 559250 - encapsulate JSSLOT_{PRIMITIVE,DATE,REGEXP}_* within JSObject. r=brendan.
2010-04-14 16:18:03 -07:00
Andreas Gal
a887d81302
Inline the object allocation path (558003, r=sayrer).
2010-04-10 16:16:35 -07:00
Robert Sayre
5690b40895
Update json.cpp comment. a=1hr
2010-04-24 19:05:48 -04:00
Robert Sayre
c08105c9c5
Bug 505228. JSON.stringify generates non standard output if space is defined. r=sayrer
2010-04-09 15:38:27 -04:00
Nicholas Nethercote
26d8277a75
Bug 413730 - Replace all OBJ_GET_CLASS() macro calls with JSObject::getClass() calls. r=gal.
2010-04-07 16:09:49 -07:00
Robert Sayre
fc4b9ec6e1
FF 3.5.2 native JSON.stringify replacer applied only to array items, not object properties. bug 509184. r=waldo
2010-04-07 12:35:43 -04:00
Robert Sayre
7666a5588b
Bug 554798: msvc warning in json.cpp. r=waldo
2010-04-01 16:54:03 -04:00
Robert Sayre
8f95952051
Bug 554152: Fix handling of space parameter match final spec. r=waldo
2010-04-01 16:22:49 -04:00
Robert Sayre
904cc3ed9d
Bug 554079: JSON.parse should reject control characters. r=waldo
2010-04-01 16:20:35 -04:00
Robert Sayre
842cbb7211
JSON stringify and parse have the wrong length. bug 554082. r=waldo
2010-04-01 16:19:45 -04:00