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

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: Minor comment changes and rebase. 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 91e7b9290e33cff5865307865e65c3ab818c5890..a47dc476aa6cdac0c01493dc575ac65457f2c641 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('--enable-content-security-policy', 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.
+
+ --enable-content-security-policy
+ Emit JavaScript code that satisfies the 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