Bug 140718 - [FreeType] Calling the assignment operator from inside a copy constructor on FontPlatformDataFreeType
Summary: [FreeType] Calling the assignment operator from inside a copy constructor on ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-20 22:50 PST by byeongha.cho
Modified: 2017-03-11 10:52 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description byeongha.cho 2015-01-20 22:50:51 PST
Assignment operator is called on copy constructor for FontPlatformData.

It isn't a good idiom. So we need to refactor it.
Comment 1 Michael Catanzaro 2016-11-12 14:20:57 PST
(In reply to comment #0)
> It isn't a good idiom.

Why not? How would you improve it?

The copy assignment operator is not virtual, so it should be safe.
Comment 2 byeongha.cho 2016-11-13 18:03:10 PST
Calling the assignment operator from inside a copy constructor isn't a good idiom because the former only applies to a fully initialized object and the latter initializes a new object.
Please refer https://bugs.webkit.org/show_bug.cgi?id=136327