def _GetDefault(t):
  """Returns a string containing the default value of the given type."""
  if t.element_type or t.nullable:
    return None  # Arrays and optional<T> are default-initialized
  type_map = {
      'boolean': 'false',
      'double': '0',
      'DOMString': None,  # std::string are default-initialized.
  }
  assert t.name in type_map, 'Type %s not found' % t.name
  return type_map[t.name]