[webkit-reviews] review denied: [Bug 214809] -Wdeprecated-copy caused by DisallowVMEntry copy constructor : [Attachment 405257] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 26 12:44:44 PDT 2020


Darin Adler <darin at apple.com> has denied Michael Catanzaro
<mcatanzaro at gnome.org>'s request for review:
Bug 214809: -Wdeprecated-copy caused by DisallowVMEntry copy constructor
https://bugs.webkit.org/show_bug.cgi?id=214809

Attachment 405257: Patch

https://bugs.webkit.org/attachment.cgi?id=405257&action=review




--- Comment #8 from Darin Adler <darin at apple.com> ---
Comment on attachment 405257
  --> https://bugs.webkit.org/attachment.cgi?id=405257
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=405257&action=review

> Source/JavaScriptCore/runtime/DisallowVMEntry.h:55
> +	   m_vm = other.m_vm;
> +	   m_vm->disallowVMEntryCount++;

This is wrong. Needs to decrement the disallowVMEntryCount of the m_vm we are
already pointing at. I suggest writing it in this more or less foolproof way
instead:

    auto copy = other;
    std::swap(m_vm, copy.m_vm);

Or you could add lines to this function:

    RELEASE_ASSERT(m_vm->disallowVMEntryCount);
    m_vm->disallowVMEntryCount--;


More information about the webkit-reviews mailing list