Version 2.16.0-59.0.dev

Merge commit '44b93338d9467c1a9990cb796ad78cdef1f81a93' into 'dev'
diff --git a/DEPS b/DEPS
index 6a06c77..580a590 100644
--- a/DEPS
+++ b/DEPS
@@ -108,7 +108,7 @@
   "dart_style_rev": "08b0294d0a500d5c02168ef57dcb8868d0c3cb48",
 
   "dartdoc_rev" : "520e64977de7a87b2fd5be56e5c2e1a58d55bdad",
-  "devtools_rev" : "3a2f570813200e6dee141f3e7a9edcae5f31c2e8",
+  "devtools_rev" : "f2ede24a4ea666d4832d78b813c7d4e376aa77d0",
   "jsshell_tag": "version:88.0",
   "ffi_rev": "4dd32429880a57b64edaf54c9d5af8a9fa9a4ffb",
   "fixnum_rev": "16d3890c6dc82ca629659da1934e412292508bba",
diff --git a/pkg/_fe_analyzer_shared/pubspec.yaml b/pkg/_fe_analyzer_shared/pubspec.yaml
index 41a87a0..445f314 100644
--- a/pkg/_fe_analyzer_shared/pubspec.yaml
+++ b/pkg/_fe_analyzer_shared/pubspec.yaml
@@ -1,5 +1,5 @@
 name: _fe_analyzer_shared
-version: 30.0.0
+version: 31.0.0
 description: Logic that is shared between the front_end and analyzer packages.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/_fe_analyzer_shared
 
diff --git a/pkg/analyzer/CHANGELOG.md b/pkg/analyzer/CHANGELOG.md
index 260fbd1..a0dc0ba 100644
--- a/pkg/analyzer/CHANGELOG.md
+++ b/pkg/analyzer/CHANGELOG.md
@@ -1,4 +1,4 @@
-## 2.8.0-dev
+## 2.8.0
 * Deprecations and renames for `getXyz` methods in `AnalysisDriver`.
 * Removed uppercase named constants from `double` in mock SDK.
 * Deprecated `path` and `uri` from `AnalysisResult`.
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index 76dc2d2..14a27f7 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -1,5 +1,5 @@
 name: analyzer
-version: 2.8.0-dev
+version: 2.8.0
 description: This package provides a library that performs static analysis of Dart code.
 homepage: https://github.com/dart-lang/sdk/tree/main/pkg/analyzer
 
@@ -7,7 +7,7 @@
   sdk: '>=2.14.0 <3.0.0'
 
 dependencies:
-  _fe_analyzer_shared: ^30.0.0
+  _fe_analyzer_shared: ^31.0.0
   cli_util: ^0.3.0
   collection: ^1.15.0
   convert: ^3.0.0
diff --git a/pkg/dds/CHANGELOG.md b/pkg/dds/CHANGELOG.md
index 55fbb5e..0b7db0f 100644
--- a/pkg/dds/CHANGELOG.md
+++ b/pkg/dds/CHANGELOG.md
@@ -1,6 +1,8 @@
 # 2.1.5
 - Update to new CpuSamplesEvent format for CPU sample caching for improved
   performance.
+- Add additional context in the case of failure to ascii decode headers caused
+  by utf8 content on the stream.
 
 # 2.1.4
 - A new library `package:dds/dap.dart` exposes classes required to build a custom DAP
