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

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: More fixes. 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
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/dart2js.dart
diff --git a/lib/compiler/implementation/dart2js.dart b/lib/compiler/implementation/dart2js.dart
index 55ce71199dfb5abbbfdcd6f1b2aff20a7cdc5278..526652c8fb416b0a4586be4c4a248d27cf3ccea4 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('--disallow-unsafe-eval', passThrough),
// The following two options must come last.
new OptionHandler('-.*', (String argument) {
helpAndFail('Error: Unknown option "$argument".');
@@ -392,7 +393,13 @@ 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.
+
+ --disallow-unsafe-eval
+ Disables dynamic generation of code in the generated output. This is
+ necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/).
+ This flag is not continuously tested. Please report breakages and we
+ will fix them as soon as possible.''');
}
void helpAndExit(bool verbose) {
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698