Bug 140701 - Simplify DiagnosticLoggingClient call sites
Summary: Simplify DiagnosticLoggingClient call sites
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
Depends on:
Blocks: 140463
  Show dependency treegraph
Reported: 2015-01-20 16:26 PST by Chris Dumez
Modified: 2015-01-20 18:16 PST (History)
3 users (show)

See Also:

Patch (16.73 KB, patch)
2015-01-20 16:30 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2015-01-20 16:26:31 PST
Simplify DiagnosticLoggingClient call sites by:
- Moving the Settings::diagnosticLoggingEnabled() check inside the MainFrame::diagnosticLoggingClient() getter
- Having MainFrame::diagnosticLoggingClient() return a reference instead of a pointer (returning a dummy client if necessary)

Otherwise, each call site needs to both check the setting and do a null-check on the client which is a bit annoying.
Comment 1 Chris Dumez 2015-01-20 16:30:05 PST
Created attachment 245033 [details]
Comment 2 Andreas Kling 2015-01-20 17:31:22 PST
Comment on attachment 245033 [details]

Comment 3 WebKit Commit Bot 2015-01-20 18:16:42 PST
Comment on attachment 245033 [details]

Clearing flags on attachment: 245033

Committed r178794: <http://trac.webkit.org/changeset/178794>
Comment 4 WebKit Commit Bot 2015-01-20 18:16:48 PST
All reviewed patches have been landed.  Closing bug.