Commit a4c23cae authored by Omer Katz's avatar Omer Katz Committed by Commit Bot

Fix HashTraits<blink::PropertyHandle>

HashTraits<blink::PropertyHandle>'s IsDeketedValue method was declared
as accepting blink::PropertyHandle. The argument should have been
const blink::PropertyHandle& (as it is in the parent class).
As a result, when trying to use this method, PropertyHandle was copied
resulting in a crash when traced by concurrent markers.

Bug: 986235
Change-Id: I0f29d37453f5c948bfd6e041e2979c9dbe144366
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764157Reviewed-by: default avatarMichael Lippautz <mlippautz@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689455}
parent 7c77403d
...@@ -100,7 +100,7 @@ class CORE_EXPORT PropertyHandle { ...@@ -100,7 +100,7 @@ class CORE_EXPORT PropertyHandle {
return PropertyHandle(kHandleDeletedValueForHashTraits); return PropertyHandle(kHandleDeletedValueForHashTraits);
} }
bool IsDeletedValueForHashTraits() { bool IsDeletedValueForHashTraits() const {
return handle_type_ == kHandleDeletedValueForHashTraits; return handle_type_ == kHandleDeletedValueForHashTraits;
} }
...@@ -143,7 +143,7 @@ struct HashTraits<blink::PropertyHandle> ...@@ -143,7 +143,7 @@ struct HashTraits<blink::PropertyHandle>
new (NotNull, &slot) blink::PropertyHandle( new (NotNull, &slot) blink::PropertyHandle(
blink::PropertyHandle::DeletedValueForHashTraits()); blink::PropertyHandle::DeletedValueForHashTraits());
} }
static bool IsDeletedValue(blink::PropertyHandle value) { static bool IsDeletedValue(const blink::PropertyHandle& value) {
return value.IsDeletedValueForHashTraits(); return value.IsDeletedValueForHashTraits();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment