Bug 137144

Summary: Fix typo in YARR at BOL check
Product: WebKit Reporter: David Binderman <dcb314>
Component: JavaScriptCoreAssignee: Peter Varga <pvarga>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, msaboff, ossy, pvarga
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
proposed patch none

Description David Binderman 2014-09-26 00:28:38 PDT
webkitgtk-2.5.90/Source/JavaScriptCore/yarr/YarrPattern.cpp:300]: (style) Boolean result is used in bitwise operation. Clarify expression with parentheses.

Source code is

        if (!m_alternative->m_terms.size() & !m_invertParentheticalAssertion) {

Maybe 

        if (!m_alternative->m_terms.size() && !m_invertParentheticalAssertion) {

was intended.
Comment 1 Csaba Osztrogonác 2014-09-26 04:48:18 PDT
The code is still in trunk, cc-ing YARR experts.
Comment 2 Peter Varga 2014-09-26 05:28:07 PDT
Created attachment 238708 [details]
proposed patch
Comment 3 Darin Adler 2014-09-26 10:13:27 PDT
Comment on attachment 238708 [details]
proposed patch

OK to make this change, but it was OK to use & here since both values were booleans and the second expression had no side effect.
Comment 4 WebKit Commit Bot 2014-09-26 10:50:02 PDT
Comment on attachment 238708 [details]
proposed patch

Clearing flags on attachment: 238708

Committed r174012: <http://trac.webkit.org/changeset/174012>
Comment 5 WebKit Commit Bot 2014-09-26 10:50:04 PDT
All reviewed patches have been landed.  Closing bug.