Closed Bug 939909 Opened 12 years ago Closed 12 years ago

Internal Promise implementation should not use Optional<JS::Handle<JS::Value> > forms

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: nsm, Assigned: nsm)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file)

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: nobody → nsm.nikhil
Depends on: promises
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+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: