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

Side by Side Diff: src/v8natives.js

Issue 7457020: Revert "Make window.undefined, window.NaN, window.Infinitiy read-only (ES5 section 15.1.1)" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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-89490.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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 return %_CallFunction(receiver, f); 156 return %_CallFunction(receiver, f);
157 } 157 }
158 158
159 159
160 // ---------------------------------------------------------------------------- 160 // ----------------------------------------------------------------------------
161 161
162 162
163 function SetupGlobal() { 163 function SetupGlobal() {
164 // ECMA 262 - 15.1.1.1. 164 // ECMA 262 - 15.1.1.1.
165 %SetProperty(global, "NaN", $NaN, DONT_ENUM | DONT_DELETE | READ_ONLY); 165 %SetProperty(global, "NaN", $NaN, DONT_ENUM | DONT_DELETE);
166 166
167 // ECMA-262 - 15.1.1.2. 167 // ECMA-262 - 15.1.1.2.
168 %SetProperty(global, "Infinity", 1/0, DONT_ENUM | DONT_DELETE | READ_ONLY); 168 %SetProperty(global, "Infinity", 1/0, DONT_ENUM | DONT_DELETE);
169 169
170 // ECMA-262 - 15.1.1.3. 170 // ECMA-262 - 15.1.1.3.
171 %SetProperty(global, "undefined", void 0, 171 %SetProperty(global, "undefined", void 0, DONT_ENUM | DONT_DELETE);
172 DONT_ENUM | DONT_DELETE | READ_ONLY);
173 172
174 // Setup non-enumerable function on the global object. 173 // Setup non-enumerable function on the global object.
175 InstallFunctions(global, DONT_ENUM, $Array( 174 InstallFunctions(global, DONT_ENUM, $Array(
176 "isNaN", GlobalIsNaN, 175 "isNaN", GlobalIsNaN,
177 "isFinite", GlobalIsFinite, 176 "isFinite", GlobalIsFinite,
178 "parseInt", GlobalParseInt, 177 "parseInt", GlobalParseInt,
179 "parseFloat", GlobalParseFloat, 178 "parseFloat", GlobalParseFloat,
180 "eval", GlobalEval 179 "eval", GlobalEval
181 )); 180 ));
182 } 181 }
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1520 // ---------------------------------------------------------------------------- 1519 // ----------------------------------------------------------------------------
1521 1520
1522 function SetupFunction() { 1521 function SetupFunction() {
1523 InstallFunctions($Function.prototype, DONT_ENUM, $Array( 1522 InstallFunctions($Function.prototype, DONT_ENUM, $Array(
1524 "bind", FunctionBind, 1523 "bind", FunctionBind,
1525 "toString", FunctionToString 1524 "toString", FunctionToString
1526 )); 1525 ));
1527 } 1526 }
1528 1527
1529 SetupFunction(); 1528 SetupFunction();
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-89490.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698