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 {
|
||||
static void Destroy(Arguments* args) {
|
||||
if (IsDestroyed(args))
|
||||
return;
|
||||
|
||||
v8::Local<v8::Object> holder = args->GetHolder();
|
||||
delete static_cast<WrappableBase*>(
|
||||
holder->GetAlignedPointerFromInternalField(0));
|
||||
|
|
|
@ -24,8 +24,11 @@ WrappableBase::~WrappableBase() {
|
|||
}
|
||||
|
||||
v8::Local<v8::Object> WrappableBase::GetWrapper() {
|
||||
CHECK(!wrapper_.IsEmpty());
|
||||
return v8::Local<v8::Object>::New(isolate_, wrapper_);
|
||||
DCHECK(!wrapper_.IsEmpty());
|
||||
if (!wrapper_.IsEmpty())
|
||||
return v8::Local<v8::Object>::New(isolate_, wrapper_);
|
||||
else
|
||||
return v8::Local<v8::Object>();
|
||||
}
|
||||
|
||||
void WrappableBase::InitWith(v8::Isolate* isolate,
|
||||
|
|
Loading…
Reference in a new issue