{"size": 866, "ext": "js", "max_stars_repo_path": "deps/mozjs/src/jit-test/tests/debug/Object-boundTargetFunction-02.js", "max_stars_repo_name": "ktrzeciaknubisa/jxcore-binary-packaging", "max_stars_repo_stars_event_min_datetime": "2015-02-11T04:34:13.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T14:21:47.000Z", "max_issues_repo_path": "deps/mozjs/src/jit-test/tests/debug/Object-boundTargetFunction-02.js", "max_issues_repo_name": "ktrzeciaknubisa/jxcore-binary-packaging", "max_issues_repo_issues_event_min_datetime": "2015-02-11T17:14:26.000Z", "max_issues_repo_issues_event_max_datetime": "2021-04-13T09:58:39.000Z", "max_forks_repo_path": "deps/mozjs/src/jit-test/tests/debug/Object-boundTargetFunction-02.js", "max_forks_repo_name": "ktrzeciaknubisa/jxcore-binary-packaging", "max_forks_repo_forks_event_min_datetime": "2015-02-12T13:45:46.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T05:28:05.000Z"}
{"max_stars_count": 2494, "max_issues_count": 685, "max_forks_count": 442, "avg_line_length": 33.3076923077, "max_line_length": 55, "alphanum_fraction": 0.7494226328}
// Test that bound function accessors work on:
// - an ordinary non-bound function;
// - a native function;
// - and an object that isn't a function at all.

var g = newGlobal();
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
var fw = gw.evalInGlobal("function f() {}; f").return;
assertEq(fw.isBoundFunction, false);
assertEq(fw.boundThis, undefined);
assertEq(fw.boundArguments, undefined);
assertEq(fw.boundTargetFunction, undefined);

var nw = gw.evalInGlobal("var n = Math.max; n").return;
assertEq(nw.isBoundFunction, false);
assertEq(nw.boundThis, undefined);
assertEq(nw.boundArguments, undefined);
assertEq(nw.boundTargetFunction, undefined);

var ow = gw.evalInGlobal("var o = {}; o").return;
assertEq(ow.isBoundFunction, false);
assertEq(ow.boundThis, undefined);
assertEq(ow.boundArguments, undefined);
assertEq(ow.boundTargetFunction, undefined);
