2602 Commits

Author SHA1 Message Date
szegedia%freemail.hu
eb7a88c324 Different Fix for Bug 519933 - only throw TypeError when FEATURE_STRICT_MODE is set
git-svn-id: svn://10.0.0.236/trunk@258763 18797224-902f-48f8-a5cc-f745e15eee43
2009-10-23 15:28:17 +00:00
szegedia%freemail.hu
f826462a7e Fix for Bug 519939 - Rhino JS debugger: allow to configure a "source provider"
git-svn-id: svn://10.0.0.236/trunk@258762 18797224-902f-48f8-a5cc-f745e15eee43
2009-10-23 12:49:59 +00:00
szegedia%freemail.hu
b080fd1c9d Fix for Bug 519933 - Add option to allow setting... read only properties
git-svn-id: svn://10.0.0.236/trunk@258760 18797224-902f-48f8-a5cc-f745e15eee43
2009-10-23 10:22:50 +00:00
szegedia%freemail.hu
7a7aba01a0 Fix for Bug 517861: Rhino's manifest file is incomplete. Couldn't add Specification-* entries, as it's not clear what their values should be.
git-svn-id: svn://10.0.0.236/trunk@258759 18797224-902f-48f8-a5cc-f745e15eee43
2009-10-23 09:49:59 +00:00
nboyd%atg.com
3fdcff8ad3 Fix Bug 508964 - Update Arguments object to match ES5 spec
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@258712 18797224-902f-48f8-a5cc-f745e15eee43
2009-10-18 02:34:50 +00:00
nboyd%atg.com
5484610de7 Fix Bug 508795 - Make Error.prototype.toString conform to spec
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@258710 18797224-902f-48f8-a5cc-f745e15eee43
2009-10-17 19:25:04 +00:00
nboyd%atg.com
fb13cf8973 Fix bug Bug 519692 - Failed to decompile expressions like "new Date()"
Patch from Marc Guillemot.


git-svn-id: svn://10.0.0.236/trunk@258649 18797224-902f-48f8-a5cc-f745e15eee43
2009-10-09 17:27:18 +00:00
hannes%helma.at
5d58422cc5 Fix copy/paste error in previous commit
git-svn-id: svn://10.0.0.236/trunk@258526 18797224-902f-48f8-a5cc-f745e15eee43
2009-09-29 15:05:45 +00:00
nboyd%atg.com
afd19dcdb6 Attach JSDoc to object literal keys when appropriate.
Patch from Nick Santos.


git-svn-id: svn://10.0.0.236/trunk@258461 18797224-902f-48f8-a5cc-f745e15eee43
2009-09-22 18:32:12 +00:00
hannes%helma.at
e4886269c7 Patch for bug 513369 - Provide annotation based mechanism to implement host objects with ScriptableObject.defineClass()
git-svn-id: svn://10.0.0.236/trunk@258430 18797224-902f-48f8-a5cc-f745e15eee43
2009-09-21 20:22:32 +00:00
nboyd%atg.com
c3e06c4072 More progress on strict mode.
git-svn-id: svn://10.0.0.236/trunk@258426 18797224-902f-48f8-a5cc-f745e15eee43
2009-09-21 13:32:36 +00:00
nboyd%atg.com
09a13e73f4 Beginning of strict mode implementation.
git-svn-id: svn://10.0.0.236/trunk@258382 18797224-902f-48f8-a5cc-f745e15eee43
2009-09-14 23:15:23 +00:00
nboyd%atg.com
344325e217 Fix javadoc comment.
git-svn-id: svn://10.0.0.236/trunk@258381 18797224-902f-48f8-a5cc-f745e15eee43
2009-09-14 22:20:34 +00:00
nboyd%atg.com
3aed9665db Fix bug 507069 - make function instances' prototype property non-enumerable
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@258380 18797224-902f-48f8-a5cc-f745e15eee43
2009-09-14 22:15:26 +00:00
nboyd%atg.com
7b7f9553b6 Fix regression in unit test.
Patch from Raphael Speyer.


