Index: src/JsEngine.cpp |
diff --git a/src/JsEngine.cpp b/src/JsEngine.cpp |
index eb497a675d63d27be000d5f86a01eeaf7b3eeae9..9b60842f86d447fad91d0a250616c591f3133260 100644 |
--- a/src/JsEngine.cpp |
+++ b/src/JsEngine.cpp |
@@ -48,8 +48,11 @@ namespace |
class V8Initializer |
{ |
V8Initializer() |
- : platform(v8::platform::CreateDefaultPlatform()) |
+ : platform{nullptr} |
{ |
+ std::string cmd = "--use_strict"; |
+ v8::V8::SetFlagsFromString(cmd.c_str(), cmd.length()); |
+ platform = v8::platform::CreateDefaultPlatform(); |
v8::V8::InitializePlatform(platform); |
v8::V8::Initialize(); |
} |