| Index: dart/sdk/lib/_internal/lib/collection_dev_patch.dart
|
| diff --git a/dart/sdk/lib/_internal/lib/collection_dev_patch.dart b/dart/sdk/lib/_internal/lib/collection_dev_patch.dart
|
| index f7467fd72562765f3afdeafc9f0669ef60bc54d1..90482452162724b6885b5743154906e86853cce9 100644
|
| --- a/dart/sdk/lib/_internal/lib/collection_dev_patch.dart
|
| +++ b/dart/sdk/lib/_internal/lib/collection_dev_patch.dart
|
| @@ -2,45 +2,13 @@
|
| // 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.
|
|
|
| -import 'dart:_foreign_helper' show JS;
|
| +import 'dart:_js_helper' show Primitives;
|
|
|
| patch class Symbol implements core.Symbol {
|
| patch const Symbol(String name)
|
| : this._name = name;
|
| }
|
|
|
| -/**
|
| - * This is the low-level method that is used to implement
|
| - * [print]. It is possible to override this function from JavaScript
|
| - * by defining a function in JavaScript called "dartPrint".
|
| - */
|
| patch void printToConsole(String line) {
|
| - if (JS('bool', r'typeof dartPrint == "function"')) {
|
| - // Support overriding print from JavaScript.
|
| - JS('void', r'dartPrint(#)', line);
|
| - return;
|
| - }
|
| -
|
| - // Inside browser or nodejs.
|
| - if (JS('bool', r'typeof console == "object"') &&
|
| - JS('bool', r'typeof console.log == "function"')) {
|
| - JS('void', r'console.log(#)', line);
|
| - return;
|
| - }
|
| -
|
| - // Don't throw inside IE, the console is only defined if dev tools is open.
|
| - if (JS('bool', r'typeof window == "object"')) {
|
| - return;
|
| - }
|
| -
|
| - // Running in d8, the V8 developer shell, or in Firefox' js-shell.
|
| - if (JS('bool', r'typeof print == "function"')) {
|
| - JS('void', r'print(#)', line);
|
| - return;
|
| - }
|
| -
|
| - // This is somewhat nasty, but we don't want to drag in a bunch of
|
| - // dependencies to handle a situation that cannot happen. So we
|
| - // avoid using Dart [:throw:] and Dart [toString].
|
| - JS('void', 'throw "Unable to print message: " + String(#)', line);
|
| + Primitives.printString('$line');
|
| }
|
|
|