| OLD | NEW |
| 1 #!/usr/bin/perl -w | 1 #!/usr/bin/perl -w |
| 2 | 2 |
| 3 # Copyright (C) 2005, 2006, 2007, 2009 Apple Inc. All rights reserved. | 3 # Copyright (C) 2005, 2006, 2007, 2009 Apple Inc. All rights reserved. |
| 4 # Copyright (C) 2009, Julien Chaffraix <jchaffraix@webkit.org> | 4 # Copyright (C) 2009, Julien Chaffraix <jchaffraix@webkit.org> |
| 5 # Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmob
ile.com/) | 5 # Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmob
ile.com/) |
| 6 # Copyright (C) 2011 Ericsson AB. All rights reserved. | 6 # Copyright (C) 2011 Ericsson AB. All rights reserved. |
| 7 # Copyright (C) 2011 Google, Inc. All rights reserved. | 7 # Copyright (C) 2011 Google, Inc. All rights reserved. |
| 8 # | 8 # |
| 9 # Redistribution and use in source and binary forms, with or without | 9 # Redistribution and use in source and binary forms, with or without |
| 10 # modification, are permitted provided that the following conditions | 10 # modification, are permitted provided that the following conditions |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 26 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 27 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 27 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 28 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 28 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 29 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 29 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 30 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 30 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 31 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 31 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 32 | 32 |
| 33 use strict; | 33 use strict; |
| 34 | 34 |
| 35 use InFilesCompiler; | 35 use InFilesCompiler; |
| 36 | |
| 37 my %defaultParameters = ( | 36 my %defaultParameters = ( |
| 38 'namespace' => 0 | 37 'namespace' => 0 |
| 39 ); | 38 ); |
| 40 | 39 |
| 41 sub defaultItemFactory | 40 sub defaultItemFactory |
| 42 { | 41 { |
| 43 return ( | 42 return ( |
| 44 'interfaceName' => 0, | 43 'interfaceName' => 0, |
| 45 'conditional' => 0 | 44 'conditional' => 0 |
| 46 ); | 45 ); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 136 |
| 138 my $outputFile = "$outputDir/ExceptionCodeDescription.cpp"; | 137 my $outputFile = "$outputDir/ExceptionCodeDescription.cpp"; |
| 139 | 138 |
| 140 open F, ">$outputFile" or die "Failed to open file: $!"; | 139 open F, ">$outputFile" or die "Failed to open file: $!"; |
| 141 | 140 |
| 142 print F $InCompiler->license(); | 141 print F $InCompiler->license(); |
| 143 | 142 |
| 144 print F "#include \"config.h\"\n"; | 143 print F "#include \"config.h\"\n"; |
| 145 print F "#include \"ExceptionCodeDescription.h\"\n"; | 144 print F "#include \"ExceptionCodeDescription.h\"\n"; |
| 146 print F "\n"; | 145 print F "\n"; |
| 147 print F "#include \"ExceptionCode.h\"\n"; | 146 print F "#include \"core/dom/ExceptionCode.h\"\n"; |
| 148 | 147 |
| 149 for my $exceptionType (sort keys %parsedItems) { | 148 for my $exceptionType (sort keys %parsedItems) { |
| 150 my $conditional = $parsedItems{$exceptionType}{"conditional"}; | 149 my $conditional = $parsedItems{$exceptionType}{"conditional"}; |
| 151 | 150 |
| 152 print F "#if ENABLE($conditional)\n" if $conditional; | 151 print F "#if ENABLE($conditional)\n" if $conditional; |
| 153 my $path = "$exceptionType.h"; | 152 my $path = "$exceptionType.h"; |
| 154 $path = $parsedItemPaths{$exceptionType} . "/" . $path if defined($parse
dItemPaths{$exceptionType}); | 153 $path = $parsedItemPaths{$exceptionType} . "/" . $path if defined($parse
dItemPaths{$exceptionType}); |
| 155 print F "#include \"$path\"\n"; | 154 print F "#include \"$path\"\n"; |
| 156 print F "#endif\n" if $conditional; | 155 print F "#endif\n" if $conditional; |
| 157 } | 156 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 186 | 185 |
| 187 print F " if (DOMCoreException::initializeDescription(ec, this))\n"; | 186 print F " if (DOMCoreException::initializeDescription(ec, this))\n"; |
| 188 print F " return;\n"; | 187 print F " return;\n"; |
| 189 print F " ASSERT_NOT_REACHED();\n"; | 188 print F " ASSERT_NOT_REACHED();\n"; |
| 190 print F "}\n"; | 189 print F "}\n"; |
| 191 print F "\n"; | 190 print F "\n"; |
| 192 print F "} // namespace WebCore\n"; | 191 print F "} // namespace WebCore\n"; |
| 193 | 192 |
| 194 close F; | 193 close F; |
| 195 } | 194 } |
| OLD | NEW |