Bug 194045

Summary: CachedBytecode move constructor should not call `freeDataIfOwned`
Product: WebKit Reporter: Tadeu Zagallo <tzagallo>
Component: JavaScriptCoreAssignee: Tadeu Zagallo <tzagallo>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, ews-watchlist, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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=.