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

Unified Diff: lib/compiler/implementation/dart2js.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/dart2js.dart
diff --git a/lib/compiler/implementation/dart2js.dart b/lib/compiler/implementation/dart2js.dart
index 55ce71199dfb5abbbfdcd6f1b2aff20a7cdc5278..afad5ed6dd8c43b413f875387e575f84b8134d13 100644
--- a/lib/compiler/implementation/dart2js.dart
+++ b/lib/compiler/implementation/dart2js.dart
@@ -155,7 +155,8 @@ void compile(List<String> argv) {
new OptionHandler('--enable-concrete-type-inference',
(_) => passThrough('--enable-concrete-type-inference')),
new OptionHandler(r'--help|/\?|/h', (_) => wantHelp = true),
- new OptionHandler(r'--package-root=.+|-p.+', setPackageRoot),
+ new OptionHandler('--package-root=.+|-p.+', setPackageRoot),
+ new OptionHandler('--disable-eval', passThrough),
// The following two options must come last.
new OptionHandler('-.*', (String argument) {
helpAndFail('Error: Unknown option "$argument".');
@@ -392,7 +393,12 @@ be removed in a future version:
libraries are used: dart:dom, dart:html dart:io.
--enable-concrete-type-inference
- Enable experimental concrete type inference.''');
+ Enable experimental concrete type inference.
+
+ --disable-eval
+ Disables dynamic generation of code in the generated output. This is
kasperl 2012/10/18 09:36:21 Maybe get some of the text from http://www.w3.org/
floitsch 2012/10/18 11:08:11 Done.
+ necessary to satisfy CSP restrictions. This flag is not continuously tested.
+ Please report breakages and we will fix them as soon as possible.''');
}
void helpAndExit(bool verbose) {

Powered by Google App Engine
This is Rietveld 408576698