Apply Issue 12253048: "Add back --disallow-unsafe-eval for M3. This flag will be temporarily disabled" to trunk.
Review URL: https://codereview.chromium.org//12280012

git-svn-id: http://dart.googlecode.com/svn/trunk@18601 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/sdk/lib/_internal/compiler/implementation/dart2js.dart b/sdk/lib/_internal/compiler/implementation/dart2js.dart
index 07d8e1f..5fdcd2c7 100644
--- a/sdk/lib/_internal/compiler/implementation/dart2js.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart2js.dart
@@ -151,12 +151,6 @@
     return passThrough('--categories=${categories.join(",")}');
   }
 
-  // TODO(8522): Remove this method once option is restored.
-  complainAboutDisallowUnsafeEval(String argument) {
-    fail('Error: $argument is currently not supported, '
-         'see http://dartbug.com/8522');
-  }
-
   handleShortOptions(String argument) {
     var shortOptions = argument.substring(1).split("");
     for (var shortOption in shortOptions) {
@@ -202,8 +196,7 @@
                       (_) => passThrough('--enable-concrete-type-inference')),
     new OptionHandler(r'--help|/\?|/h', (_) => wantHelp = true),
     new OptionHandler('--package-root=.+|-p.+', setPackageRoot),
-    new OptionHandler('--disallow-unsafe-eval',
-                      complainAboutDisallowUnsafeEval),
+    new OptionHandler('--disallow-unsafe-eval', passThrough),
     new OptionHandler('--analyze-all', passThrough),
     new OptionHandler('--analyze-only', setAnalyzeOnly),
     new OptionHandler('--disable-native-live-type-analysis', passThrough),
@@ -441,18 +434,12 @@
     Disable the optimization that removes unused native types from dart:html
     and related libraries.
 
-'''
-/* TODO(8522): Restore this comment once option is restored.
-'''
   --disallow-unsafe-eval
     Disable 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.
 
-'''
-*/
-'''
   --reject-deprecated-language-features
     Reject deprecated language features.  Without this option, the
     compiler will accept language features that are no longer valid
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index e0ba156..e60f8c9 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -730,8 +730,7 @@
         interceptedClasses = new LinkedHashMap<ClassElement, ClassElement>(),
         super(compiler, JAVA_SCRIPT_CONSTANT_SYSTEM) {
     emitter = disableEval
-        // TODO(8522): Restore --disallow-unsafe-eval.
-        ? null // new CodeEmitterNoEvalTask(compiler, namer, generateSourceMap)
+        ? new CodeEmitterNoEvalTask(compiler, namer, generateSourceMap)
         : new CodeEmitterTask(compiler, namer, generateSourceMap);
     builder = new SsaBuilderTask(this);
     optimizer = new SsaOptimizerTask(this);
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart
index 0bfb5df..52e6ee0 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart
@@ -26,8 +26,7 @@
 part 'constant_emitter.dart';
 part 'constant_system_javascript.dart';
 part 'emitter.dart';
-// TODO(8522): Restore --disallow-unsafe-eval.
-// part 'emitter_no_eval.dart';
+part 'emitter_no_eval.dart';
 part 'minify_namer.dart';
 part 'namer.dart';
 part 'native_emitter.dart';
diff --git a/tools/VERSION b/tools/VERSION
index 9ad9fa1..57771f2 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -1,4 +1,4 @@
 MAJOR 0
 MINOR 3
 BUILD 7
-PATCH 1
+PATCH 2