Changeset 207278 in webkit
- Timestamp:
- Oct 12, 2016 10:21:14 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r207277 r207278 1 2016-10-12 Chris Dumez <cdumez@apple.com> 2 3 The bindings generator should provide a better error message when it does not find a dictionary definition 4 https://bugs.webkit.org/show_bug.cgi?id=163377 5 6 Reviewed by Ryosuke Niwa. 7 8 The bindings generator should provide a better error message when it does 9 not find a dictionary definition. 10 11 * bindings/scripts/CodeGenerator.pm: 12 (GetDictionaryByName): 13 * bindings/scripts/CodeGeneratorJS.pm: 14 (assert): 15 (GenerateDictionaryImplementationContent): 16 (GenerateHeader): 17 (GenerateDictionaryHeader): 18 1 19 2016-10-12 Chris Dumez <cdumez@apple.com> 2 20 -
trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm
r207150 r207278 475 475 { 476 476 my ($object, $name) = @_; 477 returnunless defined($name);477 die "GetDictionaryByName() was called with an undefined dictionary name" unless defined($name); 478 478 479 479 for my $dictionary (@{$useDocument->dictionaries}) { -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r207277 r207278 34 34 use strict; 35 35 use constant FileNamePrefix => "JS"; 36 use Carp qw<longmess>; 37 use Data::Dumper; 36 38 use Hasher; 37 39 … … 108 110 EOF 109 111 112 sub assert 113 { 114 my $message = shift; 115 116 my $mess = longmess(); 117 print Dumper($mess); 118 119 die $message; 120 } 121 110 122 # Default constructor 111 123 sub new … … 1093 1105 my @dictionaries; 1094 1106 push(@dictionaries, $dictionary); 1095 my $parentDictionary = $codeGenerator->GetDictionaryByName($dictionary->parent); 1096 while (defined($parentDictionary)) { 1107 my $parentName = $dictionary->parent; 1108 while (defined($parentName)) { 1109 my $parentDictionary = $codeGenerator->GetDictionaryByName($parentName); 1110 assert("Unable to find definition for dictionary named '" . $parentName . "'!") unless defined($parentDictionary); 1097 1111 unshift(@dictionaries, $parentDictionary); 1098 $parent Dictionary = $codeGenerator->GetDictionaryByName($parentDictionary->parent);1112 $parentName = $parentDictionary->parent; 1099 1113 } 1100 1114 … … 1742 1756 }, 0); 1743 1757 for my $dictionary (@$dictionaries) { 1744 my $parentDictionary = $dictionary->parent; 1745 while (defined($parentDictionary)) { 1746 push(@ancestors, $parentDictionary) if $codeGenerator->IsExternalDictionaryType($parentDictionary); 1747 $parentDictionary = $codeGenerator->GetDictionaryByName($parentDictionary)->parent; 1758 my $parentName = $dictionary->parent; 1759 while (defined($parentName)) { 1760 push(@ancestors, $parentName) if $codeGenerator->IsExternalDictionaryType($parentName); 1761 my $parentDictionary = $codeGenerator->GetDictionaryByName($parentName); 1762 assert("Unable to find definition for dictionary named '" . $parentName . "'!") unless defined($parentDictionary); 1763 $parentName = $parentDictionary->parent; 1748 1764 } 1749 1765 } … … 4376 4392 if ($writeDependencies) { 4377 4393 my @ancestors; 4378 my $parentDictionary = $dictionary->parent; 4379 while (defined($parentDictionary)) { 4380 push(@ancestors, $parentDictionary) if $codeGenerator->IsExternalDictionaryType($parentDictionary); 4381 $parentDictionary = $codeGenerator->GetDictionaryByName($parentDictionary)->parent; 4394 my $parentName = $dictionary->parent; 4395 while (defined($parentName)) { 4396 push(@ancestors, $parentName) if $codeGenerator->IsExternalDictionaryType($parentName); 4397 my $parentDictionary = $codeGenerator->GetDictionaryByName($parentName); 4398 assert("Unable to find definition for dictionary named '" . $parentName . "'!") unless $parentDictionary; 4399 $parentName = $parentDictionary->parent; 4382 4400 } 4383 4401 push(@depsContent, "$className.h : ", join(" ", map { "$_.idl" } @ancestors), "\n");
Note: See TracChangeset
for help on using the changeset viewer.