Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: lib/html/scripts/systemhtml.py

Issue 11235054: Removed IllegalAccessException and UnsupportedOperationException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: ADded test expectations. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | lib/html/scripts/systemnative.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality for the system to generate 6 """This module provides shared functionality for the system to generate
7 Dart:html APIs from the IDL database.""" 7 Dart:html APIs from the IDL database."""
8 8
9 import emitter 9 import emitter
10 import os 10 import os
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 ' JS("void", "#[#] = #", this, index, value);\n', 692 ' JS("void", "#[#] = #", this, index, value);\n',
693 TYPE=self._NarrowInputType(element_type)) 693 TYPE=self._NarrowInputType(element_type))
694 else: 694 else:
695 # The HTML library implementation of NodeList has a custom indexed setter 695 # The HTML library implementation of NodeList has a custom indexed setter
696 # implementation that uses the parent node the NodeList is associated 696 # implementation that uses the parent node the NodeList is associated
697 # with if one is available. 697 # with if one is available.
698 if self._interface.id != 'NodeList': 698 if self._interface.id != 'NodeList':
699 self._members_emitter.Emit( 699 self._members_emitter.Emit(
700 '\n' 700 '\n'
701 ' void operator[]=(int index, $TYPE value) {\n' 701 ' void operator[]=(int index, $TYPE value) {\n'
702 ' throw new UnsupportedOperationException("Cannot assign element of immutable List.");\n' 702 ' throw new UnsupportedError("Cannot assign element of immutable List.");\n'
703 ' }\n', 703 ' }\n',
704 TYPE=self._NarrowInputType(element_type)) 704 TYPE=self._NarrowInputType(element_type))
705 705
706 # TODO(sra): Use separate mixins for mutable implementations of List<T>. 706 # TODO(sra): Use separate mixins for mutable implementations of List<T>.
707 # TODO(sra): Use separate mixins for typed array implementations of List<T>. 707 # TODO(sra): Use separate mixins for typed array implementations of List<T>.
708 if self._interface.id != 'NodeList': 708 if self._interface.id != 'NodeList':
709 template_file = 'immutable_list_mixin.darttemplate' 709 template_file = 'immutable_list_mixin.darttemplate'
710 has_contains = any(op.id == 'contains' for op in self._interface.operation s) 710 has_contains = any(op.id == 'contains' for op in self._interface.operation s)
711 template = self._template_loader.Load( 711 template = self._template_loader.Load(
712 template_file, 712 template_file,
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 1116
1117 library_emitter = self._multiemitter.FileEmitter(library_file_path) 1117 library_emitter = self._multiemitter.FileEmitter(library_file_path)
1118 library_file_dir = os.path.dirname(library_file_path) 1118 library_file_dir = os.path.dirname(library_file_path)
1119 auxiliary_dir = os.path.relpath(auxiliary_dir, library_file_dir) 1119 auxiliary_dir = os.path.relpath(auxiliary_dir, library_file_dir)
1120 imports_emitter = library_emitter.Emit( 1120 imports_emitter = library_emitter.Emit(
1121 self._template, AUXILIARY_DIR=massage_path(auxiliary_dir)) 1121 self._template, AUXILIARY_DIR=massage_path(auxiliary_dir))
1122 for path in sorted(self._path_to_emitter.keys()): 1122 for path in sorted(self._path_to_emitter.keys()):
1123 relpath = os.path.relpath(path, library_file_dir) 1123 relpath = os.path.relpath(path, library_file_dir)
1124 imports_emitter.Emit( 1124 imports_emitter.Emit(
1125 "part '$PATH';\n", PATH=massage_path(relpath)) 1125 "part '$PATH';\n", PATH=massage_path(relpath))
OLDNEW
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | lib/html/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698