Last Comment Bug 781046 - Modify 4rth parameter TypedArray.h function Create() to take a const T* instead of a T*
: Modify 4rth parameter TypedArray.h function Create() to take a const T* inste...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla17
Assigned To: bsurender
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: 764234
  Show dependency treegraph
 
Reported: 2012-08-07 16:49 PDT by bsurender
Modified: 2012-08-09 04:52 PDT (History)
3 users (show)
bzbarsky: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Create() 4rth arg changed to const T* and remaining changes as appropriate. (1.89 KB, patch)
2012-08-07 17:33 PDT, bsurender
no flags Details | Diff | Splinter Review
TypedArray.h Create(...) 4rth parameter fix (1.01 KB, patch)
2012-08-07 17:59 PDT, bsurender
bzbarsky: review+
bzbarsky: checkin+
Details | Diff | Splinter Review

Description bsurender 2012-08-07 16:49:36 PDT
Change TypedArray::Create(...) parameter 4 from T* data = NULL to a const T* data.
Comment 1 Boris Zbarsky [:bz] (still a bit busy) 2012-08-07 17:12:15 PDT
r=me. ;)
Comment 2 bsurender 2012-08-07 17:33:55 PDT
Created attachment 649893 [details] [diff] [review]
Create() 4rth arg changed to const T* and remaining changes as appropriate.
Comment 3 Eric Faust [:efaust] 2012-08-07 17:41:43 PDT
Comment on attachment 649893 [details] [diff] [review]
Create() 4rth arg changed to const T* and remaining changes as appropriate.

Review of attachment 649893 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/bindings/TypedArray.h
@@ +63,5 @@
>    {}
>  
>    static inline JSObject*
>    Create(JSContext* cx, nsWrapperCache* creator, uint32_t length,
> +         const T* data) {

We need to keep the = NULL here. The function has a default parameter.
Comment 4 bsurender 2012-08-07 17:46:41 PDT
(In reply to Eric Faust from comment #3)
> Comment on attachment 649893 [details] [diff] [review]
> Create() 4rth arg changed to const T* and remaining changes as appropriate.
> 
> Review of attachment 649893 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: dom/bindings/TypedArray.h
> @@ +63,5 @@
> >    {}
> >  
> >    static inline JSObject*
> >    Create(JSContext* cx, nsWrapperCache* creator, uint32_t length,
> > +         const T* data) {
> 
> We need to keep the = NULL here. The function has a default parameter.

ah yep agreed. my bad. deleted the = NULL. :)
Comment 5 bsurender 2012-08-07 17:59:32 PDT
Created attachment 649905 [details] [diff] [review]
TypedArray.h Create(...) 4rth parameter fix
Comment 6 Boris Zbarsky [:bz] (still a bit busy) 2012-08-07 18:08:36 PDT
Comment on attachment 649905 [details] [diff] [review]
TypedArray.h Create(...) 4rth parameter fix

r=me
Comment 7 Boris Zbarsky [:bz] (still a bit busy) 2012-08-08 21:02:27 PDT
For what it's worth, it would be good to have better checkin comments for patches you want someone else to push (like the actual checkin comment you want).

https://hg.mozilla.org/integration/mozilla-inbound/rev/5556678cfd6c
Comment 8 Ed Morley [:emorley] 2012-08-09 04:52:11 PDT
https://hg.mozilla.org/mozilla-central/rev/5556678cfd6c

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