Closed Bug 489889 Opened 15 years ago Closed 15 years ago

Remove checks for statement state in StatementJSHelper

Categories

(Toolkit :: Storage, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: sdwilsh, Assigned: sdwilsh)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch v1.0 (obsolete) — Splinter Review
I noticed they were not tested in lcov reports, but really, we don't even need to do the checks.  All of our public API functions, which this code use, do these checks anyway, so we can save a virtual method call.
Attachment #374359 - Flags: review?(bugmail)
Whiteboard: [needs review asuth]
Blocks: 485107
Attachment #374359 - Flags: review?(bugmail) → review?(bent.mozilla)
Comment on attachment 374359 [details] [diff] [review]
v1.0

Switching to bent for reviewer to make asuth's life a bit easier.
Whiteboard: [needs review asuth] → [needs review bent]
Comment on attachment 374359 [details] [diff] [review]
v1.0

Why not rework these to be assertions? That way you can ensure that future code changes don't break you.
(In reply to comment #2)
> (From update of attachment 374359 [details] [diff] [review])
> Why not rework these to be assertions? That way you can ensure that future code
> changes don't break you.
I could indeed turn these into debug assertions, but I'd also wager that if I ever made the public API not check this, I'd be causing lots of other problems too.  If you want these to be debug asserts, let me know.
I'd do it, yeah. Defense in depth.
Attached patch v1.1 (obsolete) — Splinter Review
addresses comments
Attachment #374359 - Attachment is obsolete: true
Attachment #376781 - Flags: review?(bent.mozilla)
Attachment #374359 - Flags: review?(bent.mozilla)
Of course, the downside to v1.1 is that we now fail xpcshell tests because I have tests for this :(

I can't really land v1.1 because of this, so what do you want to do?
...and I forgot to qrefresh after adding semicolons after NS_ASSERTION calls.  It's in my local version.
Attached patch v1.2Splinter Review
In my haste to get an updated patch yesterday, I did something stupid.  After looking closer at the test, I realized that the assertion was just backwards.  This passes tests, with the assertions, as the original review asked.
Attachment #376781 - Attachment is obsolete: true
Attachment #376968 - Flags: review?(bent.mozilla)
Attachment #376781 - Flags: review?(bent.mozilla)
Attachment #376968 - Flags: review?(bent.mozilla) → review+
Whiteboard: [needs review bent] → [can land]
Managed to forget to update the commit message, but this is pushed:
http://hg.mozilla.org/mozilla-central/rev/90ac3a21ea49
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [can land]
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: