| Index: mojo/public/tools/bindings/generators/js_templates/module_definition.tmpl
|
| diff --git a/mojo/public/tools/bindings/generators/js_templates/module_definition.tmpl b/mojo/public/tools/bindings/generators/js_templates/module_definition.tmpl
|
| index 7d7f06558aa1c8bcba6af0268680054a73758e03..53369ee0eeb0d9bc627eff1ecdbd2e64b4591509 100644
|
| --- a/mojo/public/tools/bindings/generators/js_templates/module_definition.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/js_templates/module_definition.tmpl
|
| @@ -25,11 +25,10 @@
|
| {%- include "interface_definition.tmpl" %}
|
| {%- endfor %}
|
|
|
| -{%- if use_new_js_bindings %}
|
| - var exports = mojo.internal.exposeNamespace("{{module.namespace}}");
|
| -{%- else %}
|
| var exports = {};
|
| -{%- endif %}
|
| + if (mojo && mojo.internal) {
|
| + exports = mojo.internal.exposeNamespace("{{module.namespace}}");
|
| + }
|
|
|
| {%- for constant in module.constants %}
|
| exports.{{constant.name}} = {{constant.name}};
|
|
|