Summary: | Implement DOMMatrix's fromFloat32Array / fromFloat64Array & toFloat32Array / toFloat64Array | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||||
Component: | CSS | Assignee: | Chris Dumez <cdumez> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | commit-queue, sam, simon.fraser | ||||||||||
Priority: | P2 | Keywords: | WebExposed | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
URL: | https://drafts.fxtf.org/geometry/#dommatrixreadonly | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 163505 | ||||||||||||
Attachments: |
|
Description
Chris Dumez
2017-06-03 13:26:04 PDT
Created attachment 311942 [details]
WIP Patch
Created attachment 311943 [details]
Patch
Created attachment 311948 [details]
Patch
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? (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. (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. (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. 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. (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. (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. (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. Created attachment 311951 [details]
Patch
Comment on attachment 311951 [details] Patch Clearing flags on attachment: 311951 Committed r217764: <http://trac.webkit.org/changeset/217764> All reviewed patches have been landed. Closing bug. |