diff --git a/atom/common/platform_util_linux.cc b/atom/common/platform_util_linux.cc index a8940fd68f..63488fe7df 100644 --- a/atom/common/platform_util_linux.cc +++ b/atom/common/platform_util_linux.cc @@ -93,6 +93,7 @@ void OpenExternal(const GURL& url, bool activate, const OpenExternalCallback& callback) { // TODO(gabriel): Implement async open if callback is specified bool opened = OpenExternal(url, activate); + v8::Isolate* isolate = v8::Isolate::GetCurrent(); if (!opened) { callback.Run(v8::Exception::Error( v8::String::NewFromUtf8(isolate, "Failed to open"))); diff --git a/atom/common/platform_util_win.cc b/atom/common/platform_util_win.cc index 34cc2b1835..6c59699a83 100644 --- a/atom/common/platform_util_win.cc +++ b/atom/common/platform_util_win.cc @@ -320,6 +320,7 @@ void OpenExternal(const base::string16& url, bool activate, const OpenExternalCallback& callback) { // TODO(gabriel): Implement async open if callback is specified bool opened = OpenExternal(url, activate); + v8::Isolate* isolate = v8::Isolate::GetCurrent(); if (!opened) { callback.Run(v8::Exception::Error( v8::String::NewFromUtf8(isolate, "Failed to open")));