diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-11-03 18:21:56 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-03 19:14:34 +0100 |
commit | 060ddd2a7a33b6d68696d39f0cdc8b81a9b4da99 (patch) | |
tree | 38b0b68f999744a00a71b23c93bd17412ef68f16 /Libraries/LibWeb/LayoutTreeModel.cpp | |
parent | 565a26808dc187eef256020dc32de13458f37716 (diff) | |
download | serenity-060ddd2a7a33b6d68696d39f0cdc8b81a9b4da99.zip |
AK: Really disallow making OwnPtrs from refcounted types
This looks at three things:
- if the type has a typedef `AllowOwnPtr', respect that
- if not, disallow construction if both of `ref()' and `unref()' are
present.
Note that in the second case, if a type only defines `ref()' or only
defines `unref()', an OwnPtr can be created, as a RefPtr of that type
would be ill-formed.
Also marks a `Performance' to explicitly allow OwnPtrs.
Diffstat (limited to 'Libraries/LibWeb/LayoutTreeModel.cpp')
0 files changed, 0 insertions, 0 deletions