WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
172898
Implement DOMMatrix's fromFloat32Array / fromFloat64Array & toFloat32Array / toFloat64Array
https://bugs.webkit.org/show_bug.cgi?id=172898
Summary
Implement DOMMatrix's fromFloat32Array / fromFloat64Array & toFloat32Array / ...
Chris Dumez
Reported
2017-06-03 13:26:04 PDT
Implement DOMMatrix's fromFloat32Array / fromFloat64Array & toFloat32Array / toFloat64Array: -
https://drafts.fxtf.org/geometry/#dommatrixreadonly
Attachments
WIP Patch
(12.17 KB, patch)
2017-06-03 13:41 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(21.98 KB, patch)
2017-06-03 14:24 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(22.15 KB, patch)
2017-06-03 16:16 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(22.32 KB, patch)
2017-06-03 18:15 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2017-06-03 13:41:32 PDT
Created
attachment 311942
[details]
WIP Patch
Chris Dumez
Comment 2
2017-06-03 14:24:38 PDT
Created
attachment 311943
[details]
Patch
Chris Dumez
Comment 3
2017-06-03 16:16:14 PDT
Created
attachment 311948
[details]
Patch
Sam Weinig
Comment 4
2017-06-03 16:45:32 PDT
Comment on
attachment 311948
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=311948&action=review
> Source/WebCore/css/DOMMatrixReadOnly.idl:97 > + [NewObject] Float32Array? toFloat32Array(); > + [NewObject] Float64Array? toFloat64Array();
Perhaps this should throw an out of memory exception rather than making them nullable?
Chris Dumez
Comment 5
2017-06-03 17:07:52 PDT
(In reply to Sam Weinig from
comment #4
)
> Comment on
attachment 311948
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=311948&action=review
> > > Source/WebCore/css/DOMMatrixReadOnly.idl:97 > > + [NewObject] Float32Array? toFloat32Array(); > > + [NewObject] Float64Array? toFloat64Array(); > > Perhaps this should throw an out of memory exception rather than making them > nullable?
Good idea, will do.
Chris Dumez
Comment 6
2017-06-03 17:45:40 PDT
(In reply to Sam Weinig from
comment #4
)
> Comment on
attachment 311948
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=311948&action=review
> > > Source/WebCore/css/DOMMatrixReadOnly.idl:97 > > + [NewObject] Float32Array? toFloat32Array(); > > + [NewObject] Float64Array? toFloat64Array(); > > Perhaps this should throw an out of memory exception rather than making them > nullable?
Wait, is there such an exception? Cannot find it.
Chris Dumez
Comment 7
2017-06-03 17:47:44 PDT
(In reply to Chris Dumez from
comment #6
)
> (In reply to Sam Weinig from
comment #4
) > > Comment on
attachment 311948
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=311948&action=review
> > > > > Source/WebCore/css/DOMMatrixReadOnly.idl:97 > > > + [NewObject] Float32Array? toFloat32Array(); > > > + [NewObject] Float64Array? toFloat64Array(); > > > > Perhaps this should throw an out of memory exception rather than making them > > nullable? > > Wait, is there such an exception? Cannot find it.
From WebIDL: "UnknownError" The operation failed for an unknown transient reason (e.g. out of memory). I guess I'll use that.
Chris Dumez
Comment 8
2017-06-03 17:53:05 PDT
Darn, MayThrowException does not seem to play nicely with typed array :( In file included from /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrixReadOnly.cpp:27: In file included from /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvert.h:30: In file included from /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertBufferSource.h:29: /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertInterface.h:74:16: error: call to 'toJSNewlyCreated' is ambiguous In file included from /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrixReadOnly.cpp:27: In file included from /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvert.h:28: In file included from /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertAny.h:29: /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertBase.h:165:28: note: in instantiation of function template specialization 'WebCore::JSConverter<WebCore::IDLInterface<JSC::GenericTypedArrayView<JSC::Float32Adaptor> > >::convertNewlyCreated<WTF::Ref<JSC::GenericTypedArrayView<JSC::Float32Adaptor> > >' requested here /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertBase.h:175:12: note: in instantiation of function template specialization 'WebCore::toJSNewlyCreated<WebCore::IDLInterface<JSC::GenericTypedArrayView<JSC::Float32Adaptor> >, WTF::Ref<JSC::GenericTypedArrayView<JSC::Float32Adaptor> > >' requested here /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrixReadOnly.cpp:877:28: note: in instantiation of function template specialization 'WebCore::toJSNewlyCreated<WebCore::IDLInterface<JSC::GenericTypedArrayView<JSC::Float32Adaptor> >, WTF::Ref<JSC::GenericTypedArrayView<JSC::Float32Adaptor> > >' requested here In file included from /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrixReadOnly.cpp:22: /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrixReadOnly.h:78:14: note: candidate function JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Ref<DOMMatrixReadOnly>&&); /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrixReadOnly.h:79:21: note: candidate function inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RefPtr<DOMMatrixReadOnly>&& impl) { return impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } In file included from /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrixReadOnly.cpp:29: /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrix.h:62:14: note: candidate function JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Ref<DOMMatrix>&&); /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrix.h:63:21: note: candidate function inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RefPtr<DOMMatrix>&& impl) { return impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } In file included from /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrixReadOnly.cpp:27: In file included from /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvert.h:30: In file included from /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertBufferSource.h:29: /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertInterface.h:74:16: error: call to 'toJSNewlyCreated' is ambiguous In file included from /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrixReadOnly.cpp:27: In file included from /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvert.h:28: In file included from /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertAny.h:29: /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertBase.h:165:28: note: in instantiation of function template specialization 'WebCore::JSConverter<WebCore::IDLInterface<JSC::GenericTypedArrayView<JSC::Float64Adaptor> > >::convertNewlyCreated<WTF::Ref<JSC::GenericTypedArrayView<JSC::Float64Adaptor> > >' requested here /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertBase.h:175:12: note: in instantiation of function template specialization 'WebCore::toJSNewlyCreated<WebCore::IDLInterface<JSC::GenericTypedArrayView<JSC::Float64Adaptor> >, WTF::Ref<JSC::GenericTypedArrayView<JSC::Float64Adaptor> > >' requested here /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrixReadOnly.cpp:890:28: note: in instantiation of function template specialization 'WebCore::toJSNewlyCreated<WebCore::IDLInterface<JSC::GenericTypedArrayView<JSC::Float64Adaptor> >, WTF::Ref<JSC::GenericTypedArrayView<JSC::Float64Adaptor> > >' requested here In file included from /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrixReadOnly.cpp:22: /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrixReadOnly.h:78:14: note: candidate function JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Ref<DOMMatrixReadOnly>&&); /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrixReadOnly.h:79:21: note: candidate function inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RefPtr<DOMMatrixReadOnly>&& impl) { return impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } In file included from /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrixReadOnly.cpp:29: /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrix.h:62:14: note: candidate function JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Ref<DOMMatrix>&&); /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/JSDOMMatrix.h:63:21: note: candidate function inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RefPtr<DOMMatrix>&& impl) { return impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } 2 errors generated.
Sam Weinig
Comment 9
2017-06-03 18:06:40 PDT
(In reply to Chris Dumez from
comment #8
)
> Darn, MayThrowException does not seem to play nicely with typed array :( > > In file included from > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrixReadOnly.cpp:27: > In file included from > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvert.h:30: > In file included from > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/ > JSDOMConvertBufferSource.h:29: > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/ > JSDOMConvertInterface.h:74:16: error: call to 'toJSNewlyCreated' is ambiguous > In file included from > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrixReadOnly.cpp:27: > In file included from > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvert.h:28: > In file included from > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertAny.h: > 29: > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertBase. > h:165:28: note: in instantiation of function template specialization > 'WebCore::JSConverter<WebCore::IDLInterface<JSC::GenericTypedArrayView<JSC:: > Float32Adaptor> > > >::convertNewlyCreated<WTF::Ref<JSC::GenericTypedArrayView<JSC:: > Float32Adaptor> > >' requested here > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertBase. > h:175:12: note: in instantiation of function template specialization > 'WebCore::toJSNewlyCreated<WebCore::IDLInterface<JSC:: > GenericTypedArrayView<JSC::Float32Adaptor> >, > WTF::Ref<JSC::GenericTypedArrayView<JSC::Float32Adaptor> > >' requested here > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrixReadOnly.cpp:877:28: note: in instantiation of function template > specialization > 'WebCore::toJSNewlyCreated<WebCore::IDLInterface<JSC:: > GenericTypedArrayView<JSC::Float32Adaptor> >, > WTF::Ref<JSC::GenericTypedArrayView<JSC::Float32Adaptor> > >' requested here > In file included from > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrixReadOnly.cpp:22: > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrixReadOnly.h:78:14: note: candidate function > JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, > Ref<DOMMatrixReadOnly>&&); > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrixReadOnly.h:79:21: note: candidate function > inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, > JSDOMGlobalObject* globalObject, RefPtr<DOMMatrixReadOnly>&& impl) { return > impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : > JSC::jsNull(); } > In file included from > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrixReadOnly.cpp:29: > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrix.h:62:14: note: candidate function > JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, > Ref<DOMMatrix>&&); > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrix.h:63:21: note: candidate function > inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, > JSDOMGlobalObject* globalObject, RefPtr<DOMMatrix>&& impl) { return impl ? > toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : > JSC::jsNull(); } > In file included from > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrixReadOnly.cpp:27: > In file included from > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvert.h:30: > In file included from > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/ > JSDOMConvertBufferSource.h:29: > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/ > JSDOMConvertInterface.h:74:16: error: call to 'toJSNewlyCreated' is ambiguous > In file included from > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrixReadOnly.cpp:27: > In file included from > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvert.h:28: > In file included from > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertAny.h: > 29: > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertBase. > h:165:28: note: in instantiation of function template specialization > 'WebCore::JSConverter<WebCore::IDLInterface<JSC::GenericTypedArrayView<JSC:: > Float64Adaptor> > > >::convertNewlyCreated<WTF::Ref<JSC::GenericTypedArrayView<JSC:: > Float64Adaptor> > >' requested here > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertBase. > h:175:12: note: in instantiation of function template specialization > 'WebCore::toJSNewlyCreated<WebCore::IDLInterface<JSC:: > GenericTypedArrayView<JSC::Float64Adaptor> >, > WTF::Ref<JSC::GenericTypedArrayView<JSC::Float64Adaptor> > >' requested here > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrixReadOnly.cpp:890:28: note: in instantiation of function template > specialization > 'WebCore::toJSNewlyCreated<WebCore::IDLInterface<JSC:: > GenericTypedArrayView<JSC::Float64Adaptor> >, > WTF::Ref<JSC::GenericTypedArrayView<JSC::Float64Adaptor> > >' requested here > In file included from > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrixReadOnly.cpp:22: > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrixReadOnly.h:78:14: note: candidate function > JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, > Ref<DOMMatrixReadOnly>&&); > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrixReadOnly.h:79:21: note: candidate function > inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, > JSDOMGlobalObject* globalObject, RefPtr<DOMMatrixReadOnly>&& impl) { return > impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : > JSC::jsNull(); } > In file included from > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrixReadOnly.cpp:29: > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrix.h:62:14: note: candidate function > JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, > Ref<DOMMatrix>&&); > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > JSDOMMatrix.h:63:21: note: candidate function > inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, > JSDOMGlobalObject* globalObject, RefPtr<DOMMatrix>&& impl) { return impl ? > toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : > JSC::jsNull(); } > 2 errors generated.
Yeah, whoever added TypeArray support (it surpassingly was not me) added it incorrectly and modeled TypedArrays as IDLInterfaces. Unfortunately, since they are not generated, they don't have all the necessary goods, like toJS()/toJSNewlyCreated() implementations. I should go in a make them their own IDL type.
Chris Dumez
Comment 10
2017-06-03 18:07:45 PDT
(In reply to Sam Weinig from
comment #9
)
> (In reply to Chris Dumez from
comment #8
) > > Darn, MayThrowException does not seem to play nicely with typed array :( > > > > In file included from > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrixReadOnly.cpp:27: > > In file included from > > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvert.h:30: > > In file included from > > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/ > > JSDOMConvertBufferSource.h:29: > > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/ > > JSDOMConvertInterface.h:74:16: error: call to 'toJSNewlyCreated' is ambiguous > > In file included from > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrixReadOnly.cpp:27: > > In file included from > > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvert.h:28: > > In file included from > > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertAny.h: > > 29: > > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertBase. > > h:165:28: note: in instantiation of function template specialization > > 'WebCore::JSConverter<WebCore::IDLInterface<JSC::GenericTypedArrayView<JSC:: > > Float32Adaptor> > > > >::convertNewlyCreated<WTF::Ref<JSC::GenericTypedArrayView<JSC:: > > Float32Adaptor> > >' requested here > > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertBase. > > h:175:12: note: in instantiation of function template specialization > > 'WebCore::toJSNewlyCreated<WebCore::IDLInterface<JSC:: > > GenericTypedArrayView<JSC::Float32Adaptor> >, > > WTF::Ref<JSC::GenericTypedArrayView<JSC::Float32Adaptor> > >' requested here > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrixReadOnly.cpp:877:28: note: in instantiation of function template > > specialization > > 'WebCore::toJSNewlyCreated<WebCore::IDLInterface<JSC:: > > GenericTypedArrayView<JSC::Float32Adaptor> >, > > WTF::Ref<JSC::GenericTypedArrayView<JSC::Float32Adaptor> > >' requested here > > In file included from > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrixReadOnly.cpp:22: > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrixReadOnly.h:78:14: note: candidate function > > JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, > > Ref<DOMMatrixReadOnly>&&); > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrixReadOnly.h:79:21: note: candidate function > > inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, > > JSDOMGlobalObject* globalObject, RefPtr<DOMMatrixReadOnly>&& impl) { return > > impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : > > JSC::jsNull(); } > > In file included from > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrixReadOnly.cpp:29: > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrix.h:62:14: note: candidate function > > JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, > > Ref<DOMMatrix>&&); > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrix.h:63:21: note: candidate function > > inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, > > JSDOMGlobalObject* globalObject, RefPtr<DOMMatrix>&& impl) { return impl ? > > toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : > > JSC::jsNull(); } > > In file included from > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrixReadOnly.cpp:27: > > In file included from > > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvert.h:30: > > In file included from > > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/ > > JSDOMConvertBufferSource.h:29: > > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/ > > JSDOMConvertInterface.h:74:16: error: call to 'toJSNewlyCreated' is ambiguous > > In file included from > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrixReadOnly.cpp:27: > > In file included from > > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvert.h:28: > > In file included from > > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertAny.h: > > 29: > > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertBase. > > h:165:28: note: in instantiation of function template specialization > > 'WebCore::JSConverter<WebCore::IDLInterface<JSC::GenericTypedArrayView<JSC:: > > Float64Adaptor> > > > >::convertNewlyCreated<WTF::Ref<JSC::GenericTypedArrayView<JSC:: > > Float64Adaptor> > >' requested here > > /Volumes/Data/WebKit/OpenSource/Source/WebCore/bindings/js/JSDOMConvertBase. > > h:175:12: note: in instantiation of function template specialization > > 'WebCore::toJSNewlyCreated<WebCore::IDLInterface<JSC:: > > GenericTypedArrayView<JSC::Float64Adaptor> >, > > WTF::Ref<JSC::GenericTypedArrayView<JSC::Float64Adaptor> > >' requested here > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrixReadOnly.cpp:890:28: note: in instantiation of function template > > specialization > > 'WebCore::toJSNewlyCreated<WebCore::IDLInterface<JSC:: > > GenericTypedArrayView<JSC::Float64Adaptor> >, > > WTF::Ref<JSC::GenericTypedArrayView<JSC::Float64Adaptor> > >' requested here > > In file included from > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrixReadOnly.cpp:22: > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrixReadOnly.h:78:14: note: candidate function > > JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, > > Ref<DOMMatrixReadOnly>&&); > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrixReadOnly.h:79:21: note: candidate function > > inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, > > JSDOMGlobalObject* globalObject, RefPtr<DOMMatrixReadOnly>&& impl) { return > > impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : > > JSC::jsNull(); } > > In file included from > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrixReadOnly.cpp:29: > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrix.h:62:14: note: candidate function > > JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, > > Ref<DOMMatrix>&&); > > /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebCore/ > > JSDOMMatrix.h:63:21: note: candidate function > > inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, > > JSDOMGlobalObject* globalObject, RefPtr<DOMMatrix>&& impl) { return impl ? > > toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : > > JSC::jsNull(); } > > 2 errors generated. > > Yeah, whoever added TypeArray support (it surpassingly was not me) added it > incorrectly and modeled TypedArrays as IDLInterfaces. Unfortunately, since > they are not generated, they don't have all the necessary goods, like > toJS()/toJSNewlyCreated() implementations. I should go in a make them their > own IDL type.
I think it might have been me :( Anyway, I'll get it building.
Sam Weinig
Comment 11
2017-06-03 18:09:21 PDT
(In reply to Chris Dumez from
comment #7
)
> (In reply to Chris Dumez from
comment #6
) > > (In reply to Sam Weinig from
comment #4
) > > > Comment on
attachment 311948
[details]
> > > Patch > > > > > > View in context: > > >
https://bugs.webkit.org/attachment.cgi?id=311948&action=review
> > > > > > > Source/WebCore/css/DOMMatrixReadOnly.idl:97 > > > > + [NewObject] Float32Array? toFloat32Array(); > > > > + [NewObject] Float64Array? toFloat64Array(); > > > > > > Perhaps this should throw an out of memory exception rather than making them > > > nullable? > > > > Wait, is there such an exception? Cannot find it. > > From WebIDL: > "UnknownError" The operation failed for an unknown transient reason (e.g. > out of memory). > > I guess I'll use that.
Alternatively, you could add a new type that converts to JSC::throwOutOfMemoryError() which is what the JavaScriptCore uses.
Chris Dumez
Comment 12
2017-06-03 18:15:57 PDT
Created
attachment 311951
[details]
Patch
Chris Dumez
Comment 13
2017-06-03 18:54:19 PDT
Comment on
attachment 311951
[details]
Patch Clearing flags on attachment: 311951 Committed
r217764
: <
http://trac.webkit.org/changeset/217764
>
Chris Dumez
Comment 14
2017-06-03 18:54:22 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