WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
179849
downcast to WebKit::FullscreenClient can sometimes fail.
https://bugs.webkit.org/show_bug.cgi?id=179849
Summary
downcast to WebKit::FullscreenClient can sometimes fail.
Jeremy Jones
Reported
2017-11-17 16:34:03 PST
downcast to WebKit::FullscreenClient can sometimes fail.
Attachments
Patch
(2.16 KB, patch)
2017-11-17 16:38 PST
,
Jeremy Jones
darin
: review+
Details
Formatted Diff
Diff
Patch for landing.
(2.16 KB, patch)
2017-11-27 13:57 PST
,
Jeremy Jones
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jeremy Jones
Comment 1
2017-11-17 16:38:56 PST
Created
attachment 327273
[details]
Patch
Darin Adler
Comment 2
2017-11-21 09:06:17 PST
Comment on
attachment 327273
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=327273&action=review
I worry that the issue is deeper than just a bd cast. If _setFullscreenDelegate: does nothing because we are on a different fullscreen client, then the old fullscreen client might be left with the delegate still set. That could be a dangling pointer.
> Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:4778 > return nullptr;
I think this should be return nil.
Jeremy Jones
Comment 3
2017-11-27 13:55:41 PST
(In reply to Darin Adler from
comment #2
)
> Comment on
attachment 327273
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=327273&action=review
> > I worry that the issue is deeper than just a bd cast. If > _setFullscreenDelegate: does nothing because we are on a different > fullscreen client, then the old fullscreen client might be left with the > delegate still set. That could be a dangling pointer.
The various client objects are owned by the page. When the page clears those clients, those objects and references are destroyed. Looking over WKWebView, I see the same unsafe pattern that caused this crash also affects the find delegate:
https://bugs.webkit.org/show_bug.cgi?id=180054
> > > Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:4778 > > return nullptr; > > I think this should be return nil.
Done.
Jeremy Jones
Comment 4
2017-11-27 13:57:10 PST
Created
attachment 327674
[details]
Patch for landing.
WebKit Commit Bot
Comment 5
2017-11-27 14:29:36 PST
Comment on
attachment 327674
[details]
Patch for landing. Clearing flags on attachment: 327674 Committed
r225195
: <
https://trac.webkit.org/changeset/225195
>
Frédéric Wang (:fredw)
Comment 6
2018-05-23 06:42:50 PDT
Closing now since patch landed.
Radar WebKit Bug Importer
Comment 7
2018-05-23 06:43:20 PDT
<
rdar://problem/40484031
>
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