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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/TraceWrapperMember.h

Issue 2567463003: [wrapper-tracing] Fix write barrier in copy ctor (Closed)
Patch Set: Created 4 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/TraceWrapperMember.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/TraceWrapperMember.h b/third_party/WebKit/Source/bindings/core/v8/TraceWrapperMember.h
index 39b25602ae48d5ab737c80c0c0996c2dc412209b..c5290f80a17ffb578506eb9040547e67c648953b 100644
--- a/third_party/WebKit/Source/bindings/core/v8/TraceWrapperMember.h
+++ b/third_party/WebKit/Source/bindings/core/v8/TraceWrapperMember.h
@@ -39,8 +39,7 @@ class TraceWrapperMember : public Member<T> {
*/
TraceWrapperMember(const TraceWrapperMember& other) { *this = other; }
Michael Lippautz 2016/12/09 14:46:55 The copy ctor did not forward to the explicitly de
- template <typename U>
Michael Lippautz 2016/12/09 14:46:55 There's no sense in a different type U here.
- TraceWrapperMember& operator=(const TraceWrapperMember<U>& other) {
+ TraceWrapperMember& operator=(const TraceWrapperMember& other) {
DCHECK(other.m_parent);
m_parent = other.m_parent;
Member<T>::operator=(other);
@@ -48,16 +47,14 @@ class TraceWrapperMember : public Member<T> {
return *this;
}
- template <typename U>
- TraceWrapperMember& operator=(const Member<U>& other) {
+ TraceWrapperMember& operator=(const Member<T>& other) {
DCHECK(!traceWrapperMemberIsNotInitialized());
Member<T>::operator=(other);
ScriptWrappableVisitor::writeBarrier(m_parent, other);
return *this;
}
- template <typename U>
- TraceWrapperMember& operator=(U* other) {
+ TraceWrapperMember& operator=(T* other) {
DCHECK(!traceWrapperMemberIsNotInitialized());
Member<T>::operator=(other);
ScriptWrappableVisitor::writeBarrier(m_parent, other);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698