Closed Bug 862921 Opened 11 years ago Closed 11 years ago

ParallelArray.js: Generalize AssertSequentialIsOK logic and improve its error message.

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: pnkfelix, Assigned: pnkfelix)

References

Details

Attachments

(1 file, 1 obsolete file)

1. If one passes a `mode` argument without a property named `mode`,
       the previous version will fall into the ThrowError branch
       (because mode.mode => undefined and undefined !== "seq")
    
    2. The old error message used the strings "par" and "seq", which might
       make the reader think that the assertion is solely about the
       appropriate value for the `mode` property, which happens to take on
       the values "par" or "seq" in some cases.  But the real condition
       being signalled here is not about the string values "par" or "seq";
       it is instead about the dynamic behavior of the runtime system.
       This changes the error message to use longer phrases, which should
       hopefully make the intent clearer.
    
    There is a third change I want to make, changing the logic of the
    conditional guard further, but that change is not as important to me
    as the two above.
Assignee: general → pnkfelix
Status: NEW → ASSIGNED
Attachment #738587 - Flags: review?(nmatsakis)
Comment on attachment 738587 [details] [diff] [review]
patch A v1: fix the guard and the message.

(removing review request until I resolve why this is not rendering in splinter.)
Attachment #738587 - Flags: review?(nmatsakis)
Blocks: PJS
(this is the same as 738587 except generated without `--color` flag.)
Attachment #738587 - Attachment is obsolete: true
Attachment #738596 - Flags: review?(nmatsakis)
Attachment #738596 - Flags: review?(nmatsakis) → review+
https://hg.mozilla.org/mozilla-central/rev/8a391f846c42
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: