WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
84540
JS binding code generator doesn't handle "attribute unsigned long[]" well
https://bugs.webkit.org/show_bug.cgi?id=84540
Summary
JS binding code generator doesn't handle "attribute unsigned long[]" well
Ryosuke Niwa
Reported
2012-04-21 18:09:51 PDT
I made the following change but JSInternals.cpp doesn't compile. It tries to include sequence.h and JSsequence.h. It also generates: JSValue jsInternals(ExecState* exec, JSValue slotBase, const Identifier&) { JSInternals* castedThis = jsCast<JSInternals*>(asObject(slotBase)); UNUSED_PARAM(exec); Internals* impl = static_cast<Internals*>(castedThis->impl()); JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->())); return result; } Index: Source/WebCore/testing/Internals.idl =================================================================== --- Source/WebCore/testing/Internals.idl (revision 114214) +++ Source/WebCore/testing/Internals.idl (working copy) @@ -139,6 +139,8 @@ [Conditional=INSPECTOR] unsigned long numberOfLiveNodes(); [Conditional=INSPECTOR] unsigned long numberOfLiveDocuments(); + + readonly attribute sequence<unsigned long> fastMallocStatistics; }; } Index: Source/WebCore/bindings/scripts/CodeGeneratorJS.pm =================================================================== --- Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (revision 114214) +++ Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (working copy) @@ -3025,7 +3025,7 @@ AddToImplIncludes("SerializedScriptValue.h", $conditional); return "$value ? $value->deserialize(exec, castedThis->globalObject(), 0) : jsNull()"; } elsif ($type eq "unsigned long[]") { - AddToImplIncludes("<wrt/Vector.h>", $conditional); + AddToImplIncludes("<wtf/Vector.h>", $conditional); } else { # Default, include header with same name. AddToImplIncludes("JS$type.h", $conditional); Index: Source/WebCore/bindings/scripts/CodeGenerator.pm =================================================================== --- Source/WebCore/bindings/scripts/CodeGenerator.pm (revision 114214) +++ Source/WebCore/bindings/scripts/CodeGenerator.pm (working copy) @@ -450,7 +450,7 @@ my $object = shift; my $type = shift; - return $1 if $type =~ /^sequence<([\w\d_]+)>.*/; + return $1 if $type =~ /^sequence<([\w\d_\s]+)>.*/; return ""; }
Attachments
Patch
(11.03 KB, patch)
2012-04-22 23:53 PDT
,
Vineet Chaudhary (vineetc)
haraken
: review-
Details
Formatted Diff
Diff
Updated Patch
(40.31 KB, patch)
2012-04-23 01:09 PDT
,
Vineet Chaudhary (vineetc)
haraken
: review+
Details
Formatted Diff
Diff
Patch
(44.73 KB, patch)
2012-04-23 02:23 PDT
,
Vineet Chaudhary (vineetc)
no flags
Details
Formatted Diff
Diff
Patch_With_Traits
(5.82 KB, patch)
2012-04-24 08:59 PDT
,
Vineet Chaudhary (vineetc)
no flags
Details
Formatted Diff
Diff
updatedPatchWithTraits
(5.82 KB, patch)
2012-06-28 05:15 PDT
,
Vineet Chaudhary (vineetc)
no flags
Details
Formatted Diff
Diff
Updated Patch
(6.41 KB, patch)
2012-06-29 02:02 PDT
,
Vineet Chaudhary (vineetc)
haraken
: review+
code.vineet
: commit-queue-
Details
Formatted Diff
Diff
rebasedPatch
(6.33 KB, patch)
2012-06-29 03:49 PDT
,
Vineet Chaudhary (vineetc)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Vineet Chaudhary (vineetc)
Comment 1
2012-04-22 22:17:18 PDT
Issue is with return $1 if $type =~ /^sequence<([\w\d_]+)>.*/; This is not able to parse the "unsigned long". Fixing soon.
Ryosuke Niwa
Comment 2
2012-04-22 22:22:25 PDT
(In reply to
comment #1
)
> Issue is with > > return $1 if $type =~ /^sequence<([\w\d_]+)>.*/; > > This is not able to parse the "unsigned long". > Fixing soon.
I've fixed that but still getting an error. See the diff I posted.
Vineet Chaudhary (vineetc)
Comment 3
2012-04-22 23:06:02 PDT
(In reply to
comment #2
)
> (In reply to
comment #1
) > > Issue is with > > > > return $1 if $type =~ /^sequence<([\w\d_]+)>.*/; > > > > This is not able to parse the "unsigned long". > > Fixing soon. > > I've fixed that but still getting an error. See the diff I posted.
Another issue is with > JSValue jsInternals(ExecState* exec, JSValue slotBase, const Identifier&) here parser is not able to parse fastMallocStatistics. The reason IDL Parser is not able to parse "unsigned long" within sequence<>. Need to change IDLStructure.pm.
Vineet Chaudhary (vineetc)
Comment 4
2012-04-22 23:53:35 PDT
Created
attachment 138297
[details]
Patch
Kentaro Hara
Comment 5
2012-04-23 00:05:11 PDT
Comment on
attachment 138297
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=138297&action=review
The approach looks good.
> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:3028 > + if ($arrayType ne "String" && $arrayType ne "unsigned long") {
We do not want to add '$arrayType ne ...' in both CodeGeneratorJS.pm and CodeGeneratorV8.pm every time we support sequence<some_primitive_type>. Shall we make it a common subroutine in CodeGenerator.pm? sub IsPrimitiveType { my $type = shift; return 1 if $type eq "String"; return 1 if $type eq "unsigned long"; ...; return 0; }
> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:3805 > + if ($arrayType ne "String" && $arrayType ne "unsigned long") {
Ditto.
> Source/WebCore/bindings/scripts/test/TestObj.idl:49 > + readonly attribute sequence<unsigned long> unsignedLongSequenceAttr;
Let's add test cases for other primitive types, e.g. sequence<long>, sequence<float> etc.
Vineet Chaudhary (vineetc)
Comment 6
2012-04-23 00:29:24 PDT
(In reply to
comment #5
)
> (From update of
attachment 138297
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=138297&action=review
> > The approach looks good. > > > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:3028 > > + if ($arrayType ne "String" && $arrayType ne "unsigned long") { > > We do not want to add '$arrayType ne ...' in both CodeGeneratorJS.pm and CodeGeneratorV8.pm every time we support sequence<some_primitive_type>. Shall we make it a common subroutine in CodeGenerator.pm? > > sub IsPrimitiveType > { > my $type = shift; > return 1 if $type eq "String"; > return 1 if $type eq "unsigned long"; > ...; > return 0; > }
Ohh I see we already have CodeGenerator::IsPrimitiveType we should be able to use that adding return 1 if $type eq "String";
Vineet Chaudhary (vineetc)
Comment 7
2012-04-23 01:09:58 PDT
Created
attachment 138305
[details]
Updated Patch I have slightly modified patch. Instead of using something IsPrimitiveType we should use AvoidInclusionOfType subroutine. Added tests for numeric and primitive types. removed readonly to test both getters/setters. //sorry this increased generated code :(
Kentaro Hara
Comment 8
2012-04-23 01:15:13 PDT
Comment on
attachment 138305
[details]
Updated Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=138305&action=review
> Source/WebCore/bindings/scripts/CodeGenerator.pm:350 > + return 1 if $primitiveTypeHash{$type}; > + return 1 if $numericTypeHash{$type}; > + return 1 if $type eq "String";
AvoidInclusionOfType() is already used in CodeGenerator*.pm. I am a bit worrying that this would change the existing behaviors. No worry?
Vineet Chaudhary (vineetc)
Comment 9
2012-04-23 01:46:46 PDT
(In reply to
comment #8
)
> (From update of
attachment 138305
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=138305&action=review
> > > Source/WebCore/bindings/scripts/CodeGenerator.pm:350 > > + return 1 if $primitiveTypeHash{$type}; > > + return 1 if $numericTypeHash{$type}; > > + return 1 if $type eq "String"; > > AvoidInclusionOfType() is already used in CodeGenerator*.pm. I am a bit worrying that this would change the existing behaviors. No worry?
Umm I think the places where AvoidInclusionOfType is used to check whether to include header of type or not. Looking at the current implementation of AvoidInclusionOfType it is avoiding inclusion only because it doesn't have headers like SVGPoint/SVGNumber adding above code won't change existing behaviour because it doesn't have headers for these type either. IMO worry is if $arrayType is "SVGPoint/SVGNumber" it will skip headers. So should I use IsPrimitiveType subroutine adding "String" to it or Write a new subroutine?
Kentaro Hara
Comment 10
2012-04-23 02:00:17 PDT
Comment on
attachment 138305
[details]
Updated Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=138305&action=review
>>> Source/WebCore/bindings/scripts/CodeGenerator.pm:350 >>> + return 1 if $type eq "String"; >> >> AvoidInclusionOfType() is already used in CodeGenerator*.pm. I am a bit worrying that this would change the existing behaviors. No worry? > > Umm I think the places where AvoidInclusionOfType is used to check whether to include header of type or not. > Looking at the current implementation of AvoidInclusionOfType it is avoiding inclusion only because it doesn't have headers like SVGPoint/SVGNumber adding above code won't change existing behaviour because it doesn't have headers for these type either. > IMO worry is if $arrayType is "SVGPoint/SVGNumber" it will skip headers. > > So should I use IsPrimitiveType subroutine adding "String" to it or Write a new subroutine?
Thanks for the clarification. Currently there are no use cases for an SVGPoint/SVGNumber array. Let's keep it as-is. BTW, shall we rename AvoidInclusionOfType() to SkipHeaderInclude() (or something clearer)?
Vineet Chaudhary (vineetc)
Comment 11
2012-04-23 02:14:14 PDT
(In reply to
comment #10
)
> (From update of
attachment 138305
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=138305&action=review
> > >>> Source/WebCore/bindings/scripts/CodeGenerator.pm:350 > >>> + return 1 if $type eq "String"; > >> > >> AvoidInclusionOfType() is already used in CodeGenerator*.pm. I am a bit worrying that this would change the existing behaviors. No worry? > > > > Umm I think the places where AvoidInclusionOfType is used to check whether to include header of type or not. > > Looking at the current implementation of AvoidInclusionOfType it is avoiding inclusion only because it doesn't have headers like SVGPoint/SVGNumber adding above code won't change existing behaviour because it doesn't have headers for these type either. > > IMO worry is if $arrayType is "SVGPoint/SVGNumber" it will skip headers. > > > > So should I use IsPrimitiveType subroutine adding "String" to it or Write a new subroutine? > > Thanks for the clarification. Currently there are no use cases for an SVGPoint/SVGNumber array. Let's keep it as-is. > > BTW, shall we rename AvoidInclusionOfType() to SkipHeaderInclude() (or something clearer)?
Oke. I will repost patch with SkipIncludeHeader.
Kentaro Hara
Comment 12
2012-04-23 02:16:55 PDT
Sure, I'll take a look at it tomorrow:)
Vineet Chaudhary (vineetc)
Comment 13
2012-04-23 02:23:50 PDT
Created
attachment 138310
[details]
Patch
Kentaro Hara
Comment 14
2012-04-23 02:29:06 PDT
Comment on
attachment 138310
[details]
Patch OK. Thanks for fixing this bug!
WebKit Review Bot
Comment 15
2012-04-23 04:34:45 PDT
Comment on
attachment 138310
[details]
Patch Clearing flags on attachment: 138310 Committed
r114887
: <
http://trac.webkit.org/changeset/114887
>
WebKit Review Bot
Comment 16
2012-04-23 04:34:50 PDT
All reviewed patches have been landed. Closing bug.
Ryosuke Niwa
Comment 17
2012-04-23 16:23:59 PDT
I still can't compile: /Users/rniwa/webkit2/Source/WebCore/bindings/js/JSDOMBinding.h: In function ‘JSC::JSValue WebCore::jsArray(JSC::ExecState*, WebCore::JSDOMGlobalObject*, const WTF::Vector<Value, 0ul>&) [with T = unsigned int]’: /Users/rniwa/webkit2/WebKitBuild/Release/DerivedSources/WebCore/JSInternals.cpp:224: instantiated from here /Users/rniwa/webkit2/Source/WebCore/bindings/js/JSDOMBinding.h:289: error: no matching function for call to ‘getPtr(const unsigned int&)’ template <typename T> JSC::JSValue jsArray(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Vector<T>& iterator) { JSC::MarkedArgumentBuffer list; typename Vector<T>::const_iterator end = iterator.end(); for (typename Vector<T>::const_iterator iter = iterator.begin(); iter != end; ++iter) list.append(toJS(exec, globalObject, WTF::getPtr(*iter))); return JSC::constructArray(exec, globalObject, list); } JSValue jsInternalsFastMallocStatistics(ExecState* exec, JSValue slotBase, const Identifier&) { JSInternals* castedThis = jsCast<JSInternals*>(asObject(slotBase)); UNUSED_PARAM(exec); Internals* impl = static_cast<Internals*>(castedThis->impl()); JSValue result = jsArray(exec, castedThis->globalObject(), impl->fastMallocStatistics()); return result; } WTF::getPtr isn't defined for unsigned int :(
Sean Wang
Comment 18
2012-04-23 21:23:36 PDT
(In reply to
comment #15
)
> (From update of
attachment 138310
[details]
) > Clearing flags on attachment: 138310 > > Committed
r114887
: <
http://trac.webkit.org/changeset/114887
>
I still can't compile the syntax "readonly attribute float[] axes;" in the file "Source/WebCore/Modules/gamepad/Gamepad.idl:34". It generated in JSGamepad.cpp: #include "JSfloat[].h" #include "float[].h" Which can't be found.
Vineet Chaudhary (vineetc)
Comment 19
2012-04-24 00:49:45 PDT
(In reply to
comment #17
)
> I still can't compile:
Sorry Ryosuke this didn't worked. :(
> /Users/rniwa/webkit2/Source/WebCore/bindings/js/JSDOMBinding.h: In function ‘JSC::JSValue WebCore::jsArray(JSC::ExecState*, WebCore::JSDOMGlobalObject*, const WTF::Vector<Value, 0ul>&) [with T = unsigned int]’: > /Users/rniwa/webkit2/WebKitBuild/Release/DerivedSources/WebCore/JSInternals.cpp:224: instantiated from here > /Users/rniwa/webkit2/Source/WebCore/bindings/js/JSDOMBinding.h:289: error: no matching function for call to ‘getPtr(const unsigned int&)’
> WTF::getPtr isn't defined for unsigned int :(
Should it be defined? or else we need to add another type for "unsigned int" as we did for String in JSDOMbindings.h like template<> inline JSC::JSValue jsArray(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Vector<unsigned int>& iterator) { ... }
Vineet Chaudhary (vineetc)
Comment 20
2012-04-24 00:54:22 PDT
(In reply to
comment #18
)
> (In reply to
comment #15
) > > (From update of
attachment 138310
[details]
[details]) > > Clearing flags on attachment: 138310 > > > > Committed
r114887
: <
http://trac.webkit.org/changeset/114887
> > > I still can't compile the syntax "readonly attribute float[] axes;" in the file "Source/WebCore/Modules/gamepad/Gamepad.idl:34". > It generated in JSGamepad.cpp: > #include "JSfloat[].h" > #include "float[].h" > Which can't be found.
Sorry Sean Wang this patch won't fix "float[]". Are you using readonly attribute float[] axes; idl interface or readonly attribute sequence<float> axes;
Ryosuke Niwa
Comment 21
2012-04-24 00:56:11 PDT
(In reply to
comment #19
)
> Should it be defined? or else we need to add another type for "unsigned int" as we did for String in JSDOMbindings.h like
Maybe. Or you can use traits to generalize the String case.
Sean Wang
Comment 22
2012-04-24 06:44:03 PDT
(In reply to
comment #20
)
> (In reply to
comment #18
) > > (In reply to
comment #15
) > > > (From update of
attachment 138310
[details]
[details] [details]) > > > Clearing flags on attachment: 138310 > > > > > > Committed
r114887
: <
http://trac.webkit.org/changeset/114887
> > > > > I still can't compile the syntax "readonly attribute float[] axes;" in the file "Source/WebCore/Modules/gamepad/Gamepad.idl:34". > > It generated in JSGamepad.cpp: > > #include "JSfloat[].h" > > #include "float[].h" > > Which can't be found. > > Sorry Sean Wang this patch won't fix "float[]". Are you using > readonly attribute float[] axes; idl interface or > readonly attribute sequence<float> axes;
I'm using "readonly attribute float[] axes;". It seems it is the same issue according to the title of this bug. kentaro Hara<
haraken@chromium.org
> told me that JSC generator should support this syntax, right?
Kentaro Hara
Comment 23
2012-04-24 06:51:40 PDT
(In reply to
comment #22
)
> > Sorry Sean Wang this patch won't fix "float[]". Are you using > > readonly attribute float[] axes; idl interface or > > readonly attribute sequence<float> axes; > > I'm using "readonly attribute float[] axes;". It seems it is the same issue according to the title of this bug. > kentaro Hara<
haraken@chromium.org
> told me that JSC generator should support this syntax, right?
Thanks sam. I think we should use "readonly attribute float[] axes". Regarding the difference between the array and the sequence, the spec says... - Sequences are always passed by value. - Unlike sequences, arrays are passed by reference. - Sequences must not be used as the type of an attribute, constant or exception field.
http://www.w3.org/TR/WebIDL/#idl-array
http://www.w3.org/TR/WebIDL/#idl-sequence
Vineet Chaudhary (vineetc)
Comment 24
2012-04-24 08:59:58 PDT
Created
attachment 138573
[details]
Patch_With_Traits Attaching patch with using traits. I have tested compilation works now for readonly attribute sequence<unsigned int> fastMallocStatistics; In future we can add traits for other types as required like template<> struct traits<boolean> { static inline v8::Handle<v8::Value> arrayV8Value(const unsigned int& value, v8::Isolate*) { return v8Boolean(value); } };
Kentaro Hara
Comment 25
2012-04-24 09:01:54 PDT
(In reply to
comment #24
)
> Attaching patch with using traits. I have tested compilation works now for > > readonly attribute sequence<unsigned int> fastMallocStatistics;
As I commented, it seems wrong to support sequences in attributes:
http://www.w3.org/TR/WebIDL/#idl-sequence
"Sequences must not be used as the type of an attribute, constant or exception field."
Ryosuke Niwa
Comment 26
2012-04-24 10:30:32 PDT
(In reply to
comment #25
)
> (In reply to
comment #24
) > > Attaching patch with using traits. I have tested compilation works now for > > > > readonly attribute sequence<unsigned int> fastMallocStatistics; > > As I commented, it seems wrong to support sequences in attributes: >
http://www.w3.org/TR/WebIDL/#idl-sequence
> > "Sequences must not be used as the type of an attribute, constant or exception field."
Okay, but that still won't work because of the issue on the
comment #22
.
Kentaro Hara
Comment 27
2012-04-24 10:33:38 PDT
(In reply to
comment #26
)
> (In reply to
comment #25
) > > (In reply to
comment #24
) > > > Attaching patch with using traits. I have tested compilation works now for > > > > > > readonly attribute sequence<unsigned int> fastMallocStatistics; > > > > As I commented, it seems wrong to support sequences in attributes: > >
http://www.w3.org/TR/WebIDL/#idl-sequence
> > > > "Sequences must not be used as the type of an attribute, constant or exception field." > > Okay, but that still won't work because of the issue on the
comment #22
.
We are discussing what we should treat the issue (T[] or sequence<T>) in
https://bugs.webkit.org/show_bug.cgi?id=80696
, before moving things forward. Please wait for a moment:)
Vineet Chaudhary (vineetc)
Comment 28
2012-04-24 22:31:52 PDT
(In reply to
comment #26
)
> (In reply to
comment #25
) > > (In reply to
comment #24
) > > > Attaching patch with using traits. I have tested compilation works now for > > > > > > readonly attribute sequence<unsigned int> fastMallocStatistics; > > > > As I commented, it seems wrong to support sequences in attributes: > >
http://www.w3.org/TR/WebIDL/#idl-sequence
> > > > "Sequences must not be used as the type of an attribute, constant or exception field." > > Okay, but that still won't work because of the issue on the
comment #22
.
You can please land your patch with custom bindings if you are in hurry I will remove those custom bindings later as we had confusion between sequence<T> and Array[] and now agree on using Array[] instead of sequence<>.
Vineet Chaudhary (vineetc)
Comment 29
2012-06-28 05:15:38 PDT
Created
attachment 149931
[details]
updatedPatchWithTraits Updated patch to simplify the JSDOMBinding.h and V8Binding.h replacing specialised functions with traits. So in future if someone wants to add jsArray() for new datatype need not to write jsArray() again. eg. For "unsigned int" it needs to add below code only. template<> struct traits<unsigned int> { static inline JSC::JSValue arrayJSValue(JSC::ExecState* , JSDOMGlobalObject*, const unsigned int& value) { return JSC::jsNumber(value); } }; Same for V8Binding too. Also now I don't see the dependency of this bug for
Bug84929
. Can we remove it from block list?
Kentaro Hara
Comment 30
2012-06-28 08:41:52 PDT
Comment on
attachment 149931
[details]
updatedPatchWithTraits View in context:
https://bugs.webkit.org/attachment.cgi?id=149931&action=review
Looks OK with some nits
> Source/WebCore/ChangeLog:3 > + JS binding code generator doesn't handle "attribute unsigned long[]" well
Is this title still valid?
> Source/WebCore/bindings/js/JSDOMBinding.h:285 > + struct traits {
Nit: traits => Traits
> Source/WebCore/bindings/js/JSDOMBinding.h:302 > + static inline JSC::JSValue arrayJSValue(JSC::ExecState* , JSDOMGlobalObject*, const float& value)
Nit: An extra space after JSC::ExecState*.
> Source/WebCore/bindings/js/JSDOMBinding.h:314 > + typedef T type; > + typedef traits<type> traitsType;
Nit: traitsType => TraitsType Nit: These two lines could be 'typedef traits<T> traitsType'.
> Source/WebCore/bindings/js/JSDOMBinding.h:317 > + list.append(traitsType::arrayJSValue(exec, globalObject, (*iter)));
Nit: (*iter) => *iter
> Source/WebCore/bindings/v8/V8Binding.h:363 > + typedef T type; > + typedef traits<type> traitsType;
Nit: typedef traits<T> traitsType.
> Source/WebCore/bindings/v8/V8Binding.h:365 > + result->Set(v8::Integer::New(index++), traitsType::arrayV8Value((*iter), isolate));
Nit: (*iter) => *iter
Kentaro Hara
Comment 31
2012-06-28 08:43:12 PDT
> Also now I don't see the dependency of this bug for
Bug84929
. Can we remove it from block list?
Removed.
Vineet Chaudhary (vineetc)
Comment 32
2012-06-29 02:02:30 PDT
Created
attachment 150115
[details]
Updated Patch Updated patch.
Vineet Chaudhary (vineetc)
Comment 33
2012-06-29 02:06:42 PDT
(In reply to
comment #30
)
> > Source/WebCore/ChangeLog:3 > > + JS binding code generator doesn't handle "attribute unsigned long[]" well > > Is this title still valid?
Yes as JSDOMBinding and V8Bindings wont compile for "unsigned long" this patch will allow use of "unsigned long" in idls as return type of api(used as unsigned long sequence<T> method()) or attributes.
Kentaro Hara
Comment 34
2012-06-29 02:10:38 PDT
Comment on
attachment 150115
[details]
Updated Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=150115&action=review
OK!
> Source/WebCore/bindings/js/JSDOMBinding.h:306 > + template<> > + struct Traits<float> { > + static inline JSC::JSValue arrayJSValue(JSC::ExecState*, JSDOMGlobalObject*, const float& value) > + { > + return JSC::jsNumber(value); > + } > + };
We might have discussed this before, but what is the reason why JSC needs Traits<float> but V8 does not need Traits<float>? (Anyway you can fix it in a follow-up patch, if needed.)
Vineet Chaudhary (vineetc)
Comment 35
2012-06-29 02:22:05 PDT
Comment on
attachment 150115
[details]
Updated Patch
>> what is the reason why JSC needs Traits<float> but V8 does not need Traits<float>? (Anyway you can fix it in a follow-up patch, if needed.)
Actually float[] is used in Gamepad.idl which complies code for JS only so I thought adding code as required.
Kentaro Hara
Comment 36
2012-06-29 02:24:48 PDT
Comment on
attachment 150115
[details]
Updated Patch Thanks for the clarification.
Vineet Chaudhary (vineetc)
Comment 37
2012-06-29 03:19:59 PDT
Comment on
attachment 150115
[details]
Updated Patch With the recent changes in
https://bugs.webkit.org/show_bug.cgi?id=90238
V8Binding.h got modified I need to rebase changes again :(.
Vineet Chaudhary (vineetc)
Comment 38
2012-06-29 03:49:49 PDT
Created
attachment 150129
[details]
rebasedPatch Rebaselined patch due merge conflicts in previous patch.
WebKit Review Bot
Comment 39
2012-06-29 05:26:06 PDT
Comment on
attachment 150129
[details]
rebasedPatch Clearing flags on attachment: 150129 Committed
r121554
: <
http://trac.webkit.org/changeset/121554
>
WebKit Review Bot
Comment 40
2012-06-29 05:26:12 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug