Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/JsEngine.cpp

Issue 29523555: Issue 5552 - use strict mode for all JS in libadblocklus (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created Aug. 22, 2017, 7:29 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/compat.js ('k') | test/FileSystemJsObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/JsEngine.cpp
diff --git a/src/JsEngine.cpp b/src/JsEngine.cpp
index eb497a675d63d27be000d5f86a01eeaf7b3eeae9..dbfcc78f642b11a395a91411124fe009fdda7f24 100644
--- a/src/JsEngine.cpp
+++ b/src/JsEngine.cpp
@@ -76,6 +76,8 @@ using namespace AdblockPlus;
AdblockPlus::ScopedV8Isolate::ScopedV8Isolate()
{
V8Initializer::Init();
+ std::string cmd = "--use_strict";
anton 2017/08/22 07:37:04 https://issues.adblockplus.org/ticket/5552#comment
+ v8::V8::SetFlagsFromString(cmd.c_str(), cmd.length());
v8::Isolate::CreateParams isolateParams;
isolateParams.array_buffer_allocator = v8::ArrayBuffer::Allocator::NewDefaultAllocator();
isolate = v8::Isolate::New(isolateParams);
« no previous file with comments | « lib/compat.js ('k') | test/FileSystemJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld