summaryrefslogtreecommitdiff
path: root/unotest
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2024-04-16 10:17:08 +0200
committerStephan Bergmann <stephan.bergmann@allotropia.de>2024-04-16 20:35:22 +0200
commit0957ee9f5d379c80fca4027c187b471118d0490d (patch)
tree02b6ba6819815dbe343f63c055db9d0bc3f0dea6 /unotest
parent7897f1d9835f686dd042348c51f7d2326de71971 (diff)
Embind: No need for $query
...to "upcast" from css::uno::Reference<T> to base css::uno::Reference<css::uno::XInterface>. My understanding now is that due to the sharing_policy::INTRUSIVE we specify for emscripten::smart_ptr_trait<css::uno::Reference<T>> (include/static/unoembindhelpers/PrimaryBindings.hxx), Embind can internally "upcast" from a css::uno::Reference<T> to a base css::uno::Reference<css::uno::XInterface> by just treating the encapsulated raw pointer of type T* as a raw pointer of type css::uno::XInterface* (see the use of that sharingPolicy in genericPointerToWireType in Emscripten's src/embind/embind.js; though documentation of that Embind sharing_policy is rather poor). Change-Id: I6ed60a9c94af6aba6fc6119bf644da7f507a997f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166142 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'unotest')
-rw-r--r--unotest/source/embindtest/embindtest.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/unotest/source/embindtest/embindtest.js b/unotest/source/embindtest/embindtest.js
index 749488cfa567..67c0d2b77c13 100644
--- a/unotest/source/embindtest/embindtest.js
+++ b/unotest/source/embindtest/embindtest.js
@@ -308,7 +308,7 @@ Module.addOnPostRun(function() {
{
let v = test.getAnyInterface();
console.log(v);
- console.assert(v.get().$equals(test.$query()));
+ console.assert(v.get().$equals(test));
console.assert(test.isAnyInterface(v));
v.delete();
let a = new Module.uno_Any(