Summary: | [WHLSL] Add a helper for in-place AST mutation | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> | ||||||
Component: | WebGPU | Assignee: | Saam Barati <saam> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, jfbastien, saam, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | Other | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Myles C. Maxfield
2019-05-23 00:30:13 PDT
patch forthcoming Created attachment 370510 [details]
patch
Comment on attachment 370510 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=370510&action=review > Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLNode.h:56 > + return new (&old) New(std::forward<Args>(args)...); Don’t you have to save the address of “old” before you call its destructor? (In reply to Myles C. Maxfield from comment #3) > Comment on attachment 370510 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=370510&action=review > > > Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLNode.h:56 > > + return new (&old) New(std::forward<Args>(args)...); > > Don’t you have to save the address of “old” before you call its destructor? Spoke with Myles offline. This code is probably fine (since dtor is just a method call), but we're just going to be explicit and do it before. Created attachment 370512 [details]
patch for landing
Comment on attachment 370512 [details] patch for landing Clearing flags on attachment: 370512 Committed r245706: <https://trac.webkit.org/changeset/245706> All reviewed patches have been landed. Closing bug. |