Closed
Bug 939909
Opened 7 years ago
Closed 7 years ago
Internal Promise implementation should not use Optional<JS::Handle<JS::Value> > forms
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: nsm, Assigned: nsm)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file)
18.87 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
JS::Value already encodes the semantics of optional, this is redundant, especially in internal methods that are not wired to WebIDL. bz eventually plans to get rid of the |optional any| webidl form too.
Assignee | ||
Updated•7 years ago
|
![]() |
||
Comment 2•7 years ago
|
||
Comment on attachment 8334187 [details] [diff] [review] Get rid of Optional<> from internal functions. >@@ -315,19 +315,19 @@ Promise::JSCallback(JSContext *aCx, unsi >+ JS::Rooted<JS::Value> value(aCx); > if (aArgc) { >- value.Value() = args[0]; >+ value = args[0]; JS::Rooted<JS::Value> value(aCx, args.get(0)); Or even more simply, just pass args.get(0) in the places where "value" is passed right now and remove all this code. Apart from that, looks great. Thank you for doing this! r=me
Attachment #8334187 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 3•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/66ab5cb18c25
Comment 4•7 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/66ab5cb18c25
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•7 years ago
|
Whiteboard: [qa-]
Updated•2 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•