Merge pull request #15 from mgc/muon-crash-workarounds
Upstream Muon changes to avoid crashing
This commit is contained in:
commit
bf92fa88b7
2 changed files with 8 additions and 2 deletions
|
@ -21,6 +21,9 @@ namespace internal {
|
||||||
|
|
||||||
struct Destroyable {
|
struct Destroyable {
|
||||||
static void Destroy(Arguments* args) {
|
static void Destroy(Arguments* args) {
|
||||||
|
if (IsDestroyed(args))
|
||||||
|
return;
|
||||||
|
|
||||||
v8::Local<v8::Object> holder = args->GetHolder();
|
v8::Local<v8::Object> holder = args->GetHolder();
|
||||||
delete static_cast<WrappableBase*>(
|
delete static_cast<WrappableBase*>(
|
||||||
holder->GetAlignedPointerFromInternalField(0));
|
holder->GetAlignedPointerFromInternalField(0));
|
||||||
|
|
|
@ -24,8 +24,11 @@ WrappableBase::~WrappableBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
v8::Local<v8::Object> WrappableBase::GetWrapper() {
|
v8::Local<v8::Object> WrappableBase::GetWrapper() {
|
||||||
CHECK(!wrapper_.IsEmpty());
|
DCHECK(!wrapper_.IsEmpty());
|
||||||
return v8::Local<v8::Object>::New(isolate_, wrapper_);
|
if (!wrapper_.IsEmpty())
|
||||||
|
return v8::Local<v8::Object>::New(isolate_, wrapper_);
|
||||||
|
else
|
||||||
|
return v8::Local<v8::Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WrappableBase::InitWith(v8::Isolate* isolate,
|
void WrappableBase::InitWith(v8::Isolate* isolate,
|
||||||
|
|
Loading…
Reference in a new issue