Closed
Bug 1631114
Opened 6 years ago
Closed 6 years ago
Make Handle<Maybe<>> more convenient
Categories
(Core :: JavaScript Engine, task, P1)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla77
| Tracking | Status | |
|---|---|---|
| firefox77 | --- | fixed |
People
(Reporter: evilpies, Assigned: jonco)
References
Details
Attachments
(1 file)
I am using Handle<Maybe<Value>>> in D64437 and there are some usability problems:
- I have to do
handle.get.isSome()instead of justhandle.isSome(). - I really want to just pass
Nothing()to a parameter, instead of having to do
Maybe<JS::Value> nothing = Nothing();
f(Handle<Maybe<Value>>::fromMarkedLocation(¬hing));
(In this case I don't have access to a JSContext without changing a bunch of code)
| Assignee | ||
Comment 1•6 years ago
|
||
Please do try to avoid Handle::fromMarkedLocation. Ideally we would remove this but it's still necessary in a few places.
Assignee: nobody → jcoppeard
Priority: -- → P1
| Assignee | ||
Comment 2•6 years ago
|
||
This adds WrappedPtrOperations and MutableWrappedPtrOperations specialisations for Maybe<T> to all basic Maybe operations to used on Rooted<Maybe<T>>, Handle<Maybe<T>>, etc. I didn't add all of them; in particular I found ptr() would conflict with the Rooted::ptr data member.
This also adds JS::NothingHandleValue for passing Nothing to a Handle<Maybe<Value>>.
| Reporter | ||
Updated•6 years ago
|
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/73d7489248b6
Make Handle<Maybe<Value>> easier to use r=jandem
Comment 4•6 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox77:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in
before you can comment on or make changes to this bug.
Description
•