| Index: sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart
|
| index c256b0d9d347b911faa5710df69254d494c11cfb..43d3e7b48a1a41c091a602511a1efcad8bc1349f 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart
|
| @@ -96,10 +96,11 @@ class ContainerBuilder extends CodeEmitterHelper {
|
| parametersBuffer[optionalParameterStart + index] =
|
| new jsAst.Parameter(jsName);
|
| } else {
|
| - Constant value = handler.getConstantForVariable(element);
|
| - if (value == null) {
|
| + ConstExp constant = handler.getConstantForVariable(element);
|
| + if (constant == null) {
|
| argumentsBuffer[count] = task.constantReference(new NullConstant());
|
| } else {
|
| + Constant value = constant.value;
|
| if (!value.isNull) {
|
| // If the value is the null constant, we should not pass it
|
| // down to the native method.
|
| @@ -516,7 +517,7 @@ class ContainerBuilder extends CodeEmitterHelper {
|
| Iterable<int> metadataIndices =
|
| parameter.metadata.map((MetadataAnnotation annotation) {
|
| Constant constant =
|
| - backend.constants.getConstantForMetadata(annotation);
|
| + backend.constants.getConstantForMetadata(annotation).value;
|
| backend.constants.addCompileTimeConstantForEmission(constant);
|
| return task.metadataEmitter.reifyMetadata(annotation);
|
| });
|
|
|