<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - WebKitTestRunner needs layoutTestController.setDashboardCompatibilityMode"
href="https://bugs.webkit.org/show_bug.cgi?id=42547">bug 42547</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #285589 Flags</td>
<td>review?
</td>
<td>review+
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - WebKitTestRunner needs layoutTestController.setDashboardCompatibilityMode"
href="https://bugs.webkit.org/show_bug.cgi?id=42547#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - WebKitTestRunner needs layoutTestController.setDashboardCompatibilityMode"
href="https://bugs.webkit.org/show_bug.cgi?id=42547">bug 42547</a>
from <span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=285589&action=diff" name="attach_285589" title="Patch">attachment 285589</a> <a href="attachment.cgi?id=285589&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=285589&action=review">https://bugs.webkit.org/attachment.cgi?id=285589&action=review</a>
<span class="quote">> Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:323
> + const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
> + for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
> + (*iter)->settings().setUsesDashboardBackwardCompatibilityMode(enabled);</span >
Here’s how we should write this in new code (other code in tis file is old):
for (auto& page : PageGroup::pageGroup(pageGroup->identifier())->pages())
page->settings().setUsesDashboardBackwardCompatibilityMode(enabled);
We don’t use abbreviations in WebKit code, so code should be using "iter" (even though there are many other functions in this file doing it). And with a C++11 for loop we don’t need to bother with a local variable.
<span class="quote">> Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:420
> + fputs("Dashboard unsupported\n", stderr);</span >
This isn’t a good idea. The test runner should not be writing things out directly to stderr.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>