[fidlcat] Fix issue with interface vector resizing.
When the number of interfaces grows, the vector containing the interfaces grows with it. This involves the interface being moved. When you generate an interface for the first time, each interface method is given a pointer to the enclosing interface. When the interface vector is resized, the interface method's pointer is dangling. This CL fixes the issue in two ways: - The move constructor for the interface now creates an updated interface method instead of reusing the old one. - Interface vector initialization now reserves enough space for all of the interfaces, so that moves will no longer be necessary. Change-Id: Ifa4c51f21bb3dc194695d5af5029a46b862ae907
Showing
- tools/fidlcat/lib/BUILD.gn 12 additions, 0 deletionstools/fidlcat/lib/BUILD.gn
- tools/fidlcat/lib/generate_test_includes.sh 7 additions, 1 deletiontools/fidlcat/lib/generate_test_includes.sh
- tools/fidlcat/lib/library_loader.cc 28 additions, 2 deletionstools/fidlcat/lib/library_loader.cc
- tools/fidlcat/lib/library_loader.h 30 additions, 4 deletionstools/fidlcat/lib/library_loader.h
- tools/fidlcat/lib/library_loader_test.cc 41 additions, 15 deletionstools/fidlcat/lib/library_loader_test.cc
- tools/fidlcat/lib/testdata/sys.test.fidl 380 additions, 0 deletionstools/fidlcat/lib/testdata/sys.test.fidl
Loading
Please register or sign in to comment