Closed
Bug 805555
Opened 12 years ago
Closed 12 years ago
nsXBLProtoImpl fields "cx" and "versionBefore" are unused in opt builds
Categories
(Core :: XBL, defect)
Core
XBL
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.11 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
content/xbl/src/ is warning-free on Linux g++-4.7, so I tried marking it as FAIL_ON_WARNINGS -- but I got failures under clang on mac, due to these warnings: ../../../../../content/xbl/src/nsXBLProtoImpl.cpp:22:21: error: private field 'cx' is not used [-Werror,-Wunused-private-field] JSContext * const cx; ^ content/xbl/src/nsXBLProtoImpl.cpp:23:13: error: private field 'versionBefore' is not used [-Werror,-Wunused-private-field] JSVersion versionBefore; ^ https://tbpl.mozilla.org/php/getParsedLog.php?id=16463653&tree=Try
Comment 1•12 years ago
|
||
BurnThemWithFire!
Updated•12 years ago
|
Component: DOM → XBL
Assignee | ||
Comment 2•12 years ago
|
||
Actually, they're used, but only in debug builds. Code snippet: 20 class AutoVersionChecker 21 { 22 JSContext * const cx; 23 JSVersion versionBefore; 24 25 public: 26 explicit AutoVersionChecker(JSContext *cx) : cx(cx) { 27 #ifdef DEBUG 28 versionBefore = JS_GetVersion(cx); 29 #endif 30 } So they probably want to be labeled DebugOnly<>.
Assignee | ||
Updated•12 years ago
|
Summary: nsXBLProtoImpl fields "cx" and "versionBefore" are unused → nsXBLProtoImpl fields "cx" and "versionBefore" are unused in opt builds
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•12 years ago
|
||
This marks them as DebugOnly, and also renames the constructor argument to "aCx" instead of "cx" to avoid confusion about the "cx(cx)" initialization. member-var---^ ^---arg
Attachment #675284 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #3) > "aCx" instead of "cx" to avoid confusion about the "cx(cx)" initialization. > member-var---^ ^---arg (er, my ASCII art was misaligned in comment 3; hopefully fixed in this quoted chunk)
Comment 5•12 years ago
|
||
Comment on attachment 675284 [details] [diff] [review] fix r=me
Attachment #675284 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 6•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/59c09d991d7b
Assignee | ||
Updated•12 years ago
|
OS: Linux → All
Hardware: x86_64 → All
Comment 7•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/59c09d991d7b
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in
before you can comment on or make changes to this bug.
Description
•