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

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: Address Michi's comments 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
« no previous file with comments | « src/string.js ('k') | test/mjsunit/regress/regress-105.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index a9306003b84c4aba7cb8149e49d0325153ace9a0..6106ae9146316b627cbc5f28f7a2cb561110e355 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -1341,6 +1341,8 @@ utils.InstallFunctions(GlobalObject, DONT_ENUM, [
// Boolean
function BooleanConstructor(x) {
+ // TODO(bmeurer): Move this to toplevel.
+ "use strict";
if (%_IsConstructCall()) {
%_SetValueOf(this, ToBoolean(x));
} else {
@@ -1390,6 +1392,8 @@ utils.InstallFunctions(GlobalBoolean.prototype, DONT_ENUM, [
// Number
function NumberConstructor(x) {
+ // TODO(bmeurer): Move this to toplevel.
+ "use strict";
var value = %_ArgumentsLength() == 0 ? 0 : ToNumber(x);
if (%_IsConstructCall()) {
%_SetValueOf(this, value);
« no previous file with comments | « src/string.js ('k') | test/mjsunit/regress/regress-105.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698