[webkit-reviews] review requested: [Bug 80696] Remove custom bindings for attribute type Array. : [Attachment 132817] another_attempt_01

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 20 06:46:59 PDT 2012


Vineet Chaudhary (vineetc) <rgf748 at motorola.com> has asked  for review:
Bug 80696: Remove custom bindings for attribute type Array.
https://bugs.webkit.org/show_bug.cgi?id=80696

Attachment 132817: another_attempt_01
https://bugs.webkit.org/attachment.cgi?id=132817&action=review

------- Additional Comments from Vineet Chaudhary (vineetc)
<rgf748 at motorola.com>
1) Using toNativeArray()
2) Added isJSArray() check.

>|v8Value| would not be necessary.
> Source/WebCore/bindings/v8/V8Binding.h:304
> +	   if (!v8Value->IsArray())
>You can just write 'if (!value->IsArray())'
> Source/WebCore/bindings/v8/V8Binding.h:308
> +	   v8::Local<v8::Array> array = v8::Local<v8::Array>::Cast(v8Value);
>You can just write 'Cast(value)
I tried this but getting compile errors : like 

Source/WebCore/bindings/v8/V8Binding.h: In function ‘WTF::Vector<T>
WebCore::toV8Array(v8::Handle<v8::Value>)’:
Source/WebCore/bindings/v8/V8Binding.h:307:70: error: no matching function for
call to ‘v8::Local<v8::Array>::Cast(v8::Handle<v8::Value>&)’
Source/WebCore/bindings/v8/V8Binding.h:307:70: note: candidate is:
Source/WebKit/chromium/v8/include/v8.h:277:45: note: template<class S> static
v8::Local v8::Local::Cast(v8::Local<S>) [with S = S, T = v8::Array]

So still using v8::Local<v8::Array>::Cast(v8Value).


More information about the webkit-reviews mailing list