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

Side by Side Diff: src/v8natives.js

Issue 273073: Remove special case for arguments.toString to match ES5 Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-124.js » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 %SetProperty($Boolean.prototype, "constructor", $Boolean, DONT_ENUM); 190 %SetProperty($Boolean.prototype, "constructor", $Boolean, DONT_ENUM);
191 191
192 // ---------------------------------------------------------------------------- 192 // ----------------------------------------------------------------------------
193 // Object 193 // Object
194 194
195 $Object.prototype.constructor = $Object; 195 $Object.prototype.constructor = $Object;
196 196
197 // ECMA-262 - 15.2.4.2 197 // ECMA-262 - 15.2.4.2
198 function ObjectToString() { 198 function ObjectToString() {
199 var c = %_ClassOf(this); 199 return "[object " + %_ClassOf(this) + "]";
200 // Hide Arguments from the outside.
201 if (c === 'Arguments') c = 'Object';
202 return "[object " + c + "]";
203 } 200 }
204 201
205 202
206 // ECMA-262 - 15.2.4.3 203 // ECMA-262 - 15.2.4.3
207 function ObjectToLocaleString() { 204 function ObjectToLocaleString() {
208 return this.toString(); 205 return this.toString();
209 } 206 }
210 207
211 208
212 // ECMA-262 - 15.2.4.4 209 // ECMA-262 - 15.2.4.4
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 570
574 // ---------------------------------------------------------------------------- 571 // ----------------------------------------------------------------------------
575 572
576 function SetupFunction() { 573 function SetupFunction() {
577 InstallFunctions($Function.prototype, DONT_ENUM, $Array( 574 InstallFunctions($Function.prototype, DONT_ENUM, $Array(
578 "toString", FunctionToString 575 "toString", FunctionToString
579 )); 576 ));
580 } 577 }
581 578
582 SetupFunction(); 579 SetupFunction();
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-124.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698