WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
115498
Null check plugInClient earlier in snapshotting path
https://bugs.webkit.org/show_bug.cgi?id=115498
Summary
Null check plugInClient earlier in snapshotting path
Joseph Pecoraro
Reported
2013-05-01 16:24:12 PDT
If autostartOriginPlugInSnapshottingEnabled is enabled and there is no pluginClient snapshotting crashes. Add a null check to avoid a crash. Later on in the function there is a null check for this pluginClient as well.
Attachments
[PATCH] Proposed Fix
(1.71 KB, patch)
2013-05-01 16:27 PDT
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Joseph Pecoraro
Comment 1
2013-05-01 16:27:25 PDT
Created
attachment 200252
[details]
[PATCH] Proposed Fix I'm not very familiar with this path, but this crash certainly seems possible (a port that doesn't set a plugin in client but has snapshotting enabled because the Setting is enabled by default). We should be resilient in such cases and not crash. Maybe it makes sense to ASSERT at some other point that a plugin client is set.
Darin Adler
Comment 2
2013-05-01 17:10:31 PDT
Comment on
attachment 200252
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=200252&action=review
> Source/WebCore/html/HTMLPlugInImageElement.cpp:648 > - if (document()->page()->settings()->autostartOriginPlugInSnapshottingEnabled() && document()->page()->plugInClient()->shouldAutoStartFromOrigin(document()->page()->mainFrame()->document()->baseURL().host(), url.host(), loadedMimeType())) { > + if (document()->page()->settings()->autostartOriginPlugInSnapshottingEnabled() && document()->page()->plugInClient() && document()->page()->plugInClient()->shouldAutoStartFromOrigin(document()->page()->mainFrame()->document()->baseURL().host(), url.host(), loadedMimeType())) {
I think this would be way better with some local variables. One for document()->page() and another for document()->page()->plugInClient().
WebKit Commit Bot
Comment 3
2013-05-01 17:39:26 PDT
Comment on
attachment 200252
[details]
[PATCH] Proposed Fix Clearing flags on attachment: 200252 Committed
r149469
: <
http://trac.webkit.org/changeset/149469
>
WebKit Commit Bot
Comment 4
2013-05-01 17:39:28 PDT
All reviewed patches have been landed. Closing bug.
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