Closed
Bug 697000
Opened 13 years ago
Closed 11 years ago
Token type shouldn't be set after the other fields, to allow the setting of those fields to be asserted type-safe
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: Waldo, Assigned: n.nethercote)
Details
Attachments
(1 file)
11.23 KB,
patch
|
till
:
review+
|
Details | Diff | Splinter Review |
Currently we set fields like token.u.reflags before we set token.type. This means that we can't assert that, when reflags is set, its type is TOK_REGEXP. We should initialize in an order that makes such assertions possible, for all the various token-mutation methods.
Assignee | ||
Comment 1•11 years ago
|
||
In bug 898912, I thought about removing |tt| and just working directly with |tp->type|, but I didn't end up doing it. And then I saw this bug and realized that if I made that change it would be really easy to fix. So here you go. The performance effect is negligible.
Attachment #784788 -
Flags: review?(till)
Assignee | ||
Updated•11 years ago
|
Assignee: general → n.nethercote
Comment 2•11 years ago
|
||
Comment on attachment 784788 [details] [diff] [review] Do kind-checking in Token's setters. Review of attachment 784788 [details] [diff] [review]: ----------------------------------------------------------------- nice
Attachment #784788 -
Flags: review?(till) → review+
Assignee | ||
Comment 3•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/786c07374154
Comment 4•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/786c07374154
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in
before you can comment on or make changes to this bug.
Description
•