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

Side by Side Diff: src/v8natives.js

Issue 177683002: Mode clean-up pt 1: rename classic/non-strict mode to sloppy mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 return obj; 1275 return obj;
1276 } 1276 }
1277 1277
1278 1278
1279 // ES5 section 15.2.3.9. 1279 // ES5 section 15.2.3.9.
1280 function ObjectFreeze(obj) { 1280 function ObjectFreeze(obj) {
1281 if (!IS_SPEC_OBJECT(obj)) { 1281 if (!IS_SPEC_OBJECT(obj)) {
1282 throw MakeTypeError("called_on_non_object", ["Object.freeze"]); 1282 throw MakeTypeError("called_on_non_object", ["Object.freeze"]);
1283 } 1283 }
1284 var isProxy = %IsJSProxy(obj); 1284 var isProxy = %IsJSProxy(obj);
1285 if (isProxy || %HasNonStrictArgumentsElements(obj) || %IsObserved(obj)) { 1285 if (isProxy || %HasSloppyArgumentsElements(obj) || %IsObserved(obj)) {
1286 if (isProxy) { 1286 if (isProxy) {
1287 ProxyFix(obj); 1287 ProxyFix(obj);
1288 } 1288 }
1289 var names = ObjectGetOwnPropertyNames(obj); 1289 var names = ObjectGetOwnPropertyNames(obj);
1290 for (var i = 0; i < names.length; i++) { 1290 for (var i = 0; i < names.length; i++) {
1291 var name = names[i]; 1291 var name = names[i];
1292 var desc = GetOwnProperty(obj, name); 1292 var desc = GetOwnProperty(obj, name);
1293 if (desc.isWritable() || desc.isConfigurable()) { 1293 if (desc.isWritable() || desc.isConfigurable()) {
1294 if (IsDataDescriptor(desc)) desc.setWritable(false); 1294 if (IsDataDescriptor(desc)) desc.setWritable(false);
1295 desc.setConfigurable(false); 1295 desc.setConfigurable(false);
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 for (var i = 0; i < microtasks.length; i++) { 1913 for (var i = 0; i < microtasks.length; i++) {
1914 microtasks[i](); 1914 microtasks[i]();
1915 } 1915 }
1916 } 1916 }
1917 } 1917 }
1918 1918
1919 function EnqueueExternalMicrotask(fn) { 1919 function EnqueueExternalMicrotask(fn) {
1920 GetMicrotaskQueue().push(fn); 1920 GetMicrotaskQueue().push(fn);
1921 %SetMicrotaskPending(true); 1921 %SetMicrotaskPending(true);
1922 } 1922 }
OLDNEW
« src/preparser.h ('K') | « src/scopes.cc ('k') | src/variables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698