summaryrefslogtreecommitdiff
path: root/cpp/src/slice2js/JsUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2js/JsUtil.cpp')
-rw-r--r--cpp/src/slice2js/JsUtil.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/cpp/src/slice2js/JsUtil.cpp b/cpp/src/slice2js/JsUtil.cpp
index 8046c115102..674644873d4 100644
--- a/cpp/src/slice2js/JsUtil.cpp
+++ b/cpp/src/slice2js/JsUtil.cpp
@@ -574,10 +574,24 @@ Slice::JsGenerator::getHelper(const TypePtr& type)
return typeToString(type) + "._helper";
}
- if(ProxyPtr::dynamicCast(type) || StructPtr::dynamicCast(type))
+ if(StructPtr::dynamicCast(type))
{
return typeToString(type);
}
+
+ ProxyPtr prx = ProxyPtr::dynamicCast(type);
+ if(prx)
+ {
+ ClassDefPtr def = prx->_class()->definition();
+ if(def->isInterface() || def->allOperations().size() > 0)
+ {
+ return typeToString(type);
+ }
+ else
+ {
+ return "Ice.ObjectPrx";
+ }
+ }
if(SequencePtr::dynamicCast(type) || DictionaryPtr::dynamicCast(type))
{