Closed Bug 1503718 Opened 4 years ago Closed 4 years ago

Use the `unwrapped` prefix consistently throughout builtin/Stream.cpp


(Core :: JavaScript Engine, enhancement, P1)




Tracking Status
firefox65 --- fixed


(Reporter: jorendorff, Assigned: jorendorff)


(Blocks 1 open bug)



(5 files)

Spun off from bug 1503006.
Blocks: streams-ship
Each patch in this stack deletes comments that are redundant with the new
naming convention.

In ReadableStreamTee_Cancel, we have a variable named `unwrappedReason` whose
purpose is to create a properly wrapped verison of `reason`. It's a little
vertiginous. But I think this is what the new convention demands and it's not
so bad.

Also in ReadableStreamTee_Cancel, step 4.c., we wrap `cancelResult`, which does
not have an `unwrapped` tag.  This is because we switched realms between the
declaration of `cancelResult` and the line of code where we're going to use it.
I think this just means the convention is never going to make all correct code
obviously-correct and all wrong code obviously-wrong. Still an improvement.
ReportArgTypeError is replaced with a new helper function template,
UnwrapAndTypeCheckArgument. The old function used the expression decompiler,
but that seems unhelpful here; the new code uses InformalValueTypeName on the
actual argument value.

Depends on D11683
Pushed by
Part 1: Use the `unwrapped` prefix. Covers spec sections 3.2 to 3.4. r=tcampbell
Part 2: Use the `unwrapped` prefix. Covers spec sections 3.5 to 3.9. r=tcampbell
Part 3: Use the `unwrapped` prefix. Covers spec sections 3.10 and 3.12. r=tcampbell
Part 4: Use the `unwrapped` prefix. Covers spec sections 6.1 to 6.3. r=tcampbell
Part 5: Use the `unwrapped` prefix. Covers API entry points. r=tcampbell
Assignee: nobody → jorendorff
You need to log in before you can comment on or make changes to this bug.