[Webkit-unassigned] [Bug 32363] New: [Chromium] Disallow assignment of WebVector<T> to WebVector<T>
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 10 00:28:52 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=32363
Summary: [Chromium] Disallow assignment of WebVector<T> to
WebVector<T>
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore Misc.
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: yurys at chromium.org
As comment in the top part of WebVector.h says WebVector::swap should be used
in such cases. If you write by mistake something as follows:
WebVector<WebString> a(3);
WebVector<WebString> b;
b = a;
operator= automatically generated by compiler will be invoked as it takes
precedence over template version
template <typename C>
WebVector<T>& operator=(const C& other)
The default assignment operator will lead to a.m_ptr == b.m_ptr and to
destructor being called twice for the container elements. So either operator=
should have valid implementation or be disallowed explicitly.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list