Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Side by Side Diff: test/mjsunit/strict-mode.js

Issue 2430383004: Remove the 'caller' property from the strict-mode arguments map (Closed)
Patch Set: Mark some test262 tests as FAIL Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/regress/regress-1387.js ('k') | test/test262/test262.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 })(); 1104 })();
1105 1105
1106 1106
1107 (function TestStrictArgumentPills() { 1107 (function TestStrictArgumentPills() {
1108 function strict() { 1108 function strict() {
1109 "use strict"; 1109 "use strict";
1110 return arguments; 1110 return arguments;
1111 } 1111 }
1112 1112
1113 var args = strict(); 1113 var args = strict();
1114 CheckArgumentsPillDescriptor(args, "caller"); 1114 assertEquals(undefined, Object.getOwnPropertyDescriptor(args, "caller"));
1115 CheckArgumentsPillDescriptor(args, "callee"); 1115 CheckArgumentsPillDescriptor(args, "callee");
1116 1116
1117 args = strict(17, "value", strict); 1117 args = strict(17, "value", strict);
1118 assertEquals(17, args[0]) 1118 assertEquals(17, args[0])
1119 assertEquals("value", args[1]) 1119 assertEquals("value", args[1])
1120 assertEquals(strict, args[2]); 1120 assertEquals(strict, args[2]);
1121 CheckArgumentsPillDescriptor(args, "caller"); 1121 assertEquals(undefined, Object.getOwnPropertyDescriptor(args, "caller"));
1122 CheckArgumentsPillDescriptor(args, "callee"); 1122 CheckArgumentsPillDescriptor(args, "callee");
1123 1123
1124 function outer() { 1124 function outer() {
1125 "use strict"; 1125 "use strict";
1126 function inner() { 1126 function inner() {
1127 return arguments; 1127 return arguments;
1128 } 1128 }
1129 return inner; 1129 return inner;
1130 } 1130 }
1131 1131
1132 var args = outer()(); 1132 var args = outer()();
1133 CheckArgumentsPillDescriptor(args, "caller"); 1133 assertEquals(undefined, Object.getOwnPropertyDescriptor(args, "caller"));
1134 CheckArgumentsPillDescriptor(args, "callee"); 1134 CheckArgumentsPillDescriptor(args, "callee");
1135 1135
1136 args = outer()(17, "value", strict); 1136 args = outer()(17, "value", strict);
1137 assertEquals(17, args[0]) 1137 assertEquals(17, args[0])
1138 assertEquals("value", args[1]) 1138 assertEquals("value", args[1])
1139 assertEquals(strict, args[2]); 1139 assertEquals(strict, args[2]);
1140 CheckArgumentsPillDescriptor(args, "caller"); 1140 assertEquals(undefined, Object.getOwnPropertyDescriptor(args, "caller"));
1141 CheckArgumentsPillDescriptor(args, "callee"); 1141 CheckArgumentsPillDescriptor(args, "callee");
1142 })(); 1142 })();
1143 1143
1144 1144
1145 (function TestNonStrictFunctionCallerPillSimple() { 1145 (function TestNonStrictFunctionCallerPillSimple() {
1146 function return_my_caller() { 1146 function return_my_caller() {
1147 return return_my_caller.caller; 1147 return return_my_caller.caller;
1148 } 1148 }
1149 1149
1150 function strict() { 1150 function strict() {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 assertSame(null, test(i)); 1222 assertSame(null, test(i));
1223 } 1223 }
1224 })(); 1224 })();
1225 1225
1226 1226
1227 (function TestStrictModeEval() { 1227 (function TestStrictModeEval() {
1228 "use strict"; 1228 "use strict";
1229 eval("var eval_local = 10;"); 1229 eval("var eval_local = 10;");
1230 assertThrows(function() { return eval_local; }, ReferenceError); 1230 assertThrows(function() { return eval_local; }, ReferenceError);
1231 })(); 1231 })();
OLDNEW
« no previous file with comments | « test/mjsunit/regress/regress-1387.js ('k') | test/test262/test262.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698