Closed
Bug 1107416
Opened 10 years ago
Closed 10 years ago
Add static_assert reminder to increment XDR_BYTECODE_VERSION_SUBTRAHEND when extending js.msg
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: cpeterson, Assigned: cpeterson)
Details
Attachments
(1 file)
1.13 KB,
patch
|
shu
:
review+
|
Details | Diff | Splinter Review |
In bug 1102131, I added two new warning MSG_DEFs to js.msg but forgot to increment XDR_BYTECODE_VERSION_SUBTRAHEND. This patch adds a static_assert to Xdr.h that fails if MSG_DEFs are added or removed to js.msg, reminding developers to update XDR_BYTECODE_VERSION_SUBTRAHEND.
Attachment #8531921 -
Flags: review?(shu)
Comment 1•10 years ago
|
||
Comment on attachment 8531921 [details] [diff] [review] xdr-version-assert.patch Review of attachment 8531921 [details] [diff] [review]: ----------------------------------------------------------------- Nice. Could you prefix the static assert message with "GREETINGS, POTENTIAL SUBTRAHEND INCREMENTER!" though?
Attachment #8531921 -
Flags: review?(shu) → review+
Assignee | ||
Comment 2•10 years ago
|
||
Yup. https://hg.mozilla.org/integration/mozilla-inbound/rev/f82fd5479353
Assignee | ||
Comment 3•10 years ago
|
||
backed out for failing static_assert: https://hg.mozilla.org/integration/mozilla-inbound/rev/4d97610bba08
Assignee | ||
Comment 4•10 years ago
|
||
Fixed expected message count: https://hg.mozilla.org/integration/mozilla-inbound/rev/af9f873b8bc6
Comment 5•10 years ago
|
||
Backed out for non-unified bustage. https://hg.mozilla.org/integration/mozilla-inbound/rev/5aff39c9b60b https://treeherder.mozilla.org/logviewer.html#?job_id=4413816&repo=mozilla-inbound
Assignee | ||
Comment 6•10 years ago
|
||
#included "jsfriendapi.h" for JSErr_Limit definition in non-unified builds: https://hg.mozilla.org/integration/mozilla-inbound/rev/e448025c6dad
Comment 7•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e448025c6dad
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Comment 8•9 years ago
|
||
Chris, why is it necessary to bump the version number when error messages are added?
Flags: needinfo?(cpeterson)
Comment 9•9 years ago
|
||
We burn error message numbers into our self-hosted JS. Do a ThrowError(JSMSG_BAD_SYMBOL, v); with an error number added or removed before it (i.e. pretty much anywhere), and bytecode will have a stale error number in it, and arity will be off, and blah blah blah. This is compounded by js.msg's reordering to group messages in similar functionality.
Flags: needinfo?(cpeterson)
Comment 10•9 years ago
|
||
Thanks, Jeff.
You need to log in
before you can comment on or make changes to this bug.
Description
•