fengzhao / fengzhao/pyv8

JSContext __exit__ does not unlock jslocker and __enter__ should lock instead of __init__

Open
#173 2 comments 0 reactions 0 assignees View on GitHub
auto-migrated OpSys-All Priority-Medium Type-Defect
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
What steps will reproduce the problem?
1. initialize context outside of with statement

ctxt = JSContext()
# lock already created and locked

with cx as ctxt:
do someting ..
#no unlocking because __exit__ method never unlocks
hasattr(JSLocker, 'lock'): will always be false
and lock is never released.
Heres the relevant code:

https://code.google.com/p/pyv8/source/browse/trunk/PyV8.py#780

Solution is to manually cll ctxt.leave()

This caused segfaults in my case.
```

Original issue reported on code.google.com by `melit.st...@gmail.com` on 29 Apr 2013 at 6:37

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.