Bug 194045 - CachedBytecode move constructor should not call `freeDataIfOwned`
Summary: CachedBytecode move constructor should not call `freeDataIfOwned`
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tadeu Zagallo
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-30 13:51 PST by Tadeu Zagallo
Modified: 2019-02-01 08:25 PST (History)
8 users (show)

See Also:


Attachments
Patch (1.42 KB, patch)
2019-01-30 13:53 PST, Tadeu Zagallo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tadeu Zagallo 2019-01-30 13:51:43 PST
That might result in freeing a garbage value
Comment 1 Tadeu Zagallo 2019-01-30 13:53:12 PST
Created attachment 360615 [details]
Patch
Comment 2 Mark Lam 2019-01-30 14:02:51 PST
Comment on attachment 360615 [details]
Patch

r=me
Comment 3 WebKit Commit Bot 2019-01-30 14:56:52 PST
Comment on attachment 360615 [details]
Patch

Clearing flags on attachment: 360615

Committed r240732: <https://trac.webkit.org/changeset/240732>
Comment 4 WebKit Commit Bot 2019-01-30 14:56:53 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2019-01-30 14:57:30 PST
<rdar://problem/47682823>
Comment 6 Darin Adler 2019-02-01 08:25:32 PST
Just a meta-note about the mistake that led to this bug.

Generally speaking in any non-trivial cases, we can implement operator= by calling the constructor in an appropriate way, and that's often a good pattern, but it's typically not good in such cases to attempt to implement a constructor by calling operator=.