mirror of https://github.com/svaarala/duktape.git
Browse Source
Fix incorrect assert (with no underlying bug) when bound function chain resolves to a Proxy objectpull/2107/head
Sami Vaarala
6 years ago
committed by
GitHub
5 changed files with 52 additions and 1 deletions
@ -0,0 +1,44 @@ |
|||
/* |
|||
* https://github.com/svaarala/duktape/issues/2049
|
|||
*/ |
|||
|
|||
/*=== |
|||
still here |
|||
===*/ |
|||
|
|||
try { |
|||
// Note: variable names don't make much sense.
|
|||
var origEval = new Proxy(Function, {}); |
|||
eval = origEval.bind(); |
|||
eval(); |
|||
print('still here'); |
|||
} catch (e) { |
|||
print(e.stack || e); |
|||
} |
|||
|
|||
/*=== |
|||
function called |
|||
this: mythis |
|||
args: 1 2 3 4 undefined |
|||
still here |
|||
===*/ |
|||
|
|||
try { |
|||
// Extend original repro case, ensure target gets called.
|
|||
var origEval = new Proxy(function (a, b, c, d, e) { |
|||
print('function called'); |
|||
print('this:', this); |
|||
print('args:', a, b, c, d, e); |
|||
}, {}); |
|||
eval = origEval.bind('mythis', 1); |
|||
eval(2, 3, 4); |
|||
print('still here'); |
|||
} catch (e) { |
|||
print(e.stack || e); |
|||
} |
|||
|
|||
/*=== |
|||
done |
|||
===*/ |
|||
|
|||
print('done'); |
Loading…
Reference in new issue