git-svn-id: svn://10.0.0.236/trunk@258379 18797224-902f-48f8-a5cc-f745e15eee43
2009-09-14 22:11:51 +00:00
hannes%helma.at
7b6bb24dcc Yet another patch for bug 456546: Java method lookup fails for methods with Scriptable argument if argument is a subclass
git-svn-id: svn://10.0.0.236/trunk@258289 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-31 14:04:22 +00:00
nboyd%atg.com
e482b13286 Fix bug Bug 510443 - BOM should be treated as whitespace by the parser
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@258288 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-30 23:50:42 +00:00
hannes%helma.at
add3e9be89 Trim JSON source before parsing to fix bug 513549: Rhino's new JSON.parse breaks on trailing whitespace
git-svn-id: svn://10.0.0.236/trunk@258287 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-30 10:37:06 +00:00
nboyd%atg.com
340e664220 Fix Bug 508185 - Make indirect calls to eval legal, but use the global scope
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@258286 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-30 02:05:50 +00:00
nboyd%atg.com
06df422ae5 Fix Bug 506910 - make NaN, Infitinity and undefined non-writable, non-enumerable and non-configurable
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@258285 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-30 01:41:26 +00:00
nboyd%atg.com
1d740c5068 Fix Bug 508771 - Date.parse should attempt to parse string as toISOString format first
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@258122 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-15 21:53:30 +00:00
nboyd%atg.com
75306af5a5 Fix Bug 508527 - missing array elements contribute to the length of the array
Patch by Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@258121 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-15 21:34:52 +00:00
szegedia%freemail.hu
17d924065d Fix for Bug 510504 "delete foo.prop should not walk the property chain to find prop"
git-svn-id: svn://10.0.0.236/trunk@258113 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-14 15:15:00 +00:00
hannes%helma.at
6e93bd7e24 Patch from Raphael Speyer to add \b as a valid escape character in JSON strings
git-svn-id: svn://10.0.0.236/trunk@258112 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-14 08:25:29 +00:00
hannes%helma.at
ffa3a4ae9b Patch for bug 509678: Performance improvement for built-in JSON parser
git-svn-id: svn://10.0.0.236/trunk@258067 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-12 09:27:25 +00:00
nboyd%atg.com
08cad95296 Fix bug 508547 - delete statements should evaluate functions before attempting to delete the result
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@258026 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-09 13:52:48 +00:00
nboyd%atg.com
27b9544d78 Make Object.defineProperty work for builtin properties such as Math.pow, or JSON.stringify
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@258024 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-09 02:57:40 +00:00
nboyd%atg.com
eea8cc1e97 Made getOwnPropertDescriptor use the actual attributes for builtins, rather
than the isMethod heuristic.

Patch from Raphael Speyer.


git-svn-id: svn://10.0.0.236/trunk@258016 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-08 20:56:57 +00:00
nboyd%atg.com
6d18c3d6df For getters and setters of accessor propeties, make being absent equivalent
to having value undefined

As per 8.6.1 Table 3.

Patch from Raphael Speyer.


git-svn-id: svn://10.0.0.236/trunk@257969 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-07 14:04:34 +00:00
nboyd%atg.com
33a9f4cdcf Fix Bug 506940 - Correct arity of array methods
Patch from Raphel Speyer


git-svn-id: svn://10.0.0.236/trunk@257923 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-03 02:16:33 +00:00
nboyd%atg.com
16a73576ee See bug 489329 #52:
Make defineProperty throw a TypeError when attributes is both data and accessor descriptor.  As per 8.10.5 step 9 of the spec.
Patch from Raphel Speyer.


git-svn-id: svn://10.0.0.236/trunk@257920 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-02 01:40:42 +00:00
nboyd%atg.com
29d9a51d58 Fix Bug 507104 - Make RegExp.prototype.constructor non-enumerable
ES5Conform tests expect RegExp.prototype.constructor to have descriptor
{writable:true, enumerable:false, configurable:true}
Patch from Raphel Speyer


git-svn-id: svn://10.0.0.236/trunk@257919 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-02 01:37:59 +00:00
nboyd%atg.com
c7b17a31cf See comment #4 from bug 456389:
reduce and reduceRight throw a TypeError when array empty and no initVal
As per 15.4.4.21 step 5, and 15.4.4.22 step 5 of the spec.
Patch from Raphael Speyer.


git-svn-id: svn://10.0.0.236/trunk@257918 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-02 01:36:01 +00:00
nboyd%atg.com
d2f8df3446 Fix Bug 506859 - Add name and constructor properties to each of the Error constructors
Patch from Raphel Speyer


git-svn-id: svn://10.0.0.236/trunk@257821 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-28 12:41:36 +00:00
nboyd%atg.com
5146e4334f Set the prototype of bound functions to Function.prototype
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@257820 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-28 12:22:17 +00:00
nboyd%atg.com
929d1b5bcd Fix Bug 506436 - Implement Function.bind
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@257816 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-28 02:49:17 +00:00
nboyd%atg.com
1d48eb38a0 Allow getOwnPropertyDescriptor to be called for objects with no scope, e.g. functions returned from Function.bind
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@257814 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-28 02:22:39 +00:00
nboyd%atg.com
81c1d523fc corrected the descriptor properties of built-ins
See https://bugzilla.mozilla.org/show_bug.cgi?id=489329#c49


