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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart

Issue 219053003: Deprecate automatic generation of precompiled.js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | « sdk/lib/_internal/compiler/implementation/dart2js.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
index 231035a42efce9cc6a30e789781a8005e7d5bc2b..710b0eb8d97e93121a7aad032143e13f9022d400 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
@@ -1544,6 +1544,23 @@ if (typeof $printHelperName === "function") {
..close();
compiler.assembledCode = assembledCode;
+ if (!compiler.useContentSecurityPolicy) {
+ mainBuffer.write("""
+{
+ var message =
+ 'Deprecation: Automatic generation of output for Content Security\\n' +
+ 'Policy is deprecated and will be removed with the next development\\n' +
+ 'release. Use the --csp option to generate the precompiled.js output\\n' +
floitsch 2014/03/31 12:53:26 space at end of line?
floitsch 2014/03/31 12:53:26 Should we generate "precompiled.js" or generate to
Johnni Winther 2014/04/01 08:20:21 Removed.
Johnni Winther 2014/04/01 08:20:21 Done.
+ 'without this message.';
+ if (typeof dartPrint == "function") {
+ dartPrint(message);
+ } else if (typeof console == "object" && typeof console.log == "function") {
+ console.log(message);
+ } else if (typeof print == "function") {
+ print(message);
+ }
+}\n""");
+ }
mainBuffer.write(
jsAst.prettyPrint(
precompiledFunctionAst, compiler,
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/dart2js.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698