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

Unified Diff: src/v8natives.js

Issue 1347663002: [es6] Move builtin constructors for primitives to strict mode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index a9306003b84c4aba7cb8149e49d0325153ace9a0..e08b08a0acbd9a8104d271839c68530328a4e16e 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -1341,6 +1341,7 @@ utils.InstallFunctions(GlobalObject, DONT_ENUM, [
// Boolean
function BooleanConstructor(x) {
+ "use strict";
Michael Starzinger 2015/09/15 13:09:59 nit: TODO here as well.
if (%_IsConstructCall()) {
%_SetValueOf(this, ToBoolean(x));
} else {
@@ -1390,6 +1391,7 @@ utils.InstallFunctions(GlobalBoolean.prototype, DONT_ENUM, [
// Number
function NumberConstructor(x) {
+ "use strict";
Michael Starzinger 2015/09/15 13:09:59 nit: Likwise.
var value = %_ArgumentsLength() == 0 ? 0 : ToNumber(x);
if (%_IsConstructCall()) {
%_SetValueOf(this, value);
« src/symbol.js ('K') | « src/symbol.js ('k') | test/mjsunit/regress/regress-105.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698