Changeset 205534 in webkit


Ignore:
Timestamp:
Sep 6, 2016 7:22:44 PM (8 years ago)
Author:
Yusuke Suzuki
Message:

Make JSC::PrivateName copyable
https://bugs.webkit.org/show_bug.cgi?id=161666

Reviewed by Ryosuke Niwa.

Define the custom copy constructor to make PrivateName copyable while using Ref<SymbolImpl>.
And since the custom copy constructor deletes the default move constructor, we explcitly define
it by = default;.

  • runtime/PrivateName.h:

(JSC::PrivateName::PrivateName):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r205528 r205534  
     12016-09-06  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        Make JSC::PrivateName copyable
     4        https://bugs.webkit.org/show_bug.cgi?id=161666
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Define the custom copy constructor to make PrivateName copyable while using Ref<SymbolImpl>.
     9        And since the custom copy constructor deletes the default move constructor, we explcitly define
     10        it by `= default;`.
     11
     12        * runtime/PrivateName.h:
     13        (JSC::PrivateName::PrivateName):
     14
    1152016-09-06  Daniel Bates  <dabates@apple.com>
    216
  • trunk/Source/JavaScriptCore/runtime/PrivateName.h

    r205335 r205534  
    4949    }
    5050
     51    PrivateName(const PrivateName& privateName)
     52        : m_uid(privateName.m_uid.copyRef())
     53    {
     54    }
     55
     56    PrivateName(PrivateName&&) = default;
     57
    5158    SymbolImpl& uid() const { return const_cast<SymbolImpl&>(m_uid.get()); }
    5259
Note: See TracChangeset for help on using the changeset viewer.