WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
177817
Allow assigning WeakPtr<Derived> to WeakPtr<Base>
https://bugs.webkit.org/show_bug.cgi?id=177817
Summary
Allow assigning WeakPtr<Derived> to WeakPtr<Base>
Antti Koivisto
Reported
2017-10-03 08:14:12 PDT
More templates!
Attachments
patch
(5.87 KB, patch)
2017-10-03 08:19 PDT
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
patch
(6.23 KB, patch)
2017-10-03 08:23 PDT
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
patch
(6.23 KB, patch)
2017-10-03 08:25 PDT
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
patch
(6.28 KB, patch)
2017-10-03 08:33 PDT
,
Antti Koivisto
ggaren
: review+
Details
Formatted Diff
Diff
patch
(6.82 KB, patch)
2017-10-03 09:41 PDT
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
patch
(6.81 KB, patch)
2017-10-03 10:13 PDT
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2017-10-03 08:19:51 PDT
Created
attachment 322519
[details]
patch
Antti Koivisto
Comment 2
2017-10-03 08:23:41 PDT
Created
attachment 322521
[details]
patch
Antti Koivisto
Comment 3
2017-10-03 08:25:56 PDT
Created
attachment 322523
[details]
patch
Antti Koivisto
Comment 4
2017-10-03 08:33:39 PDT
Created
attachment 322525
[details]
patch
Geoffrey Garen
Comment 5
2017-10-03 08:38:20 PDT
Comment on
attachment 322525
[details]
patch r=me Now that it's in five places, I think it's time to make a helper function that does the static_assert and reinterpret_cast on WeakReference<T>. Maybe call it static_weak_pointer_cast.
Antti Koivisto
Comment 6
2017-10-03 09:41:29 PDT
Created
attachment 322536
[details]
patch
Antti Koivisto
Comment 7
2017-10-03 09:42:29 PDT
I added two helpers called weak_reference_downcast and weak_reference_upcast (the static_assert is the other way round).
Antti Koivisto
Comment 8
2017-10-03 10:13:25 PDT
Created
attachment 322539
[details]
patch
Antti Koivisto
Comment 9
2017-10-03 11:49:35 PDT
https://trac.webkit.org/r222793
Radar WebKit Bug Importer
Comment 10
2017-10-03 11:50:33 PDT
<
rdar://problem/34795432
>
Geoffrey Garen
Comment 11
2017-10-03 11:58:25 PDT
Nice!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug