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

Unified Diff: src/symbol.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/symbol.js
diff --git a/src/symbol.js b/src/symbol.js
index 2f68eff24197a6354d70905baf7422f8635dc598..eefeea03d2a591d6016b49c930fe0c39ccbb7e86 100644
--- a/src/symbol.js
+++ b/src/symbol.js
@@ -32,6 +32,7 @@ utils.Import(function(from) {
// -------------------------------------------------------------------
function SymbolConstructor(x) {
+ "use strict";
Michael Starzinger 2015/09/15 13:09:58 The entire module is already strict, let's drop it
if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Symbol");
// NOTE: Passing in a Symbol value will throw on ToString().
return %CreateSymbol(IS_UNDEFINED(x) ? x : ToString(x));

Powered by Google App Engine
This is Rietveld 408576698