diff --git a/static/source/embindmaker/embindmaker.cxx b/static/source/embindmaker/embindmaker.cxx index f9540c1f006b..6c0017ccb8c2 100644 --- a/static/source/embindmaker/embindmaker.cxx +++ b/static/source/embindmaker/embindmaker.cxx @@ -1088,12 +1088,7 @@ SAL_IMPLEMENT_MAIN() " .class_function(\"reference\", +[](" << cppName(ifc) << " * the_interface) { return ::com::sun::star::uno::Reference(the_interface); " - "}, ::emscripten::allow_raw_pointers())\n" - " .function(\"$equals\", +[](::com::sun::star::uno::Reference<" - << cppName(ifc) - << "> const & the_self, " - "::com::sun::star::uno::Reference<::com::sun::star::uno::XInterface> const & " - "the_other) { return the_self == the_other; })\n"; + "}, ::emscripten::allow_raw_pointers())\n"; if (bases.size() > 1) { std::set visitedBases; diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx b/static/source/unoembindhelpers/PrimaryBindings.cxx index 7abf88669d02..862cbb1101e2 100644 --- a/static/source/unoembindhelpers/PrimaryBindings.cxx +++ b/static/source/unoembindhelpers/PrimaryBindings.cxx @@ -13,8 +13,10 @@ #include #include +#include #include #include +#include #include #include #include @@ -401,6 +403,9 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings) function("throwUnoException", +[](css::uno::Type const& type, emscripten::val const& value) { cppu::throwException(constructAny(type, value)); }); + function("sameUnoObject", + +[](css::uno::Reference const& ref1, + css::uno::Reference const& ref2) { return ref1 == ref2; }); function("rtl_uString_release", +[](std::uintptr_t ptr) { rtl_uString_release(reinterpret_cast(ptr)); }); diff --git a/unotest/source/embindtest/embindtest.js b/unotest/source/embindtest/embindtest.js index 784530597392..6d89a728dbdf 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)); + console.assert(Module.sameUnoObject(v.get(), test)); console.assert(test.isAnyInterface(v)); v.delete(); let a = new Module.uno_Any(