WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
92538
Add diagnostic logging for plugins-per-page.
https://bugs.webkit.org/show_bug.cgi?id=92538
Summary
Add diagnostic logging for plugins-per-page.
Jer Noble
Reported
2012-07-27 12:43:41 PDT
Add diagnostic logging for plugins-per-page.
Attachments
Patch
(7.79 KB, patch)
2012-07-27 12:48 PDT
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(10.40 KB, patch)
2012-07-27 15:36 PDT
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(10.86 KB, patch)
2012-07-27 15:48 PDT
,
Jer Noble
andersca
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2012-07-27 12:48:17 PDT
Created
attachment 155027
[details]
Patch
Anders Carlsson
Comment 2
2012-07-27 13:44:26 PDT
Comment on
attachment 155027
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=155027&action=review
> Source/WebCore/html/HTMLEmbedElement.cpp:190 > + if (document()->page() && document()->page()->settings()->diagnosticLoggingEnabled()) { > + Page* page = document()->page(); > + ChromeClient* client = page->chrome()->client(); > + client->logDiagnosticMessage(success ? DiagnosticLoggingKeys::pluginLoadedKey() : DiagnosticLoggingKeys::pluginLoadingFailedKey(), m_serviceType, DiagnosticLoggingKeys::noopKey()); > + if (!page->hasSeenAnyPlugin()) > + client->logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey(), emptyString(), DiagnosticLoggingKeys::noopKey()); > + if (!page->hasSeenPlugin(m_serviceType)) > + client->logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsPluginKey(), m_serviceType, DiagnosticLoggingKeys::noopKey()); > + page->sawPlugin(m_serviceType); > + }
I think this code can be moved into a function in HTMLPluginImageElement and shared between HTMLEmbedElement and HTMLObjectElement. You also need to do the same thing now for HTMLAppletElement. You also want to null check page.
Jer Noble
Comment 3
2012-07-27 14:21:44 PDT
(In reply to
comment #2
)
> (From update of
attachment 155027
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=155027&action=review
> > > Source/WebCore/html/HTMLEmbedElement.cpp:190 > > + if (document()->page() && document()->page()->settings()->diagnosticLoggingEnabled()) { > > + Page* page = document()->page(); > > + ChromeClient* client = page->chrome()->client(); > > + client->logDiagnosticMessage(success ? DiagnosticLoggingKeys::pluginLoadedKey() : DiagnosticLoggingKeys::pluginLoadingFailedKey(), m_serviceType, DiagnosticLoggingKeys::noopKey()); > > + if (!page->hasSeenAnyPlugin()) > > + client->logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey(), emptyString(), DiagnosticLoggingKeys::noopKey()); > > + if (!page->hasSeenPlugin(m_serviceType)) > > + client->logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsPluginKey(), m_serviceType, DiagnosticLoggingKeys::noopKey()); > > + page->sawPlugin(m_serviceType); > > + } > > I think this code can be moved into a function in HTMLPluginImageElement and shared between HTMLEmbedElement and HTMLObjectElement. You also need to do the same thing now for HTMLAppletElement.
Sure thing.
> You also want to null check page.
Page gets null checked on the first line, but yes. :)
Jer Noble
Comment 4
2012-07-27 15:36:25 PDT
Created
attachment 155069
[details]
Patch Moved logging into SubframeLoader to catch all plugin subtypes, including HTMLAppletElement.
Jer Noble
Comment 5
2012-07-27 15:48:27 PDT
Created
attachment 155074
[details]
Patch Now with more applets!
Jer Noble
Comment 6
2012-07-27 15:58:11 PDT
Committed
r123930
: <
http://trac.webkit.org/changeset/123930
>
Darin Adler
Comment 7
2012-07-30 17:43:02 PDT
Comment on
attachment 155074
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=155074&action=review
> Source/WebCore/page/Page.cpp:1174 > +bool Page::hasSeenPlugin(const String& serviceType) const > +{ > + return m_seenPlugins.contains(serviceType); > +} > + > +void Page::sawPlugin(const String& serviceType) > +{ > + m_seenPlugins.add(serviceType); > +}
Do we have a guarantee that serviceType won’t be the empty string or null?
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