Skip to content

Propagating exceptions from JS through Python to JS has a memory leak #283

@mmomtchev

Description

@mmomtchev

The following test leaks memory:

it('catching JS exceptions propagated through Python', () => {
  const fn = PyObject.fromJS(() => {
    throw new Error('JS exception');
  });

  assert.isTrue(fn.callable);
  assert.equal(fn.type, 'pymport.js_function');

  const py_catch = pymport('python_helpers').get('dont_catch_exception');

  assert.throws(() => {
    py_catch.call(fn);
  }, /Python exception: JS exception/);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions