| Index: sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart
|
| index e8621a5d91c28c3d0ddf9cfba946603834757f0c..0677013fafc94f4108ec57dc6604db6d5e12241a 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart
|
| @@ -87,23 +87,12 @@ class ConstantEmitter implements ConstantVisitor {
|
| /**
|
| * Write the contents of the quoted string to a [CodeBuffer] in
|
| * a form that is valid as JavaScript string literal content.
|
| - * The string is assumed quoted by single quote characters.
|
| + * The string is assumed quoted by double quote characters.
|
| */
|
| - void writeEscapedString(DartString string,
|
| - CodeBuffer buffer,
|
| - Node diagnosticNode) {
|
| - void onError(code) {
|
| - compiler.reportError(
|
| - diagnosticNode,
|
| - 'Unhandled non-BMP character: U+${code.toRadixString(16)}');
|
| - }
|
| - writeJsonEscapedCharsOn(string.iterator(), buffer, onError);
|
| - }
|
| -
|
| void visitString(StringConstant constant) {
|
| - buffer.add("'");
|
| - writeEscapedString(constant.value, buffer, constant.node);
|
| - buffer.add("'");
|
| + buffer.add('"');
|
| + writeJsonEscapedCharsOn(constant.value.slowToString(), buffer);
|
| + buffer.add('"');
|
| }
|
|
|
| void emitCanonicalVersion(Constant constant) {
|
|
|