-
Bug
-
Resolution: Fixed
-
P4
-
8u60, 9
-
b81
-
x86
-
os_x
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8142258 | emb-9 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | team |
JDK-8140970 | 8u91 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | b01 |
JDK-8134812 | 8u72 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | b01 |
JDK-8147339 | emb-8u91 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | b01 |
FULL PRODUCT VERSION :
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Darwin c056.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
The following code incorrectly produces `4` in Nashorn (it should produce `2`):
(function(f){
return function(a1, a2, a3, a4){
return f.apply(this, arguments);
}
})
(function(){
return arguments.length;
})
(1, 2);
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Observe that the code provided in the description produces an incorrect result when run through Nashorn.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
2, the number of arguments with which the function is called.
ACTUAL -
4, the number of formal parameters of the function.
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Darwin c056.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
The following code incorrectly produces `4` in Nashorn (it should produce `2`):
(function(f){
return function(a1, a2, a3, a4){
return f.apply(this, arguments);
}
})
(function(){
return arguments.length;
})
(1, 2);
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Observe that the code provided in the description produces an incorrect result when run through Nashorn.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
2, the number of arguments with which the function is called.
ACTUAL -
4, the number of formal parameters of the function.
REPRODUCIBILITY :
This bug can be reproduced always.
- backported by
-
JDK-8134812 Function.prototype.apply interacts incorrectly with 'arguments'
-
- Resolved
-
-
JDK-8140970 Function.prototype.apply interacts incorrectly with 'arguments'
-
- Resolved
-
-
JDK-8142258 Function.prototype.apply interacts incorrectly with 'arguments'
-
- Resolved
-
-
JDK-8147339 Function.prototype.apply interacts incorrectly with 'arguments'
-
- Resolved
-