Skip to content
Permalink
Browse files
Reuse CodeGenerator::UpdateFile in Tools CodeGenerator
https://bugs.webkit.org/show_bug.cgi?id=162960

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-05
Reviewed by Alex Christensen.

Source/WebCore:

No change of behavior.

* bindings/scripts/CodeGenerator.pm:
(UpdateFile): Adding FIXME to enable lazy writing when feasible.

Tools:

* DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:
(WriteData): Using CodeGenerator::UpdateFile to do lazy generated file update when it is made feasible.
* WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
(WriteData): Ditto.

Canonical link: https://commits.webkit.org/180904@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
youennf authored and webkit-commit-queue committed Oct 6, 2016
1 parent 3f04970 commit 193110d0f39b1710485481099def39c4cdc96848
@@ -1,3 +1,15 @@
2016-10-05 Youenn Fablet <youenn@apple.com>

Reuse CodeGenerator::UpdateFile in Tools CodeGenerator
https://bugs.webkit.org/show_bug.cgi?id=162960

Reviewed by Alex Christensen.

No change of behavior.

* bindings/scripts/CodeGenerator.pm:
(UpdateFile): Adding FIXME to enable lazy writing when feasible.

2016-10-05 Michael Catanzaro <mcatanzaro@igalia.com>

[SOUP] HostTLSCertificateSet should not use SHA-1 hashes to compare certificates
@@ -219,6 +219,8 @@ sub UpdateFile
my $fileName = shift;
my $contents = shift;

# FIXME: We should only write content if it is different from what is in the file.
# But that would mean running more often the binding generator, see https://bugs.webkit.org/show_bug.cgi?id=131756
open FH, ">", $fileName or die "Couldn't open $fileName: $!\n";
print FH $contents;
close FH;
@@ -1,3 +1,15 @@
2016-10-05 Youenn Fablet <youenn@apple.com>

Reuse CodeGenerator::UpdateFile in Tools CodeGenerator
https://bugs.webkit.org/show_bug.cgi?id=162960

Reviewed by Alex Christensen.

* DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:
(WriteData): Using CodeGenerator::UpdateFile to do lazy generated file update when it is made feasible.
* WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
(WriteData): Ditto.

2016-10-05 Alex Christensen <achristensen@webkit.org>

URLParser should parse IPv4 addresses as the last two pieces of an IPv6 address
@@ -49,9 +49,7 @@ sub WriteData
my ($self, $interface, $outputDir) = @_;

foreach my $file ($self->_generateHeaderFile($interface), $self->_generateImplementationFile($interface)) {
open(FILE, ">", File::Spec->catfile($outputDir, $$file{name})) or die "Failed to open $$file{name} for writing: $!";
print FILE @{$$file{contents}};
close(FILE) or die "Failed to close $$file{name} after writing: $!";
$$self{codeGenerator}->UpdateFile(File::Spec->catfile($outputDir, $$file{name}), join("", @{$$file{contents}}));
}
}

@@ -50,9 +50,7 @@ sub WriteData
my ($self, $interface, $outputDir) = @_;

foreach my $file ($self->_generateHeaderFile($interface), $self->_generateImplementationFile($interface)) {
open(FILE, ">", File::Spec->catfile($outputDir, $$file{name})) or die "Failed to open $$file{name} for writing: $!";
print FILE @{$$file{contents}};
close(FILE) or die "Failed to close $$file{name} after writing: $!";
$$self{codeGenerator}->UpdateFile(File::Spec->catfile($outputDir, $$file{name}), join("", @{$$file{contents}}));
}
}

0 comments on commit 193110d

Please sign in to comment.