JSContext __exit__ does not unlock jslocker and __enter__ should lock instead of __init__
Open
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.