Changeset 206851 in webkit


Ignore:
Timestamp:
Oct 5, 2016 11:45:34 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

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.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r206850 r206851  
     12016-10-05  Youenn Fablet  <youenn@apple.com>
     2
     3        Reuse CodeGenerator::UpdateFile in Tools CodeGenerator
     4        https://bugs.webkit.org/show_bug.cgi?id=162960
     5
     6        Reviewed by Alex Christensen.
     7
     8        No change of behavior.
     9
     10        * bindings/scripts/CodeGenerator.pm:
     11        (UpdateFile): Adding FIXME to enable lazy writing when feasible.
     12
    1132016-10-05  Michael Catanzaro  <mcatanzaro@igalia.com>
    214
  • trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm

    r206776 r206851  
    220220    my $contents = shift;
    221221
     222    # FIXME: We should only write content if it is different from what is in the file.
     223    # But that would mean running more often the binding generator, see https://bugs.webkit.org/show_bug.cgi?id=131756
    222224    open FH, ">", $fileName or die "Couldn't open $fileName: $!\n";
    223225    print FH $contents;
  • trunk/Tools/ChangeLog

    r206842 r206851  
     12016-10-05  Youenn Fablet  <youenn@apple.com>
     2
     3        Reuse CodeGenerator::UpdateFile in Tools CodeGenerator
     4        https://bugs.webkit.org/show_bug.cgi?id=162960
     5
     6        Reviewed by Alex Christensen.
     7
     8        * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:
     9        (WriteData): Using CodeGenerator::UpdateFile to do lazy generated file update when it is made feasible.
     10        * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
     11        (WriteData): Ditto.
     12
    1132016-10-05  Alex Christensen  <achristensen@webkit.org>
    214
  • trunk/Tools/DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm

    r204877 r206851  
    5050
    5151    foreach my $file ($self->_generateHeaderFile($interface), $self->_generateImplementationFile($interface)) {
    52         open(FILE, ">", File::Spec->catfile($outputDir, $$file{name})) or die "Failed to open $$file{name} for writing: $!";
    53         print FILE @{$$file{contents}};
    54         close(FILE) or die "Failed to close $$file{name} after writing: $!";
     52        $$self{codeGenerator}->UpdateFile(File::Spec->catfile($outputDir, $$file{name}), join("", @{$$file{contents}}));
    5553    }
    5654}
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm

    r181693 r206851  
    5151
    5252    foreach my $file ($self->_generateHeaderFile($interface), $self->_generateImplementationFile($interface)) {
    53         open(FILE, ">", File::Spec->catfile($outputDir, $$file{name})) or die "Failed to open $$file{name} for writing: $!";
    54         print FILE @{$$file{contents}};
    55         close(FILE) or die "Failed to close $$file{name} after writing: $!";
     53        $$self{codeGenerator}->UpdateFile(File::Spec->catfile($outputDir, $$file{name}), join("", @{$$file{contents}}));
    5654    }
    5755}
Note: See TracChangeset for help on using the changeset viewer.