Don't use Node's internal APIs

This commit is contained in:
Cheng Zhao 2015-09-07 16:12:31 +08:00
parent 24bbe5dabf
commit 46b2b91a27
8 changed files with 25 additions and 21 deletions

View file

@ -35,7 +35,8 @@ Tray::~Tray() {
// static
mate::Wrappable* Tray::New(v8::Isolate* isolate, const gfx::Image& image) {
if (!Browser::Get()->is_ready()) {
node::ThrowError(isolate, "Cannot create Tray before app is ready");
isolate->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate, "Cannot create Tray before app is ready")));
return nullptr;
}
return new Tray(image);