Index: pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart |
index 7d5122ba4acbb047720a26c9a85d9e6aed2f67d5..2e9ed2176bff4f0f7769ce828e0fe93f3f5c7693 100644 |
--- a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart |
+++ b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart |
@@ -100,12 +100,11 @@ class ParameterStubGenerator { |
parametersBuffer[optionalParameterStart + index] = |
new jsAst.Parameter(jsName); |
} else { |
- ConstantExpression constant = handler.getConstantForVariable(element); |
- if (constant == null) { |
+ ConstantValue value = handler.getConstantValueForVariable(element); |
+ if (value == null) { |
argumentsBuffer[count] = |
emitter.constantReference(new NullConstantValue()); |
} else { |
- ConstantValue value = constant.value; |
if (!value.isNull) { |
// If the value is the null constant, we should not pass it |
// down to the native method. |