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

Side by Side Diff: src/date.js

Issue 7799027: Lock the prototype of internal classes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Final commit. 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/array.js ('k') | src/json.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 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 // Reset the date cache: 1041 // Reset the date cache:
1042 cache = Date_cache; 1042 cache = Date_cache;
1043 cache.time = $NaN; 1043 cache.time = $NaN;
1044 cache.year = $NaN; 1044 cache.year = $NaN;
1045 cache.string = null; 1045 cache.string = null;
1046 } 1046 }
1047 1047
1048 1048
1049 // ------------------------------------------------------------------- 1049 // -------------------------------------------------------------------
1050 1050
1051 function SetupDate() { 1051 function SetUpDate() {
1052 // Setup non-enumerable properties of the Date object itself. 1052 %CheckIsBootstrapping();
1053 // Set up non-enumerable properties of the Date object itself.
1053 InstallFunctions($Date, DONT_ENUM, $Array( 1054 InstallFunctions($Date, DONT_ENUM, $Array(
1054 "UTC", DateUTC, 1055 "UTC", DateUTC,
1055 "parse", DateParse, 1056 "parse", DateParse,
1056 "now", DateNow 1057 "now", DateNow
1057 )); 1058 ));
1058 1059
1059 // Setup non-enumerable constructor property of the Date prototype object. 1060 // Set up non-enumerable constructor property of the Date prototype object.
1060 %SetProperty($Date.prototype, "constructor", $Date, DONT_ENUM); 1061 %SetProperty($Date.prototype, "constructor", $Date, DONT_ENUM);
1061 1062
1062 // Setup non-enumerable functions of the Date prototype object and 1063 // Set up non-enumerable functions of the Date prototype object and
1063 // set their names. 1064 // set their names.
1064 InstallFunctionsOnHiddenPrototype($Date.prototype, DONT_ENUM, $Array( 1065 InstallFunctionsOnHiddenPrototype($Date.prototype, DONT_ENUM, $Array(
1065 "toString", DateToString, 1066 "toString", DateToString,
1066 "toDateString", DateToDateString, 1067 "toDateString", DateToDateString,
1067 "toTimeString", DateToTimeString, 1068 "toTimeString", DateToTimeString,
1068 "toLocaleString", DateToLocaleString, 1069 "toLocaleString", DateToLocaleString,
1069 "toLocaleDateString", DateToLocaleDateString, 1070 "toLocaleDateString", DateToLocaleDateString,
1070 "toLocaleTimeString", DateToLocaleTimeString, 1071 "toLocaleTimeString", DateToLocaleTimeString,
1071 "valueOf", DateValueOf, 1072 "valueOf", DateValueOf,
1072 "getTime", DateGetTime, 1073 "getTime", DateGetTime,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 "setUTCFullYear", DateSetUTCFullYear, 1105 "setUTCFullYear", DateSetUTCFullYear,
1105 "toGMTString", DateToGMTString, 1106 "toGMTString", DateToGMTString,
1106 "toUTCString", DateToUTCString, 1107 "toUTCString", DateToUTCString,
1107 "getYear", DateGetYear, 1108 "getYear", DateGetYear,
1108 "setYear", DateSetYear, 1109 "setYear", DateSetYear,
1109 "toISOString", DateToISOString, 1110 "toISOString", DateToISOString,
1110 "toJSON", DateToJSON 1111 "toJSON", DateToJSON
1111 )); 1112 ));
1112 } 1113 }
1113 1114
1114 SetupDate(); 1115 SetUpDate();
OLDNEW
« no previous file with comments | « src/array.js ('k') | src/json.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698