mirror of
https://github.com/electron/electron.git
synced 2026-01-25 23:38:18 -05:00
Fix crash when calling method of destroyed object.
This commit is contained in:
@@ -21,6 +21,10 @@ EventEmitter::EventEmitter(v8::Handle<v8::Object> wrapper) {
|
||||
}
|
||||
|
||||
EventEmitter::~EventEmitter() {
|
||||
// Clear the aligned pointer, it should have been done by ObjectWrap but
|
||||
// somehow node v0.11.x changed this behaviour.
|
||||
v8::HandleScope handle_scope(node_isolate);
|
||||
handle()->SetAlignedPointerInInternalField(0, NULL);
|
||||
}
|
||||
|
||||
bool EventEmitter::Emit(const std::string& name) {
|
||||
|
||||
Reference in New Issue
Block a user