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

Side by Side Diff: src/v8natives.js

Issue 7811015: Change global const handling to silently ignore redeclarations (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix assertion failure Created 9 years, 3 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 | « src/runtime.cc ('k') | test/cctest/test-decls.cc » ('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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 return %_CallFunction(receiver, f); 186 return %_CallFunction(receiver, f);
187 } 187 }
188 188
189 189
190 // ---------------------------------------------------------------------------- 190 // ----------------------------------------------------------------------------
191 191
192 // Set up global object. 192 // Set up global object.
193 function SetUpGlobal() { 193 function SetUpGlobal() {
194 %CheckIsBootstrapping(); 194 %CheckIsBootstrapping();
195 // ECMA 262 - 15.1.1.1. 195 // ECMA 262 - 15.1.1.1.
196 %SetProperty(global, "NaN", $NaN, DONT_ENUM | DONT_DELETE); 196 %SetProperty(global, "NaN", $NaN, DONT_ENUM | DONT_DELETE | READ_ONLY);
197 197
198 // ECMA-262 - 15.1.1.2. 198 // ECMA-262 - 15.1.1.2.
199 %SetProperty(global, "Infinity", 1/0, DONT_ENUM | DONT_DELETE); 199 %SetProperty(global, "Infinity", 1/0, DONT_ENUM | DONT_DELETE | READ_ONLY);
200 200
201 // ECMA-262 - 15.1.1.3. 201 // ECMA-262 - 15.1.1.3.
202 %SetProperty(global, "undefined", void 0, DONT_ENUM | DONT_DELETE); 202 %SetProperty(global, "undefined", void 0,
203 DONT_ENUM | DONT_DELETE | READ_ONLY);
203 204
204 // Set up non-enumerable function on the global object. 205 // Set up non-enumerable function on the global object.
205 InstallFunctions(global, DONT_ENUM, $Array( 206 InstallFunctions(global, DONT_ENUM, $Array(
206 "isNaN", GlobalIsNaN, 207 "isNaN", GlobalIsNaN,
207 "isFinite", GlobalIsFinite, 208 "isFinite", GlobalIsFinite,
208 "parseInt", GlobalParseInt, 209 "parseInt", GlobalParseInt,
209 "parseFloat", GlobalParseFloat, 210 "parseFloat", GlobalParseFloat,
210 "eval", GlobalEval 211 "eval", GlobalEval
211 )); 212 ));
212 } 213 }
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 1553
1553 function SetUpFunction() { 1554 function SetUpFunction() {
1554 %CheckIsBootstrapping(); 1555 %CheckIsBootstrapping();
1555 InstallFunctions($Function.prototype, DONT_ENUM, $Array( 1556 InstallFunctions($Function.prototype, DONT_ENUM, $Array(
1556 "bind", FunctionBind, 1557 "bind", FunctionBind,
1557 "toString", FunctionToString 1558 "toString", FunctionToString
1558 )); 1559 ));
1559 } 1560 }
1560 1561
1561 SetUpFunction(); 1562 SetUpFunction();
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | test/cctest/test-decls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698