Changeset 155850 in webkit
- Timestamp:
- Sep 16, 2013 5:28:59 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r155849 r155850 1 2013-09-16 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Check DOM bindings API compatibility while building 4 https://bugs.webkit.org/show_bug.cgi?id=101224 5 6 Reviewed by Gustavo Noronha Silva. 7 8 A .symbols file is now generated for every DOM binding public API 9 object. It contains the signature of all public methods. We keep a 10 single file with the signature of all public methods in the source 11 tree. When DOM bindings are generated, a new symbols file is 12 created concatenating all .symbols files generated and it's 13 compared with the symbols file in the source tree using a script 14 that checks if the changes are API compatible or not. In case of 15 API break the build finishes showing the differences found in the 16 symbol files. If API compatible changes are found, the diff is 17 shown in stdout, suggesting to run the gobject-run-api-break-test 18 with the --reset-results option to update the symbols file, and 19 the build continues. If there aren't API changes the build 20 continues silently. 21 22 * GNUmakefile.am: 23 * bindings/gobject/GNUmakefile.am: 24 * bindings/gobject/WebKitDOMCustom.symbols: Added. 25 * bindings/gobject/WebKitDOMEventTarget.symbols: Added. 26 * bindings/gobject/WebKitDOMObject.symbols: Added. 27 * bindings/gobject/webkitdom.symbols: Added. 28 * bindings/scripts/CodeGeneratorGObject.pm: 29 (GenerateFunction): 30 (WriteData): 31 * bindings/scripts/gobject-run-api-break-test: Added. 32 (check_api): 33 1 34 2013-09-16 Andreas Kling <akling@apple.com> 2 35 -
trunk/Source/WebCore/GNUmakefile.am
r155832 r155850 647 647 Source/WebCore/bindings/scripts/generate-bindings.pl \ 648 648 Source/WebCore/bindings/scripts/gobject-generate-headers.pl \ 649 Source/WebCore/bindings/scripts/gobject-run-api-break-test \ 649 650 Source/WebCore/bindings/scripts/preprocessor.pm \ 650 651 Source/WebCore/bindings/scripts/preprocess-idls.pl \ -
trunk/Source/WebCore/bindings/gobject/GNUmakefile.am
r154830 r155850 472 472 $(AM_V_GEN)echo $(gdom_class_list) | $(PERL) $< defines > $@ 473 473 474 noinst_DATA += DerivedSources/webkitdom/webkitdom.symbols 475 gdom_symbol_files := $(patsubst %.h,%.symbols, $(filter DerivedSources/webkitdom/WebKitDOM%.h, $(webkitgtk_gdom_built_h_api))) 476 477 $(top_builddir)/DerivedSources/webkitdom/WebKitDOMObject.symbols: $(WebCore)/bindings/gobject/WebKitDOMObject.symbols 478 $(AM_V_GEN)cp -f $< $@ 479 480 $(top_builddir)/DerivedSources/webkitdom/WebKitDOMEventTarget.symbols: $(WebCore)/bindings/gobject/WebKitDOMEventTarget.symbols 481 $(AM_V_GEN)cp -f $< $@ 482 483 $(top_builddir)/DerivedSources/webkitdom/WebKitDOMCustom.symbols: $(WebCore)/bindings/gobject/WebKitDOMCustom.symbols 484 $(AM_V_GEN)cp -f $< $@ 485 486 DerivedSources/webkitdom/webkitdom.symbols: $(gdom_symbol_files) $(WebCore)/bindings/gobject/webkitdom.symbols $(WebCore)/bindings/scripts/gobject-run-api-break-test 487 $(AM_V_GEN)cat $(gdom_symbol_files) > gdom-gen-symbols \ 488 && $(PYTHON) $(WebCore)/bindings/scripts/gobject-run-api-break-test $(WebCore)/bindings/gobject/webkitdom.symbols gdom-gen-symbols \ 489 && (cmp -s gdom-gen-symbols $@ || cp gdom-gen-symbols $@) \ 490 && rm -f gdom-gen-symbols 491 492 EXTRA_DIST += \ 493 $(WebCore)/bindings/gobject/WebKitDOMCustom.symbols \ 494 $(WebCore)/bindings/gobject/WebKitDOMEventTarget.symbols \ 495 $(WebCore)/bindings/gobject/WebKitDOMObject.symbols \ 496 $(WebCore)/bindings/gobject/webkitdom.symbols 497 498 CLEAN_FILES = \ 499 $(gdom_symbol_files) 500 474 501 # Because WebCore/bindings/gobject/WebKitDOMObject.h is static source but is also a distributed header 475 502 # required by other distributed headers (both static and auto-generated), need to move this to the -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm
r155784 r155850 896 896 897 897 my $functionSig = "${className}* self"; 898 my $symbolSig = "${className}*"; 898 899 899 900 my @callImplParams; … … 911 912 912 913 $functionSig .= ", ${const}$paramType $paramName"; 914 $symbolSig .= ", ${const}$paramType"; 913 915 914 916 my $paramIsGDOMType = IsGDOMClassType($paramIDLType); … … 929 931 930 932 $functionSig .= ", GError** error" if $raisesException; 933 $symbolSig .= ", GError**" if $raisesException; 934 935 push(@symbols, "$returnType $functionName($symbolSig)\n"); 931 936 932 937 # Insert introspection annotations … … 1542 1547 close(IMPL); 1543 1548 1549 # Write a symbols file. 1550 my $symbolsFileName = "$outputDir/" . $basename . ".symbols"; 1551 open(SYM, ">$symbolsFileName") or die "Couldn't open file $symbolsFileName"; 1552 print SYM @symbols; 1553 close(SYM); 1554 1544 1555 %implIncludes = (); 1545 1556 %hdrIncludes = (); … … 1552 1563 @cBodyProperties = (); 1553 1564 @cStructPriv = (); 1565 1566 @symbols = (); 1554 1567 } 1555 1568
Note: See TracChangeset
for help on using the changeset viewer.