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

Unified Diff: lib/compiler/implementation/compiler.dart

Issue 11188004: Add a content-security-policy (CSP) flag. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Split CSP code into separate class. Created 8 years, 2 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: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index b89a90d7d420bab51807249114293add746965fb..cba7461e9ba7ba5f8aaade4bbe65873e11a59f5f 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -201,6 +201,7 @@ abstract class Compiler implements DiagnosticListener {
this.enableMinification: false,
bool emitJavaScript: true,
bool generateSourceMap: true,
+ bool disableEval: false,
List<String> strips: const []})
: libraries = new Map<String, LibraryElement>(),
progress = new Stopwatch() {
@@ -217,7 +218,7 @@ abstract class Compiler implements DiagnosticListener {
checker = new TypeCheckerTask(this);
typesTask = new ti.TypesTask(this, enableConcreteTypeInference);
backend = emitJavaScript ?
- new js_backend.JavaScriptBackend(this, generateSourceMap) :
+ new js_backend.JavaScriptBackend(this, generateSourceMap, disableEval) :
new dart_backend.DartBackend(this, strips);
constantHandler = new ConstantHandler(this, backend.constantSystem);
enqueuer = new EnqueueTask(this);

Powered by Google App Engine
This is Rietveld 408576698