RESOLVED FIXED 191193
Metadata should not be copyable
https://bugs.webkit.org/show_bug.cgi?id=191193
Summary Metadata should not be copyable
Tadeu Zagallo
Reported 2018-11-02 08:03:45 PDT
...
Attachments
Patch (3.75 KB, patch)
2018-11-02 08:07 PDT, Tadeu Zagallo
no flags
Tadeu Zagallo
Comment 1 2018-11-02 08:07:07 PDT
Keith Miller
Comment 2 2018-11-02 08:09:26 PDT
r=me.
WebKit Commit Bot
Comment 3 2018-11-02 08:47:04 PDT
Comment on attachment 353702 [details] Patch Clearing flags on attachment: 353702 Committed r237734: <https://trac.webkit.org/changeset/237734>
WebKit Commit Bot
Comment 4 2018-11-02 08:47:06 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 5 2018-11-02 08:48:33 PDT
David Kilzer (:ddkilzer)
Comment 6 2018-11-02 09:30:19 PDT
Saam Barati
Comment 7 2018-11-03 15:37:48 PDT
Comment on attachment 353702 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353702&action=review > Source/JavaScriptCore/ChangeLog:8 > + We should only ever hold references to the entry in the metadata table. Why? What about a test for this?
Tadeu Zagallo
Comment 8 2018-11-03 23:07:06 PDT
Comment on attachment 353702 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353702&action=review >> Source/JavaScriptCore/ChangeLog:8 >> + We should only ever hold references to the entry in the metadata table. > > Why? What about a test for this? Because the metadata is mutable, so it's nice to avoid cases like in CodeBlock below, where I was accidentally copying and then mutating a local copy. You're right, I should have added a test. I'll add it now.
Mark Lam
Comment 9 2018-11-04 00:48:33 PDT
Comment on attachment 353702 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353702&action=review >>> Source/JavaScriptCore/ChangeLog:8 >>> + We should only ever hold references to the entry in the metadata table. >> >> Why? What about a test for this? > > Because the metadata is mutable, so it's nice to avoid cases like in CodeBlock below, where I was accidentally copying and then mutating a local copy. You're right, I should have added a test. I'll add it now. I think this is Saam’s way of asking you to add the “why” to the ChangeLog to document this reasoning for posterity. Can you add your explanation in the ChangeLog here, particularly the part about the sort of bugs this prevents? Thanks.
Tadeu Zagallo
Comment 10 2018-11-04 00:50:51 PDT
Comment on attachment 353702 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353702&action=review >>>> Source/JavaScriptCore/ChangeLog:8 >>>> + We should only ever hold references to the entry in the metadata table. >>> >>> Why? What about a test for this? >> >> Because the metadata is mutable, so it's nice to avoid cases like in CodeBlock below, where I was accidentally copying and then mutating a local copy. You're right, I should have added a test. I'll add it now. > > I think this is Saam’s way of asking you to add the “why” to the ChangeLog to document this reasoning for posterity. Can you add your explanation in the ChangeLog here, particularly the part about the sort of bugs this prevents? Thanks. Yeah, I thought that might be the case. Is it ok to edit a previous ChangeLog entry? Should I add a new ChangeLog entry to say that I'm editing a previous ChangeLog entry?
Saam Barati
Comment 11 2018-11-04 20:51:50 PST
(In reply to Tadeu Zagallo from comment #10) > Comment on attachment 353702 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=353702&action=review > > >>>> Source/JavaScriptCore/ChangeLog:8 > >>>> + We should only ever hold references to the entry in the metadata table. > >>> > >>> Why? What about a test for this? > >> > >> Because the metadata is mutable, so it's nice to avoid cases like in CodeBlock below, where I was accidentally copying and then mutating a local copy. You're right, I should have added a test. I'll add it now. > > > > I think this is Saam’s way of asking you to add the “why” to the ChangeLog to document this reasoning for posterity. Can you add your explanation in the ChangeLog here, particularly the part about the sort of bugs this prevents? Thanks. > > Yeah, I thought that might be the case. Is it ok to edit a previous > ChangeLog entry? Should I add a new ChangeLog entry to say that I'm editing > a previous ChangeLog entry? Sorry for the ambiguity. I did mean the “why” as a way of asking for this to be documented in the change log. Personally, I’ve never gone back and edited previous change log entries. I’m not sure what the official WebKit stance on that is. I think this bugzilla will act as a point of reference if anyone needs to dig into this more in the future. You could also document it in the changelog for the added test, but that won’t be found as easily as the original commit.
Note You need to log in before you can comment on or make changes to this bug.