diff --git a/pkg/dds/lib/src/dap/protocol_stream_transformers.dart b/pkg/dds/lib/src/dap/protocol_stream_transformers.dart
index 424fa84..f166e55 100644
--- a/pkg/dds/lib/src/dap/protocol_stream_transformers.dart
+++ b/pkg/dds/lib/src/dap/protocol_stream_transformers.dart
@@ -87,8 +87,14 @@
 
   /// Decodes [buffer] into a String and returns the 'Content-Length' header value.
   static ProtocolHeaders _parseHeaders(List<int> buffer) {
-    // Headers are specified as always ASCII in LSP.
-    final asString = ascii.decode(buffer);
+    final String asString;
+    try {
+      // Headers are specified as always ASCII in LSP.
+      asString = ascii.decode(buffer);
+    } on FormatException {
+      throw FormatException('Unable to decode headers with ascii. '
+          'The stream has utf8 content:\n${utf8.decode(buffer)}');
+    }
     final headers = asString.split('\r\n');
     final lengthHeader =
         headers.firstWhere((h) => h.startsWith('Content-Length'));
diff --git a/pkg/dev_compiler/analysis_options.yaml b/pkg/dev_compiler/analysis_options.yaml
index c1925c0..f93da08 100644
--- a/pkg/dev_compiler/analysis_options.yaml
+++ b/pkg/dev_compiler/analysis_options.yaml
@@ -1,8 +1,8 @@
 include: package:lints/recommended.yaml
 
 analyzer:
-  strong-mode:
-    implicit-casts: false
+  language:
+    strict-casts: true
   errors:
     todo: ignore
     avoid_function_literals_in_foreach_calls: ignore
diff --git a/pkg/dev_compiler/test/sourcemap/testfiles/step_through_async_star_yield.dart b/pkg/dev_compiler/test/sourcemap/testfiles/step_through_async_star_yield.dart
index 82e0be2..ad18584 100644
--- a/pkg/dev_compiler/test/sourcemap/testfiles/step_through_async_star_yield.dart
+++ b/pkg/dev_compiler/test/sourcemap/testfiles/step_through_async_star_yield.dart
@@ -5,7 +5,7 @@
 // @dart = 2.9
 
 void main() async {
-  await for (var i in foobar()) {
+  await for (var i in foobar() as Stream) {
     print(i);
   }
   print('Done!');
diff --git a/pkg/js/analysis_options.yaml b/pkg/js/analysis_options.yaml
index afaa4eb..21a6ace 100644
--- a/pkg/js/analysis_options.yaml
+++ b/pkg/js/analysis_options.yaml
@@ -1,8 +1,8 @@
 include: package:pedantic/analysis_options.yaml
 
 analyzer:
-  strong-mode:
-    implicit-casts: false
+  language:
+    strict-casts: true
 
 linter:
   rules:
diff --git a/runtime/observatory/tests/service/get_vm_timeline_rpc_test.dart b/runtime/observatory/tests/service/get_vm_timeline_rpc_test.dart
index ac5e9d7..c486a01 100644
--- a/runtime/observatory/tests/service/get_vm_timeline_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_vm_timeline_rpc_test.dart
@@ -103,6 +103,11 @@
       // Skip API category events which sometimes don't have an isolate.
       continue;
     }
+    if (event['name'].contains('VirtualMemory')) {
+      // Skip virtual memory events which may or may not have an isolate or
+      // isolate group.
+      continue;
+    }
     if (event['cat'] == 'Embedder' &&
         (event['name'] == 'DFE::ReadScript' ||
             event['name'] == 'CreateIsolateGroupAndSetupHelper')) {
diff --git a/runtime/observatory_2/tests/service_2/get_vm_timeline_rpc_test.dart b/runtime/observatory_2/tests/service_2/get_vm_timeline_rpc_test.dart
index 38d088e..8af7481 100644
--- a/runtime/observatory_2/tests/service_2/get_vm_timeline_rpc_test.dart
+++ b/runtime/observatory_2/tests/service_2/get_vm_timeline_rpc_test.dart
@@ -103,6 +103,11 @@
       // Skip API category events which sometimes don't have an isolate.
       continue;
     }
+    if (event['name'].contains('VirtualMemory')) {
+      // Skip virtual memory events which may or may not have an isolate or
+      // isolate group.
+      continue;
+    }
     if (event['cat'] == 'Embedder' &&
         (event['name'] == 'DFE::ReadScript' ||
             event['name'] == 'CreateIsolateGroupAndSetupHelper')) {
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 209387d..50238aa 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -4523,7 +4523,7 @@
   event.set_embedder_kind(event_kind);
   event.set_embedder_stream_id(stream_id);
   event.set_bytes(bytes, bytes_len);
-  Service::HandleEvent(&event);
+  Service::HandleEvent(&event, /*enter_safepoint=*/false);
 }
 
 void Service::SendLogEvent(Isolate* isolate,
diff --git a/runtime/vm/service_event.cc b/runtime/vm/service_event.cc
index 6ef5b54..120a1dc 100644
--- a/runtime/vm/service_event.cc
+++ b/runtime/vm/service_event.cc
@@ -20,7 +20,9 @@
     : ServiceEvent(isolate_group, nullptr, event_kind) {}
 
 ServiceEvent::ServiceEvent(Isolate* isolate, EventKind event_kind)
-    : ServiceEvent(isolate->group(), isolate, event_kind) {}
+    : ServiceEvent(isolate != nullptr ? isolate->group() : nullptr,
+                   isolate,
+                   event_kind) {}
 
 ServiceEvent::ServiceEvent(IsolateGroup* isolate_group,
                            Isolate* isolate,
diff --git a/runtime/vm/virtual_memory_posix.cc b/runtime/vm/virtual_memory_posix.cc
index b2717df..7ab0d3c 100644
--- a/runtime/vm/virtual_memory_posix.cc
+++ b/runtime/vm/virtual_memory_posix.cc
@@ -23,6 +23,7 @@
 #include "platform/utils.h"
 #include "vm/heap/pages.h"
 #include "vm/isolate.h"
+#include "vm/timeline.h"
 #include "vm/virtual_memory_compressed.h"
 
 // #define VIRTUAL_MEMORY_LOGGING 1
@@ -303,6 +304,7 @@
                                               bool is_executable,
                                               bool is_compressed,
                                               const char* name) {
+  TIMELINE_FUNCTION_GC_DURATION(Thread::Current(), "VirtualMemory Allocate");
   // When FLAG_write_protect_code is active, code memory (indicated by
   // is_executable = true) is allocated as non-executable and later
   // changed to executable via VirtualMemory::Protect.
@@ -446,6 +448,8 @@
 }
 
 VirtualMemory* VirtualMemory::Reserve(intptr_t size, intptr_t alignment) {
+  TIMELINE_FUNCTION_GC_DURATION(Thread::Current(), "VirtualMemory Reserve");
+
   ASSERT(Utils::IsAligned(size, PageSize()));
   ASSERT(Utils::IsPowerOfTwo(alignment));
   ASSERT(Utils::IsAligned(alignment, PageSize()));
@@ -490,6 +494,8 @@
 }
 
 VirtualMemory::~VirtualMemory() {
+  TIMELINE_FUNCTION_GC_DURATION(Thread::Current(), "VirtualMemory Deallocate");
+
 #if defined(DART_COMPRESSED_POINTERS)
   if (VirtualMemoryCompressedHeap::Contains(reserved_.pointer())) {
     Decommit(reserved_.pointer(), reserved_.size());
diff --git a/tests/ffi/ffi.status b/tests/ffi/ffi.status
index 5335837..956bac1 100644
--- a/tests/ffi/ffi.status
+++ b/tests/ffi/ffi.status
@@ -16,6 +16,10 @@
 
 [ $system == android ]
 *: Pass, Slow # https://github.com/dart-lang/sdk/issues/38489
+regress_47594_test: Skip # DartDev is not available on Android.
+
+[ $system == windows ]
+regress_47594_test: Skip # DynamicLibrary.process() is not available on Windows.
 
 [ $compiler != dart2analyzer && $compiler != fasta && $runtime != dart_precompiled && $runtime != vm ]
 *: SkipByDesign # FFI is a VM-only feature. (This test suite is part of the default set.)
diff --git a/tests/ffi_2/ffi_2.status b/tests/ffi_2/ffi_2.status
index 5335837..956bac1 100644
--- a/tests/ffi_2/ffi_2.status
+++ b/tests/ffi_2/ffi_2.status
@@ -16,6 +16,10 @@
 
 [ $system == android ]
 *: Pass, Slow # https://github.com/dart-lang/sdk/issues/38489
+regress_47594_test: Skip # DartDev is not available on Android.
+
+[ $system == windows ]
+regress_47594_test: Skip # DynamicLibrary.process() is not available on Windows.
 
 [ $compiler != dart2analyzer && $compiler != fasta && $runtime != dart_precompiled && $runtime != vm ]
 *: SkipByDesign # FFI is a VM-only feature. (This test suite is part of the default set.)
diff --git a/tools/VERSION b/tools/VERSION
index bde5370..64cee58 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 16
 PATCH 0
-PRERELEASE 58
+PRERELEASE 59
 PRERELEASE_PATCH 0
\ No newline at end of file
diff --git a/tools/dom/docs/docs.json b/tools/dom/docs.json
similarity index 100%
rename from tools/dom/docs/docs.json
rename to tools/dom/docs.json
diff --git a/tools/dom/docs/bin/docs.dart b/tools/dom/docs/bin/docs.dart
deleted file mode 100644
index 147401f..0000000
--- a/tools/dom/docs/bin/docs.dart
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/**
- * This program reads the HTML libraries from [LIB_PATH] and outputs their
- * documentation to [JSON_PATH].
- */
-
-import 'dart:io';
-import 'dart:async';
-
-import 'package:path/path.dart' as path;
-
-import '../lib/docs.dart';
-
-final String json_path = Platform.script.resolve('../docs.json').toFilePath();
-final String lib_uri = Platform.script.resolve('../../../../sdk').toString();
-
-main() {
-  print('Converting HTML docs from $lib_uri to $json_path.');
-
-  convert(lib_uri, json_path).then((bool anyErrors) {
-    print('Converted HTML docs ${anyErrors ? "with": "without"}'
-        ' errors.');
-  });
-}
diff --git a/tools/dom/docs/docs.status b/tools/dom/docs/docs.status
deleted file mode 100644
index a502066..0000000
--- a/tools/dom/docs/docs.status
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# docs.dart is a tool that only runs on the VM
-[ $compiler == dart2js ]
-*: Skip
diff --git a/tools/dom/docs/lib/docs.dart b/tools/dom/docs/lib/docs.dart
deleted file mode 100644
index ed9ecc6..0000000
--- a/tools/dom/docs/lib/docs.dart
+++ /dev/null
@@ -1,197 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/**
- * A library for extracting the documentation from the various HTML libraries
- * ([dart:html], [dart:svg], [dart:web_audio], [dart:indexed_db]) and saving
- * those documentation comments to a JSON file.
- */
-
-library docs;
-
-import '../../../../sdk/lib/_internal/dartdoc/lib/src/dart2js_mirrors.dart';
-import '../../../../pkg/compiler/lib/src/mirrors/source_mirrors.dart';
-import '../../../../pkg/compiler/lib/src/mirrors/mirrors_util.dart';
-import '../../../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart';
-import '../../../../sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart';
-import '../../../../utils/apidoc/lib/metadata.dart';
-import 'dart:async';
-import 'dart:io';
-
-/// The various HTML libraries.
-const List<String> HTML_LIBRARY_NAMES = const [
-  'dart:html',
-  'dart:indexed_db',
-  'dart:svg',
-  'dart:web_audio',
-  'dart:web_gl',
-  'dart:web_sql'
-];
-/**
- * Converts the libraries in [HTML_LIBRARY_NAMES] to a json file at [jsonPath]
- * given the library path at [libUri].
- *
- * The json output looks like:
- *     {
- *       $library_name: {
- *         $interface_name: {
- *           comment: "$comment"
- *           members: {
- *             $member: [
- *               [$comment1line1,
- *                $comment1line2,
- *                ...],
- *               ...
- *             ],
- *             ...
- *           }
- *         },
- *         ...
- *       },
- *       ...
- *     }
- *
- * Completes to true if any errors were encountered, false otherwise.
- */
-Future<bool> convert(String libUri, String jsonPath) {
-  var paths = <String>[];
-  for (var libraryName in HTML_LIBRARY_NAMES) {
-    paths.add(libraryName);
-  }
-
-  return analyze(paths, libUri, options: ['--preserve-comments'])
-      .then((MirrorSystem mirrors) {
-    var convertedJson = _generateJsonFromLibraries(mirrors);
-    return _exportJsonToFile(convertedJson, jsonPath);
-  });
-}
-
-Future<bool> _exportJsonToFile(Map convertedJson, String jsonPath) {
-  return new Future.sync(() {
-    final jsonFile = new File(jsonPath);
-    var writeJson = prettySerialize(convertedJson);
-
-    var outputStream = jsonFile.openWrite();
-    outputStream.writeln(writeJson);
-    outputStream.close();
-    return outputStream.done.then((_) => false);
-  });
-}
-
-Map _generateJsonFromLibraries(MirrorSystem mirrors) {
-  var convertedJson = {};
-
-  // Sort the libraries by name (not key).
-  var sortedLibraries = new List<LibraryMirror>.from(mirrors.libraries.values
-      .where((e) => HTML_LIBRARY_NAMES.indexOf(e.uri.toString()) >= 0))
-    ..sort((x, y) => x.uri
-        .toString()
-        .toUpperCase()
-        .compareTo(y.uri.toString().toUpperCase()));
-
-  for (LibraryMirror libMirror in sortedLibraries) {
-    print('Extracting documentation from ${libMirror.simpleName}.');
-
-    var libraryJson = {};
-    var sortedClasses = _sortAndFilterMirrors(
-        classesOf(libMirror.declarations).toList(),
-        ignoreDocsEditable: true);
-
-    for (ClassMirror classMirror in sortedClasses) {
-      print(' class: $classMirror');
-      var classJson = {};
-      var sortedMembers =
-          _sortAndFilterMirrors(membersOf(classMirror.declarations).toList());
-
-      var membersJson = {};
-      for (var memberMirror in sortedMembers) {
-        print('  member: $memberMirror');
-        var memberDomName = domNames(memberMirror)[0];
-        var memberComment = _splitCommentsByNewline(
-            computeUntrimmedCommentAsList(memberMirror));
-
-        // Remove interface name from Dom Name.
-        if (memberDomName.indexOf('.') >= 0) {
-          memberDomName =
-              memberDomName.substring(memberDomName.indexOf('.') + 1);
-        }
-
-        if (!memberComment.isEmpty) {
-          membersJson.putIfAbsent(memberDomName, () => memberComment);
-        }
-      }
-
-      // Only include the comment if DocsEditable is set.
-      var classComment =
-          _splitCommentsByNewline(computeUntrimmedCommentAsList(classMirror));
-      if (!classComment.isEmpty &&
-          findMetadata(classMirror.metadata, 'DocsEditable') != null) {
-        classJson.putIfAbsent('comment', () => classComment);
-      }
-      if (!membersJson.isEmpty) {
-        classJson.putIfAbsent('members', () => membersJson);
-      }
-
-      if (!classJson.isEmpty) {
-        libraryJson.putIfAbsent(domNames(classMirror)[0], () => classJson);
-      }
-    }
-
-    if (!libraryJson.isEmpty) {
-      convertedJson.putIfAbsent(nameOf(libMirror), () => libraryJson);
-    }
-  }
-
-  return convertedJson;
-}
-
-/// Filter out mirrors that are private, or which are not part of this docs
-/// process. That is, ones without the DocsEditable annotation.
-/// If [ignoreDocsEditable] is true, relax the restriction on @DocsEditable().
-/// This is to account for classes that are defined in a template, but whose
-/// members are generated.
-List<DeclarationMirror> _sortAndFilterMirrors(List<DeclarationMirror> mirrors,
-    {ignoreDocsEditable: false}) {
-  var filteredMirrors = mirrors
-      .where((DeclarationMirror c) =>
-          !domNames(c).isEmpty &&
-          !displayName(c).startsWith('_') &&
-          (!ignoreDocsEditable
-              ? (findMetadata(c.metadata, 'DocsEditable') != null)
-              : true))
-      .toList();
-
-  filteredMirrors.sort((x, y) =>
-      domNames(x)[0].toUpperCase().compareTo(domNames(y)[0].toUpperCase()));
-
-  return filteredMirrors;
-}
-
-List<String> _splitCommentsByNewline(List<String> comments) {
-  var out = [];
-
-  comments.forEach((c) {
-    out.addAll(c.split(new RegExp('\n')));
-  });
-
-  return out;
-}
-
-/// Given the class mirror, returns the names found or an empty list.
-List<String> domNames(DeclarationMirror mirror) {
-  var domNameMetadata = findMetadata(mirror.metadata, 'DomName');
-
-  if (domNameMetadata != null) {
-    var domNames = <String>[];
-    var tags = domNameMetadata.getField(#name);
-    for (var s in tags.reflectee.split(',')) {
-      domNames.add(s.trim());
-    }
-
-    if (domNames.length == 1 && domNames[0] == 'none') return <String>[];
-    return domNames;
-  } else {
-    return <String>[];
-  }
-}
diff --git a/tools/dom/docs/test/docs_test.dart b/tools/dom/docs/test/docs_test.dart
deleted file mode 100644
index 015f8e9..0000000
--- a/tools/dom/docs/test/docs_test.dart
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library docs_test;
-
-import 'dart:io';
-
-import 'package:unittest/unittest.dart';
-import 'package:path/path.dart' as path;
-
-import '../bin/docs.dart';
-import '../lib/docs.dart';
-
-final testJsonPath = Platform.script.resolve('test.json').toFilePath();
-
-main() {
-  // Some tests take more than the default 20 second unittest timeout.
-  unittestConfiguration.timeout = null;
-  group('docs', () {
-    var oldJson = new File(json_path);
-    var testJson = new File(testJsonPath);
-
-    tearDown(() {
-      // Clean up.
-      if (testJson.existsSync()) {
-        testJson.deleteSync();
-      }
-      assert(!testJson.existsSync());
-    });
-
-    test('Ensure that docs.json is up to date', () {
-      // We should find a json file where we expect it.
-      expect(oldJson.existsSync(), isTrue);
-
-      // Save the last modified time to check it at the end.
-      var oldJsonModified = oldJson.lastModifiedSync();
-
-      // There should be no test file yet.
-      if (testJson.existsSync()) testJson.deleteSync();
-      assert(!testJson.existsSync());
-
-      expect(
-          convert(lib_uri, testJsonPath).then((bool anyErrors) {
-            expect(anyErrors, isFalse);
-
-            // We should have a file now.
-            expect(testJson.existsSync(), isTrue);
-
-            // Ensure that there's nothing different between the new JSON and old.
-            expect(testJson.readAsStringSync(),
-                equals(oldJson.readAsStringSync()));
-
-            // Ensure that the old JSON file didn't actually change.
-            expect(oldJsonModified, equals(oldJson.lastModifiedSync()));
-          }),
-          completes);
-    });
-  });
-}
diff --git a/tools/dom/dom.py b/tools/dom/dom.py
index f986d3f..9fcdf99 100755
--- a/tools/dom/dom.py
+++ b/tools/dom/dom.py
@@ -64,20 +64,6 @@
     compile_dart2js(argv.pop(0), True)
 
 
-def docs():
-    return call([
-        os.path.join(dart_out_dir, 'dart-sdk', 'bin', 'dart'),
-        '--package-root=%s' % os.path.join(dart_out_dir, 'packages/'),
-        os.path.join('tools', 'dom', 'docs', 'bin', 'docs.dart'),
-    ])
-
-
-def test_docs():
-    return call([
-        os.path.join('tools', 'test.py'), '--mode=release', '--checked', 'docs'
-    ])
-
-
 def compile_dart2js(dart_file, checked):
     out_file = dart_file + '.js'
     dart2js_path = os.path.join(dart_out_dir, 'dart-sdk', 'bin', 'dart2js')
@@ -187,10 +173,8 @@
     'analyze': [analyze, 'Run the dart analyzer'],
     'build': [build, 'Build dart in release mode'],
     'dart2js': [dart2js, 'Run dart2js on the .dart file specified'],
-    'docs': [docs, 'Generates docs.json'],
     'gen': [gen, 'Re-generate DOM generated files (run go.sh)'],
     'size_check': [size_check, 'Check the size of dart2js compiled Swarm'],
-    'test_docs': [test_docs, 'Tests docs.dart'],
     'test_chrome': [
         test_chrome, 'Run tests in checked mode in Chrome.\n'
         '\t\tOptionally provide name of test to run.'
diff --git a/tools/dom/scripts/dartdomgenerator.py b/tools/dom/scripts/dartdomgenerator.py
index 1319e95..dd31046 100755
--- a/tools/dom/scripts/dartdomgenerator.py
+++ b/tools/dom/scripts/dartdomgenerator.py
@@ -124,9 +124,9 @@
     generator.CleanupOperationArguments(webkit_database)
 
     emitters = multiemitter.MultiEmitter(logging_level)
-    metadata = DartMetadata(
-        os.path.join(current_dir, '..', 'dom.json'),
-        os.path.join(current_dir, '..', 'docs', 'docs.json'), logging_level)
+    metadata = DartMetadata(os.path.join(current_dir, '..', 'dom.json'),
+                            os.path.join(current_dir, '..', 'docs.json'),
+                            logging_level)
     renamer = HtmlRenamer(webkit_database, metadata)
     type_registry = TypeRegistry(webkit_database, renamer)