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

Unified Diff: src/compiler/node-matchers.h

Issue 1196623002: [ubsan] Fix HeapObjectMatcher to avoid invalid casts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE Created 5 years, 6 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
Index: src/compiler/node-matchers.h
diff --git a/src/compiler/node-matchers.h b/src/compiler/node-matchers.h
index d6e8c6943c07c22ad2f6bb8d49d329bb99c9bbaa..d543425fca48606a0947291dc13bda6ecaa1c9cd 100644
--- a/src/compiler/node-matchers.h
+++ b/src/compiler/node-matchers.h
@@ -152,11 +152,10 @@ typedef FloatMatcher<double, IrOpcode::kNumberConstant> NumberMatcher;
// A pattern matcher for heap object constants.
-template <typename T>
struct HeapObjectMatcher final
- : public ValueMatcher<Unique<T>, IrOpcode::kHeapConstant> {
+ : public ValueMatcher<Unique<HeapObject>, IrOpcode::kHeapConstant> {
explicit HeapObjectMatcher(Node* node)
- : ValueMatcher<Unique<T>, IrOpcode::kHeapConstant>(node) {}
+ : ValueMatcher<Unique<HeapObject>, IrOpcode::kHeapConstant>(node) {}
};

Powered by Google App Engine
This is Rietveld 408576698