git-svn-id: svn://10.0.0.236/trunk@257813 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-28 01:59:41 +00:00
nboyd%atg.com
2834b2b86d Ensure that getters/setters defined through defineProperty are actually used
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@257805 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-27 14:59:56 +00:00
nboyd%atg.com
f4d3d29393 Fix Bug 505524 - Implement Date.toJSON
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@257801 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-27 02:04:23 +00:00
nboyd%atg.com
5aa3abe357 Fix Bug 505463 - Implement Date.toISOString
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@257798 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-26 02:35:38 +00:00
inonit%inonit.com
b1e0e1750f Allow user to specify JUnit URL to use; allow testsrc compile task to be executed without lib/ directory existing or without JUnit being already downloaded
git-svn-id: svn://10.0.0.236/trunk@257797 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-25 15:12:13 +00:00
nboyd%atg.com
0c8a93379b Fix Bug 505890 - Implement String.trim
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@257796 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-25 12:29:03 +00:00
nboyd%atg.com
3731d530df Remove unused variable.
git-svn-id: svn://10.0.0.236/trunk@257790 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-24 13:58:30 +00:00
nboyd%atg.com
2f4c9e82e4 Remove unused imports.
git-svn-id: svn://10.0.0.236/trunk@257789 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-24 13:57:40 +00:00
nboyd%atg.com
cdfa99a296 Fix Bug 505862 - Implement Array.isArray
Patch from Raphael Speyer


git-svn-id: svn://10.0.0.236/trunk@257784 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-24 01:26:14 +00:00
nboyd%atg.com
28a9737eea Patch from Robert Bowdidge:
Improve position accuracy in Rhino parser.

These changes continue to improve position accuracy in the
older Node parse tree nodes, primarily for expressions.  The
changes do the following:

* Set the line number of infix operations to the line where
the operator appears, not where the overall expression begins.

* Fix memberExprTail to mark function calls on the line where
the left paren enclosing the expressions appears, rather than
where the name appears.

* Ensure that position information is gathered for
objectLiteral property lists, and that the key and value both
get accurate line information.

* Mark all string literal nodes with the line where the string appears.

These changes should help anyone reporting error messages
based on the lineno field of a Node or doing any other
position-sensitive operations with nodes.

Background:

Before the 11/2008 submission of the new AstNode parse tree,
line numbers were recorded only for statements, not for
expressions.  Steve Yegge's new changes added line number
information for many nodes, and also added more precise
information to the new ASTnodes based on absolute offset in the
text stream.

One drawback of the line number information for plain Nodes is
that it follows the AstNode's convention of having the
position mark the start of the expression.  This matches the
behavior of positions in AstNode where intermediate points of
interest (the operator in an infix binary expression, or the
parentheses in a function call) are also remembered as offsets from
the beginning of the overall expression.

However, this causes problems for anyone using the older Node parse
tree because naive code generating errors or source mappings
only have access to the stored line number, and might point at code
multiple lines away from the actual source of the problem.  An
error in a multi-line condition would point to the beginning
of the condition, or a caller trying to show the location of a
function call would point at the beginning of the name
representing the function, even if that name were a few lines
away.  We see a bunch of these multi-line expressions in our
own source code, and an unchanged Rhino would direct programmers
at the wrong line for the error.

Following the convention that the line number always
represents the line of the most representative "token" not
only helps understanding, but gives better information.  We
can still find the entire range of the expression by looking
at the lines of all sub-expressions, and we can find the line
and column of an arbitrary interesting Node quickly by
assuming the line number is correct, then looking at the file
at the absolute position given by the AstNode, and searching
backwards in the text for a carriage return.

I searched a bit in the Rhino sources for clients of getLineno()
who might be affected by these changes, and didn't see any obvious
cases where these changes might cause problems.


git-svn-id: svn://10.0.0.236/trunk@257776 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-23 12:04:14 +00:00
nboyd%atg.com
5c0eb81bd7 Fix javadoc.
git-svn-id: svn://10.0.0.236/trunk@257764 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-22 14:01:07 +00:00
nboyd%atg.com
9a43759f3c Don't depend on Locale.ROOT, which requires JDK 1.6.
git-svn-id: svn://10.0.0.236/trunk@257763 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-22 12:31:57 +00:00
nboyd%atg.com
d2c1b16b8b Remove unused imports.
git-svn-id: svn://10.0.0.236/trunk@257762 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-22 12:18:05 +00:00