-
Bug
-
Resolution: Fixed
-
P3
-
8
-
None
-
b102
-
generic
-
generic
-
Verified
var a = {}
var obj = new java.util.HashMap();
Object.bindProperties(a, obj);
// Java method toString is bound to "a" as a property
try {
print(a);
} catch (e) {
print(e);
}
var a = {}
var global = loadWithNewGlobal({ name:"xx", script: "this" });
var obj = global.eval("({ toString: function() { return 'hello'; } })");
// ScriptObjectMirror's toString is bound as a property for "a"
Object.bindProperties(a, obj);
try {
print(a);
} catch (e) {
print(e);
}
TypeError is thrown in such cases.
TypeError: Cannot get default string value
TypeError: Cannot get default string value
All 'callables' - not just ScriptFunction instances - should be handled uniformly ( Java dynamic method, ScriptObjectMirror's function property etc.)
var obj = new java.util.HashMap();
Object.bindProperties(a, obj);
// Java method toString is bound to "a" as a property
try {
print(a);
} catch (e) {
print(e);
}
var a = {}
var global = loadWithNewGlobal({ name:"xx", script: "this" });
var obj = global.eval("({ toString: function() { return 'hello'; } })");
// ScriptObjectMirror's toString is bound as a property for "a"
Object.bindProperties(a, obj);
try {
print(a);
} catch (e) {
print(e);
}
TypeError is thrown in such cases.
TypeError: Cannot get default string value
TypeError: Cannot get default string value
All 'callables' - not just ScriptFunction instances - should be handled uniformly ( Java dynamic method, ScriptObjectMirror's function property etc.)