Commit faf0c664 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[oilpan] Avoid write barrier on initilizing stores

Initializing stores (through constructors) can assume that objects are
not yet marked and thus don't require write barriers.

This CL breaks placement new for Member which can violate the assumption
that the enclosing object is white. A follow up will fix this.

Bug: chromium:757440, chromium:790691
Change-Id: Id0ef91ba1887837593603eaf73f56a127f8fda0a
Reviewed-on: https://chromium-review.googlesource.com/812344
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522303}
parent 6475c17c
...@@ -196,8 +196,12 @@ class Member : public MemberBase<T, TracenessMemberConfiguration::kTraced> { ...@@ -196,8 +196,12 @@ class Member : public MemberBase<T, TracenessMemberConfiguration::kTraced> {
public: public:
Member() : Parent() {} Member() : Parent() {}
Member(std::nullptr_t) : Parent(nullptr) {} Member(std::nullptr_t) : Parent(nullptr) {}
Member(T* raw) : Parent(raw) { WriteBarrier(this->raw_); } Member(T* raw) : Parent(raw) {
Member(T& raw) : Parent(raw) { WriteBarrier(this->raw_); } // No write barrier for initializing stores.
}
Member(T& raw) : Parent(raw) {
// No write barrier for initializing stores.
}
Member(WTF::HashTableDeletedValueType x) : Parent(x) {} Member(WTF::HashTableDeletedValueType x) : Parent(x) {}
Member(const Member& other) : Parent(other) { WriteBarrier(this->raw_); } Member(const Member& other) : Parent(other) { WriteBarrier(this->raw_); }
......
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