// static
void App::Initialize(v8::Handle<v8::Object> target) {
- v8::HandleScope handle_scope(node_isolate);
-
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(New);
t->InstanceTemplate()->SetInternalFieldCount(1);
t->SetClassName(v8::String::NewSymbol("Application"));
// static
void AutoUpdater::New(const v8::FunctionCallbackInfo<v8::Value>& args) {
- v8::HandleScope handle_scope(args.GetIsolate());
-
if (!args.IsConstructCall())
return node::ThrowError("Require constructor call");
// static
void AutoUpdater::Initialize(v8::Handle<v8::Object> target) {
- v8::HandleScope handle_scope(node_isolate);
-
v8::Local<v8::FunctionTemplate> t(
v8::FunctionTemplate::New(AutoUpdater::New));
t->InstanceTemplate()->SetInternalFieldCount(1);
}
void Initialize(v8::Handle<v8::Object> target) {
- v8::HandleScope handle_scope(node_isolate);
-
NODE_SET_METHOD(target, "showMessageBox", ShowMessageBox);
NODE_SET_METHOD(target, "showOpenDialog", ShowOpenDialog);
NODE_SET_METHOD(target, "showSaveDialog", ShowSaveDialog);
// static
void Menu::New(const v8::FunctionCallbackInfo<v8::Value>& args) {
- v8::HandleScope handle_scope(args.GetIsolate());
-
if (!args.IsConstructCall())
return node::ThrowError("Require constructor call");
// static
void Menu::Initialize(v8::Handle<v8::Object> target) {
- v8::HandleScope handle_scope(node_isolate);
-
v8::Local<v8::FunctionTemplate> t(v8::FunctionTemplate::New(Menu::New));
t->InstanceTemplate()->SetInternalFieldCount(1);
t->SetClassName(v8::String::NewSymbol("Menu"));
// static
void Menu::SetApplicationMenu(const v8::FunctionCallbackInfo<v8::Value>& args) {
- v8::HandleScope handle_scope(args.GetIsolate());
-
if (!args[0]->IsObject())
return node::ThrowTypeError("Bad argument");
// static
void Menu::SendActionToFirstResponder(
const v8::FunctionCallbackInfo<v8::Value>& args) {
- v8::HandleScope handle_scope(args.GetIsolate());
-
std::string action;
if (!FromV8Arguments(args, &action))
return node::ThrowTypeError("Bad argument");
// static
void Menu::AttachToWindow(const v8::FunctionCallbackInfo<v8::Value>& args) {
- v8::HandleScope handle_scope(args.GetIsolate());
-
Menu* self = ObjectWrap::Unwrap<Menu>(args.This());
if (self == NULL)
return node::ThrowError("Menu is already destroyed");
// static
void PowerMonitor::New(const v8::FunctionCallbackInfo<v8::Value>& args) {
- v8::HandleScope handle_scope(args.GetIsolate());
-
if (!args.IsConstructCall())
return node::ThrowError("Require constructor call");
// static
void PowerMonitor::Initialize(v8::Handle<v8::Object> target) {
- v8::HandleScope handle_scope(node_isolate);
-
#if defined(OS_MACOSX)
base::PowerMonitorDeviceSource::AllocateSystemIOPorts();
#endif
// static
void Window::New(const v8::FunctionCallbackInfo<v8::Value>& args) {
- v8::HandleScope handle_scope(args.GetIsolate());
-
if (!args.IsConstructCall())
return node::ThrowError("Require constructor call");
// static
void Window::Initialize(v8::Handle<v8::Object> target) {
- v8::HandleScope handle_scope(node_isolate);
-
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(Window::New);
t->InstanceTemplate()->SetInternalFieldCount(1);
t->SetClassName(v8::String::NewSymbol("BrowserWindow"));
// static
void Clipboard::Initialize(v8::Handle<v8::Object> target) {
- v8::HandleScope handle_scope(node_isolate);
-
NODE_SET_METHOD(target, "has", Has);
NODE_SET_METHOD(target, "read", Read);
NODE_SET_METHOD(target, "readText", ReadText);
// static
void IDWeakMap::Initialize(v8::Handle<v8::Object> target) {
- v8::HandleScope handle_scope(node_isolate);
-
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(New);
t->InstanceTemplate()->SetInternalFieldCount(1);
t->SetClassName(v8::String::NewSymbol("IDWeakMap"));
// static
void Screen::Initialize(v8::Handle<v8::Object> target) {
- v8::HandleScope handle_scope(node_isolate);
-
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(New);
t->InstanceTemplate()->SetInternalFieldCount(1);
t->SetClassName(v8::String::NewSymbol("Screen"));
// static
void Shell::Initialize(v8::Handle<v8::Object> target) {
- v8::HandleScope handle_scope(node_isolate);
-
NODE_SET_METHOD(target, "showItemInFolder", ShowItemInFolder);
NODE_SET_METHOD(target, "openItem", OpenItem);
NODE_SET_METHOD(target, "openExternal", OpenExternal);
} // namespace
void InitializeV8Util(v8::Handle<v8::Object> target) {
- v8::HandleScope handle_scope(node_isolate);
-
NODE_SET_METHOD(target, "createObjectWithName", CreateObjectWithName);
NODE_SET_METHOD(target, "getHiddenValue", GetHiddenValue);
NODE_SET_METHOD(target, "setHiddenValue", SetHiddenValue);
}
void AtomBindings::BindTo(v8::Handle<v8::Object> process) {
- v8::HandleScope handle_scope(node_isolate);
-
NODE_SET_METHOD(process, "atomBinding", Binding);
NODE_SET_METHOD(process, "crash", Crash);
NODE_SET_METHOD(process, "activateUvLoop", ActivateUVLoop);
// static
void AtomBindings::GetCurrentStackTrace(
const v8::FunctionCallbackInfo<v8::Value>& args) {
- v8::HandleScope handle_scope(args.GetIsolate());
-
int stack_limit = kMaxCallStackSize;
FromV8Arguments(args, &stack_limit);