-
Jeremy Roman authored
It's a common and difficult to debug pitfall when you derive a GC mixin but fail to use this macro. It leads to confusing crashes during tracing. With this CL, the compiler will emit a warning like this: In file included from ../../third_party/blink/renderer/core/html/portal/document_portals.cc:5: ../../third_party/blink/renderer/core/html/portal/document_portals.h:17:25: error: [blink-gc] Garbage-collected class 'DocumentPortals' derives mixin class 'Supplement<blink::Document>'. You must add USING_GARBAGE_COLLECTED_MIXIN(DocumentPortals). public Supplement<Document> { ~~~~~~~^~~~~~~~~~~~~~~~~~~~ ../../third_party/blink/renderer/platform/supplementable.h:119:27: note: [blink-gc] Mixin base class derived here: class Supplement : public GarbageCollectedMixin { ~~~~~~~^~~~~~~~~~~~~~~~~~~~~ 1 error generated. Bug: 869498 Change-Id: I93454c418d53ebe0fcd411e0a829597dd9aaf925 Reviewed-on: https://chromium-review.googlesource.com/c/1340784 Commit-Queue: Jeremy Roman <jbroman@chromium.org> Reviewed-by:Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#609280}
30bc14da