Bug 139611 - Simplify tracking of process suppression disabled for PluginProcessManager
Summary: Simplify tracking of process suppression disabled for PluginProcessManager
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Barraclough
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-12 18:13 PST by Gavin Barraclough
Modified: 2014-12-15 13:03 PST (History)
3 users (show)

See Also:


Attachments
Preliminary patch, needs Changelog (6.38 KB, patch)
2014-12-12 18:15 PST, Gavin Barraclough
no flags Details | Formatted Diff | Diff
Fix (10.07 KB, patch)
2014-12-13 22:55 PST, Gavin Barraclough
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2014-12-12 18:13:55 PST
Shouldn't need to iterate contexts; just keep a count.
Comment 1 Gavin Barraclough 2014-12-12 18:15:19 PST
Created attachment 243239 [details]
Preliminary patch, needs Changelog
Comment 2 WebKit Commit Bot 2014-12-12 18:17:57 PST
Attachment 243239 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/Plugins/PluginProcessManager.cpp:48:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Gavin Barraclough 2014-12-13 22:55:51 PST
Created attachment 243265 [details]
Fix
Comment 4 WebKit Commit Bot 2014-12-13 22:57:06 PST
Attachment 243265 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/Plugins/PluginProcessManager.cpp:48:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Darin Adler 2014-12-15 09:15:14 PST
Comment on attachment 243265 [details]
Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=243265&action=review

> Source/WebKit2/UIProcess/Plugins/PluginProcessManager.h:71
> +    {
> +        return m_processSuppressionDisabledForPageCounter.count();
> +    }

I suggest putting this inline function body outside the class definition. Keeps the class definition more readable.

> Source/WebKit2/UIProcess/Plugins/PluginProcessManager.h:78
> +    {
> +        return m_processSuppressionEnabled;
> +    };

Same suggestion here.

Also, the stray semicolon here is not needed.

> Source/WebKit2/UIProcess/Plugins/PluginProcessManager.h:93
> +    bool m_processSuppressionEnabled;

I suggest using modern initialization syntax here:

    bool m_processSuppressionEnabled { true };

Then this data member doesn’t have to be mentioned in the constructor.
Comment 6 Gavin Barraclough 2014-12-15 11:41:59 PST
http://trac.webkit.org/changeset/177291
Comment 7 Carlos Alberto Lopez Perez 2014-12-15 12:24:37 PST
(In reply to comment #6)
> http://trac.webkit.org/changeset/177291

This has broken both the GTK and EFL builds.

The EWS bots are green on the patch attached to this bug, so maybe you did some last-minute change before landing it that broke the build?

The build log are here:

 * GTK build failure: https://build.webkit.org/builders/GTK%20Linux%2064-bit%20Release%20%28Build%29/builds/53626/steps/compile-webkit/logs/stdio
 * EFL build failure: https://build.webkit.org/builders/EFL%20Linux%20ARMv7%20Thumb2%20Release%20%28Build%29/builds/9261/steps/compile-webkit/logs/stdio
Comment 8 Gavin Barraclough 2014-12-15 12:42:33 PST
(In reply to comment #7)
> (In reply to comment #6)
> > http://trac.webkit.org/changeset/177291
> 
> This has broken both the GTK and EFL builds.
> 
> The EWS bots are green on the patch attached to this bug, so maybe you did
> some last-minute change before landing it that broke the build?
> 
> The build log are here:
> 
>  * GTK build failure:
> https://build.webkit.org/builders/GTK%20Linux%2064-
> bit%20Release%20%28Build%29/builds/53626/steps/compile-webkit/logs/stdio
>  * EFL build failure:
> https://build.webkit.org/builders/
> EFL%20Linux%20ARMv7%20Thumb2%20Release%20%28Build%29/builds/9261/steps/
> compile-webkit/logs/stdio

Ooops, yes – in addressing review comments moved inline functions out the the class declarations, I should have #ifdef'ed.

Fix incoming.
Comment 9 Gavin Barraclough 2014-12-15 12:45:33 PST
gtk/efl should be fixed in:

Transmitting file data ..
Committed revision 177307.
Comment 10 Carlos Alberto Lopez Perez 2014-12-15 13:03:54 PST
(In reply to comment #9)
> gtk/efl should be fixed in:
> 
> Transmitting file data ..
> Committed revision 177307.

That worked, thanks :)

(The EFL build is still broken, but don't seems related with this)