Bug 140701

Summary: Simplify DiagnosticLoggingClient call sites
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, jer.noble, kling
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 140463    
Attachments:
Description Flags
Patch none

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]
Patch
Comment 2 Andreas Kling 2015-01-20 17:31:22 PST
Comment on attachment 245033 [details]
Patch

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

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.