WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
34169
Using the same name for member variables and parameters in NewThreadContext constructor cause failure to initialize
https://bugs.webkit.org/show_bug.cgi?id=34169
Summary
Using the same name for member variables and parameters in NewThreadContext c...
Lyon Chen
Reported
2010-01-26 09:27:40 PST
In file JavaScriptCore/wtf/Threading.cpp, the constructor of NewThreadContext use the same name for all the parameters and memeber variables, and this cause the member variables not initialized in RVCT compiler, not sure about other compilers though. Change it to use different names should be fine with other compilers too.
Attachments
Patch for bug 34169.
(1.25 KB, patch)
2010-01-26 09:40 PST
,
Lyon Chen
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Lyon Chen
Comment 1
2010-01-26 09:40:24 PST
Created
attachment 47417
[details]
Patch for
bug 34169
. Use different parameter name for NewThreadContext, this fix the not-initialized member variable issue for RVCT compiler.
Darin Adler
Comment 2
2010-01-26 10:37:19 PST
We do this, using the same name for arguments and data members, in tons of different places in the code base. This is just one of them!
Lyon Chen
Comment 3
2010-01-26 10:39:20 PST
Hmmm, yeah, seems problem is elsewhere, will check further.
Alexey Proskuryakov
Comment 4
2010-01-26 10:43:19 PST
Yes, this is certainly a valid C++ idiom that we use frequently.
Alexey Proskuryakov
Comment 5
2010-03-03 16:23:56 PST
Closing for now per
comment 3
. Please feel free to reopen if this is still needed.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug