New issue
Advanced search Search tips

Issue 652966 link

Starred by 0 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

GC plugin cannot handle inheritance with template

Project Member Reported by yhirano@chromium.org, Oct 5 2016

Issue description

See https://codereview.chromium.org/2399433002/.

The following code should be compiled, but it's not.

class X : public GarbageCollectedMixin {
 public:
  DEFINE_INLINE_VIRTUAL_TRACE() {}
};

template <typename T>
class Y : public T {
 public:
  DEFINE_INLINE_TRACE() { T::trace(visitor); }
};

class Z final : public GarbageCollectedFinalized<Z>, public Y<X> {
  USING_GARBAGE_COLLECTED_MIXIN(Z);

 public:
  ~Z() {}
  DEFINE_INLINE_TRACE() { Y<X>::trace(visitor); }
};


/b/c/cipd/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/WebKit/Source/modules/unit_tests/BodyStreamBufferTest.o.d -DV8_DEPRECATION_WARNINGS -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DDCHECK_ALWAYS_ON=1 -DNO_TCMALLOC -DUSE_EXTERNAL_POPUP_MENU=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DUSE_PROPRIETARY_CODECS -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=282487-1 -DCR_XCODE_VERSION=0511 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBLINK_IMPLEMENTATION=1 -DINSIDE_BLINK -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=1 -DSK_IGNORE_DW_GRAY_FIX -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1 -DSK_BUILD_FOR_MAC -DUNIT_TEST -DENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -DENABLE_OILPAN=1 -DWTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -DWTF_USE_ICCJPEG=1 -DWTF_USE_QCMSLIB=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DANGLE_ENABLE_RELEASE_ASSERTS -DLIBXSLT_STATIC -DENABLE_WEBSOCKETS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DUSE_LIBJPEG_TURBO=1 -I../.. -Igen -I../../third_party/WebKit/Source -I../../third_party/WebKit -Igen/blink -Igen/third_party/WebKit -I../../third_party/khronos -I../../gpu -I../../third_party/libwebp -I../../testing/gtest/include -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../testing/gmock_custom -I../../testing/gmock/include -I../../third_party/WebKit/Source -Igen/blink -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/angle/include -I../../third_party/angle/src/common/third_party/numerics -Igen/angle -I../../third_party/iccjpeg -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/libxml/src/include -I../../third_party/libxml/mac/include -I../../third_party/libxslt -I../../third_party/ots/include -I../../third_party/qcms/src -I../../third_party/snappy/src -I../../third_party/snappy/mac -I../../v8/include -Igen/v8/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/boringssl/src/include -I../../third_party/libjpeg_turbo -fno-strict-aliasing -fstack-protector -fcolor-diagnostics -arch x86_64 -Wall -Werror -Wextra -Wpartial-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -O2 -g1 -isysroot /b/c/b/mac/src/build/mac_files/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.7 -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Wheader-hygiene -Wstring-conversion -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.dylib -Xclang -add-plugin -Xclang blink-gc-plugin -DLIBXML_STATIC= -fno-threadsafe-statics -fvisibility-inlines-hidden -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -include obj/third_party/WebKit/Source/modules/unit_tests/Prefix.h-cc -c ../../third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp -o obj/third_party/WebKit/Source/modules/unit_tests/BodyStreamBufferTest.o
../../third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp:78:3: error: [blink-gc] Base class 'X' of derived class 'Y<blink::(anonymous namespace)::X>' requires tracing.
  DEFINE_INLINE_TRACE() { T::trace(visitor); }
  ^
../../third_party/WebKit/Source/platform/heap/Visitor.h:129:31: note: expanded from macro 'DEFINE_INLINE_TRACE'
#define DEFINE_INLINE_TRACE() DEFINE_INLINE_TRACE_IMPL(EMPTY_MACRO_ARGUMENT)
                              ^
../../third_party/WebKit/Source/platform/heap/Visitor.h:92:3: note: expanded from macro 'DEFINE_INLINE_TRACE_IMPL'
  inline void traceImpl(VisitorDispatcher visitor)
  ^

 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9ecc892ac9840a973d568a36afd446a38c3a3b15

commit 9ecc892ac9840a973d568a36afd446a38c3a3b15
Author: Nate Chapin <japhet@chromium.org>
Date: Thu Dec 07 00:37:27 2017

Merge ResourceOwner into ResourceClient

This changes ResourceClient to hold a Member<Resource> as ResourceOwner did. Existing
ResourceOwner subclasses can just switch to the appropriate ResourceClient subclass.
Classes that were using a ResourceClient directly no longer need to hold their own
Member<Resource> and can instead use SetResource/ClearResource/GetResource,
implemented in ResourceClient, to manage the resource.

Bug:  790778 , 652966
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Id21231355a12a27e1241c87dbb153c2a8629de8e
Reviewed-on: https://chromium-review.googlesource.com/794370
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522275}
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/css/RemoteFontFaceSource.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/css/StyleRuleImport.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/css/StyleRuleImport.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/dom/ClassicPendingScript.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/dom/ProcessingInstruction.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/dom/ScriptLoader.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/html/LinkStyle.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/html/LinkStyle.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/html/imports/HTMLImportLoader.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/html/imports/HTMLImportLoader.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/DocumentLoader.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/LinkLoader.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/TextTrackLoader.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/TextTrackLoader.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/modulescript/DocumentModuleScriptFetcher.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/modulescript/DocumentModuleScriptFetcher.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/resource/DocumentResource.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/resource/FontResource.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/resource/ImageResource.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/resource/LinkFetchResource.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/resource/MockFontResourceClient.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/resource/MockFontResourceClient.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/resource/ScriptResource.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/loader/resource/TextResource.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/core/svg/SVGUseElement.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/platform/loader/BUILD.gn
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/platform/loader/fetch/RawResource.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/platform/loader/fetch/ResourceClient.h
[modify] https://crrev.com/9ecc892ac9840a973d568a36afd446a38c3a3b15/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp
[delete] https://crrev.com/6ed26f014f76f10e76e80636027a2db9dcbe1664/third_party/WebKit/Source/platform/loader/fetch/ResourceOwner.h

Status: Available (was: Untriaged)

Sign in to add a comment