Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp

Issue 968143002: BlinkGCPlugin: Fix detection of trace dispatching after inlined tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/clang/blink_gc_plugin/Config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
diff --git a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
index 41e694dcd8538c43f22c43bbfcc489248a1b6e82..dc36bef4145e325e87d5553d339eaeb673e33cc2 100644
--- a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
+++ b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
@@ -315,6 +315,20 @@ class CheckDispatchVisitor : public RecursiveASTVisitor<CheckDispatchVisitor> {
return true;
}
+ bool VisitUnresolvedMemberExpr(UnresolvedMemberExpr* member) {
+ for (Decl* decl : member->decls()) {
+ if (CXXMethodDecl* method = dyn_cast<CXXMethodDecl>(decl)) {
+ if (method->getParent() == receiver_->record() &&
+ Config::GetTraceMethodType(method) ==
+ Config::TRACE_AFTER_DISPATCH_METHOD) {
+ dispatched_to_receiver_ = true;
+ return true;
+ }
+ }
+ }
+ return true;
+ }
+
private:
RecordInfo* receiver_;
bool dispatched_to_receiver_;
@@ -1407,7 +1421,8 @@ class BlinkGCPluginConsumer : public ASTConsumer {
// Determine what type of tracing method this is (dispatch or trace).
void CheckTraceOrDispatchMethod(RecordInfo* parent, CXXMethodDecl* method) {
Config::TraceMethodType trace_type = Config::GetTraceMethodType(method);
- if (trace_type != Config::TRACE_METHOD ||
+ if (trace_type == Config::TRACE_AFTER_DISPATCH_METHOD ||
+ trace_type == Config::TRACE_AFTER_DISPATCH_IMPL_METHOD ||
!parent->GetTraceDispatchMethod()) {
CheckTraceMethod(parent, method, trace_type);
}
« no previous file with comments | « no previous file | tools/clang/blink_gc_plugin/Config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698