kripken/emscripten — pull request #2974 by pvandertak (2014-11-06 11:43:34+00:00)
Title: Fix invoking a javascript function contained in an emscripten::val when compiled with closure.

Calling a javascript function that was passed as an emscripten::val using embind causes the generated javascript to reference a null value when closure is enabled. Closure translates argPackAdvance to a small variable name, but does not translate 'argPackAdvance' which is used in other places.

I ran the other.test_embind suite, but the output is somewhat confusing (see below). I could not figure out how to run the test suite with closure enabled (since I cannot use the "ALL." prefix together with the "other." prefix that seems to be necessary for embind). Are the embind tests ever run with closure enabled? Because then I would expect the "can call functions from C++" test to fail.

```
c:\Program Files\Emscripten\emscripten\incoming>python tests/runner.py other.test_embind
test_embind (test_other.other) ... [] True
['--bind'] False
warning: unresolved symbol: _ZN17MultipleOverloads11staticValueE
['--bind', '-O1'] False
warning: unresolved symbol: _ZN17MultipleOverloads11staticValueE
['--bind', '-O2'] False
warning: unresolved symbol: _ZN17MultipleOverloads11staticValueE
ok

----------------------------------------------------------------------
Ran 1 test in 48.372s

OK
```