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

@ -209,8 +209,8 @@ void Window::OnExecuteWindowsCommand(const std::string& command_name) {
mate::Wrappable* Window::New(v8::Isolate* isolate,
const mate::Dictionary& options) {
if (!Browser::Get()->is_ready()) {
node::ThrowError(isolate,
"Cannot create BrowserWindow before app is ready");
isolate->ThrowException(v8::Exception::Error(mate::StringToV8(
isolate, "Cannot create BrowserWindow before app is ready")));
return nullptr;
}
return new Window(isolate, options);