docs: def eval(self, js_str, timeout=0, max_memory=0):
          """ Eval the JavaScript string """
  
          if is_unicode(js_str):
              bytes_val = js_str.encode("utf8")
          else:
              bytes_val = js_str
  
          res = None
          self.lock.acquire()
          try:
              res = self.ext.mr_eval_context(self.ctx,
                                             bytes_val,
                                             len(bytes_val),
                                             ctypes.c_ulong(timeout),
                                             ctypes.c_size_t(max_memory))
  
              if bool(res) is False:
                  raise JSConversionException()
              python_value = res.contents.to_python()
              return python_value
          finally:
              self.lock.release()
              if res is not None:
                  self.free(res)