Last Comment Bug 745899 - Add support in Nullable for sanely dealing with |sequence<T>?| types
: Add support in Nullable for sanely dealing with |sequence<T>?| types
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: mozilla15
Assigned To: Boris Zbarsky [:bz] (still a bit busy)
:
:
Mentors:
Depends on:
Blocks: 745897
  Show dependency treegraph
 
Reported: 2012-04-16 13:01 PDT by Boris Zbarsky [:bz] (still a bit busy)
Modified: 2012-04-24 17:58 PDT (History)
3 users (show)
bzbarsky: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Make it easier to use Nullable for non-primitive types. (938 bytes, patch)
2012-04-16 13:02 PDT, Boris Zbarsky [:bz] (still a bit busy)
peterv: review+
Details | Diff | Splinter Review

Description Boris Zbarsky [:bz] (still a bit busy) 2012-04-16 13:01:44 PDT
If sequence<T> becomes nsTArray<T>, then sequence<T>? should become
Nullable< nsTArray<T> >.  But then setting it to a non-null value involves an array copy, with the existing SetValue() API.

The proposal is to add a SetValue (or PrepareToSetValue?) that returns a T& that can then be written to.
Comment 1 Boris Zbarsky [:bz] (still a bit busy) 2012-04-16 13:02:59 PDT
Created attachment 615434 [details] [diff] [review]
Make it easier to use Nullable for non-primitive types.
Comment 2 Boris Zbarsky [:bz] (still a bit busy) 2012-04-18 09:18:02 PDT
https://hg.mozilla.org/projects/birch/rev/eb21c40c5be2

Note You need to log in before you can comment on or make changes to this bug.