iotjs icon indicating copy to clipboard operation
iotjs copied to clipboard

Revise ugly looking module wrapper

Open ILyoan opened this issue 11 years ago • 2 comments

Currently, to make module a function we wrapping over js source with wrapper looking somewhat ugly.

  const char* wrapper[2] = {
    "(function (a, b, c) { function wwwwrap(exports,require, module) {",
    " }; wwwwrap(a, b, c); });" };

This double wrapping is because single wrapping results in bug with losing captured variables. This is probably bug on eval functionality of jerry.

ILyoan avatar May 22 '15 08:05 ILyoan

All test not requring 'buffer' module seems run without problem.

ILyoan avatar Jun 18 '15 05:06 ILyoan

Closing as resolved.

ILyoan avatar Sep 21 '15 01:09 ILyoan