Merge remote-tracking branch 'origin/master' into cj-replace-sparkle-with-squirrel
This commit is contained in:
commit
795c31918a
26 changed files with 87 additions and 65 deletions
|
@ -50,8 +50,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 0,8,5,0
|
FILEVERSION 0,8,7,0
|
||||||
PRODUCTVERSION 0,8,5,0
|
PRODUCTVERSION 0,8,7,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -68,12 +68,12 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "GitHub, Inc."
|
VALUE "CompanyName", "GitHub, Inc."
|
||||||
VALUE "FileDescription", "Atom-Shell"
|
VALUE "FileDescription", "Atom-Shell"
|
||||||
VALUE "FileVersion", "0.8.5"
|
VALUE "FileVersion", "0.8.7"
|
||||||
VALUE "InternalName", "atom.exe"
|
VALUE "InternalName", "atom.exe"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2013 GitHub, Inc. All rights reserved."
|
VALUE "LegalCopyright", "Copyright (C) 2013 GitHub, Inc. All rights reserved."
|
||||||
VALUE "OriginalFilename", "atom.exe"
|
VALUE "OriginalFilename", "atom.exe"
|
||||||
VALUE "ProductName", "Atom-Shell"
|
VALUE "ProductName", "Atom-Shell"
|
||||||
VALUE "ProductVersion", "0.8.5"
|
VALUE "ProductVersion", "0.8.7"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -174,8 +174,6 @@ void App::DockGetBadgeText(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void App::Initialize(v8::Handle<v8::Object> target) {
|
void App::Initialize(v8::Handle<v8::Object> target) {
|
||||||
v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
|
|
||||||
|
|
||||||
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(New);
|
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(New);
|
||||||
t->InstanceTemplate()->SetInternalFieldCount(1);
|
t->InstanceTemplate()->SetInternalFieldCount(1);
|
||||||
t->SetClassName(v8::String::NewSymbol("Application"));
|
t->SetClassName(v8::String::NewSymbol("Application"));
|
||||||
|
|
|
@ -51,8 +51,6 @@ void AutoUpdater::OnUpdateDownloaded(const std::string& release_notes,
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void AutoUpdater::New(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
void AutoUpdater::New(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
v8::HandleScope handle_scope(args.GetIsolate());
|
|
||||||
|
|
||||||
if (!args.IsConstructCall())
|
if (!args.IsConstructCall())
|
||||||
return node::ThrowError("Require constructor call");
|
return node::ThrowError("Require constructor call");
|
||||||
|
|
||||||
|
@ -79,8 +77,6 @@ void AutoUpdater::QuitAndInstall(
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void AutoUpdater::Initialize(v8::Handle<v8::Object> target) {
|
void AutoUpdater::Initialize(v8::Handle<v8::Object> target) {
|
||||||
v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
|
|
||||||
|
|
||||||
v8::Local<v8::FunctionTemplate> t(
|
v8::Local<v8::FunctionTemplate> t(
|
||||||
v8::FunctionTemplate::New(AutoUpdater::New));
|
v8::FunctionTemplate::New(AutoUpdater::New));
|
||||||
t->InstanceTemplate()->SetInternalFieldCount(1);
|
t->InstanceTemplate()->SetInternalFieldCount(1);
|
||||||
|
|
|
@ -19,7 +19,9 @@ namespace {
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void CallV8Function(const RefCountedV8Function& callback, T arg) {
|
void CallV8Function(const RefCountedV8Function& callback, T arg) {
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
|
|
||||||
v8::Handle<v8::Value> value = ToV8Value(arg);
|
v8::Handle<v8::Value> value = ToV8Value(arg);
|
||||||
callback->NewHandle(node_isolate)->Call(
|
callback->NewHandle(node_isolate)->Call(
|
||||||
v8::Context::GetCurrent()->Global(), 1, &value);
|
v8::Context::GetCurrent()->Global(), 1, &value);
|
||||||
|
@ -34,8 +36,6 @@ void CallV8Function2(const RefCountedV8Function& callback, bool result, T arg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize(v8::Handle<v8::Object> target) {
|
void Initialize(v8::Handle<v8::Object> target) {
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
|
||||||
|
|
||||||
NODE_SET_METHOD(target, "showMessageBox", ShowMessageBox);
|
NODE_SET_METHOD(target, "showMessageBox", ShowMessageBox);
|
||||||
NODE_SET_METHOD(target, "showOpenDialog", ShowOpenDialog);
|
NODE_SET_METHOD(target, "showOpenDialog", ShowOpenDialog);
|
||||||
NODE_SET_METHOD(target, "showSaveDialog", ShowSaveDialog);
|
NODE_SET_METHOD(target, "showSaveDialog", ShowSaveDialog);
|
||||||
|
|
|
@ -24,6 +24,7 @@ v8::Handle<v8::Value> CallDelegate(v8::Handle<v8::Value> default_value,
|
||||||
v8::Handle<v8::Object> menu,
|
v8::Handle<v8::Object> menu,
|
||||||
const char* method,
|
const char* method,
|
||||||
int command_id) {
|
int command_id) {
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
|
|
||||||
v8::Handle<v8::Value> delegate = menu->Get(v8::String::New("delegate"));
|
v8::Handle<v8::Value> delegate = menu->Get(v8::String::New("delegate"));
|
||||||
|
@ -52,6 +53,7 @@ Menu::~Menu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Menu::IsCommandIdChecked(int command_id) const {
|
bool Menu::IsCommandIdChecked(int command_id) const {
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
return CallDelegate(v8::False(),
|
return CallDelegate(v8::False(),
|
||||||
const_cast<Menu*>(this)->handle(),
|
const_cast<Menu*>(this)->handle(),
|
||||||
|
@ -60,6 +62,7 @@ bool Menu::IsCommandIdChecked(int command_id) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Menu::IsCommandIdEnabled(int command_id) const {
|
bool Menu::IsCommandIdEnabled(int command_id) const {
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
return CallDelegate(v8::True(),
|
return CallDelegate(v8::True(),
|
||||||
const_cast<Menu*>(this)->handle(),
|
const_cast<Menu*>(this)->handle(),
|
||||||
|
@ -68,6 +71,7 @@ bool Menu::IsCommandIdEnabled(int command_id) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Menu::IsCommandIdVisible(int command_id) const {
|
bool Menu::IsCommandIdVisible(int command_id) const {
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
return CallDelegate(v8::True(),
|
return CallDelegate(v8::True(),
|
||||||
const_cast<Menu*>(this)->handle(),
|
const_cast<Menu*>(this)->handle(),
|
||||||
|
@ -77,6 +81,7 @@ bool Menu::IsCommandIdVisible(int command_id) const {
|
||||||
|
|
||||||
bool Menu::GetAcceleratorForCommandId(int command_id,
|
bool Menu::GetAcceleratorForCommandId(int command_id,
|
||||||
ui::Accelerator* accelerator) {
|
ui::Accelerator* accelerator) {
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
v8::Handle<v8::Value> shortcut = CallDelegate(v8::Undefined(),
|
v8::Handle<v8::Value> shortcut = CallDelegate(v8::Undefined(),
|
||||||
handle(),
|
handle(),
|
||||||
|
@ -91,6 +96,7 @@ bool Menu::GetAcceleratorForCommandId(int command_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Menu::IsItemForCommandIdDynamic(int command_id) const {
|
bool Menu::IsItemForCommandIdDynamic(int command_id) const {
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
return CallDelegate(v8::False(),
|
return CallDelegate(v8::False(),
|
||||||
const_cast<Menu*>(this)->handle(),
|
const_cast<Menu*>(this)->handle(),
|
||||||
|
@ -99,6 +105,7 @@ bool Menu::IsItemForCommandIdDynamic(int command_id) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
string16 Menu::GetLabelForCommandId(int command_id) const {
|
string16 Menu::GetLabelForCommandId(int command_id) const {
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
return FromV8Value(CallDelegate(v8::False(),
|
return FromV8Value(CallDelegate(v8::False(),
|
||||||
const_cast<Menu*>(this)->handle(),
|
const_cast<Menu*>(this)->handle(),
|
||||||
|
@ -107,6 +114,7 @@ string16 Menu::GetLabelForCommandId(int command_id) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
string16 Menu::GetSublabelForCommandId(int command_id) const {
|
string16 Menu::GetSublabelForCommandId(int command_id) const {
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
return FromV8Value(CallDelegate(v8::False(),
|
return FromV8Value(CallDelegate(v8::False(),
|
||||||
const_cast<Menu*>(this)->handle(),
|
const_cast<Menu*>(this)->handle(),
|
||||||
|
@ -115,14 +123,13 @@ string16 Menu::GetSublabelForCommandId(int command_id) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::ExecuteCommand(int command_id, int event_flags) {
|
void Menu::ExecuteCommand(int command_id, int event_flags) {
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
CallDelegate(v8::False(), handle(), "executeCommand", command_id);
|
CallDelegate(v8::False(), handle(), "executeCommand", command_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void Menu::New(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
void Menu::New(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
v8::HandleScope handle_scope(args.GetIsolate());
|
|
||||||
|
|
||||||
if (!args.IsConstructCall())
|
if (!args.IsConstructCall())
|
||||||
return node::ThrowError("Require constructor call");
|
return node::ThrowError("Require constructor call");
|
||||||
|
|
||||||
|
@ -307,8 +314,6 @@ void Menu::Popup(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void Menu::Initialize(v8::Handle<v8::Object> target) {
|
void Menu::Initialize(v8::Handle<v8::Object> target) {
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
|
||||||
|
|
||||||
v8::Local<v8::FunctionTemplate> t(v8::FunctionTemplate::New(Menu::New));
|
v8::Local<v8::FunctionTemplate> t(v8::FunctionTemplate::New(Menu::New));
|
||||||
t->InstanceTemplate()->SetInternalFieldCount(1);
|
t->InstanceTemplate()->SetInternalFieldCount(1);
|
||||||
t->SetClassName(v8::String::NewSymbol("Menu"));
|
t->SetClassName(v8::String::NewSymbol("Menu"));
|
||||||
|
|
|
@ -74,8 +74,6 @@ void MenuMac::SendActionToFirstResponder(const std::string& action) {
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void Menu::SetApplicationMenu(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
void Menu::SetApplicationMenu(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
v8::HandleScope handle_scope(args.GetIsolate());
|
|
||||||
|
|
||||||
if (!args[0]->IsObject())
|
if (!args[0]->IsObject())
|
||||||
return node::ThrowTypeError("Bad argument");
|
return node::ThrowTypeError("Bad argument");
|
||||||
|
|
||||||
|
@ -94,8 +92,6 @@ void Menu::SetApplicationMenu(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
// static
|
// static
|
||||||
void Menu::SendActionToFirstResponder(
|
void Menu::SendActionToFirstResponder(
|
||||||
const v8::FunctionCallbackInfo<v8::Value>& args) {
|
const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
v8::HandleScope handle_scope(args.GetIsolate());
|
|
||||||
|
|
||||||
std::string action;
|
std::string action;
|
||||||
if (!FromV8Arguments(args, &action))
|
if (!FromV8Arguments(args, &action))
|
||||||
return node::ThrowTypeError("Bad argument");
|
return node::ThrowTypeError("Bad argument");
|
||||||
|
|
|
@ -31,8 +31,6 @@ void MenuWin::Popup(NativeWindow* native_window) {
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void Menu::AttachToWindow(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
void Menu::AttachToWindow(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
v8::HandleScope handle_scope(args.GetIsolate());
|
|
||||||
|
|
||||||
Menu* self = ObjectWrap::Unwrap<Menu>(args.This());
|
Menu* self = ObjectWrap::Unwrap<Menu>(args.This());
|
||||||
if (self == NULL)
|
if (self == NULL)
|
||||||
return node::ThrowError("Menu is already destroyed");
|
return node::ThrowError("Menu is already destroyed");
|
||||||
|
|
|
@ -39,8 +39,6 @@ void PowerMonitor::OnResume() {
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void PowerMonitor::New(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
void PowerMonitor::New(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
v8::HandleScope handle_scope(args.GetIsolate());
|
|
||||||
|
|
||||||
if (!args.IsConstructCall())
|
if (!args.IsConstructCall())
|
||||||
return node::ThrowError("Require constructor call");
|
return node::ThrowError("Require constructor call");
|
||||||
|
|
||||||
|
@ -49,8 +47,6 @@ void PowerMonitor::New(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void PowerMonitor::Initialize(v8::Handle<v8::Object> target) {
|
void PowerMonitor::Initialize(v8::Handle<v8::Object> target) {
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
|
||||||
|
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
base::PowerMonitorDeviceSource::AllocateSystemIOPorts();
|
base::PowerMonitorDeviceSource::AllocateSystemIOPorts();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -35,6 +35,7 @@ static const char* kEarlyUseProtocolError = "This method can only be used"
|
||||||
|
|
||||||
// Emit an event for the protocol module.
|
// Emit an event for the protocol module.
|
||||||
void EmitEventInUI(const std::string& event, const std::string& parameter) {
|
void EmitEventInUI(const std::string& event, const std::string& parameter) {
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
|
|
||||||
v8::Handle<v8::Value> argv[] = {
|
v8::Handle<v8::Value> argv[] = {
|
||||||
|
@ -72,6 +73,7 @@ class CustomProtocolRequestJob : public AdapterRequestJob {
|
||||||
virtual void GetJobTypeInUI() OVERRIDE {
|
virtual void GetJobTypeInUI() OVERRIDE {
|
||||||
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
|
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
|
||||||
|
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
|
|
||||||
// Call the JS handler.
|
// Call the JS handler.
|
||||||
|
|
|
@ -92,6 +92,7 @@ void Window::OnRendererCrashed() {
|
||||||
|
|
||||||
void Window::OnCapturePageDone(const RefCountedV8Function& callback,
|
void Window::OnCapturePageDone(const RefCountedV8Function& callback,
|
||||||
const std::vector<unsigned char>& data) {
|
const std::vector<unsigned char>& data) {
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
|
|
||||||
v8::Local<v8::Value> buffer = node::Buffer::New(
|
v8::Local<v8::Value> buffer = node::Buffer::New(
|
||||||
|
@ -103,8 +104,6 @@ void Window::OnCapturePageDone(const RefCountedV8Function& callback,
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void Window::New(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
void Window::New(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
v8::HandleScope handle_scope(args.GetIsolate());
|
|
||||||
|
|
||||||
if (!args.IsConstructCall())
|
if (!args.IsConstructCall())
|
||||||
return node::ThrowError("Require constructor call");
|
return node::ThrowError("Require constructor call");
|
||||||
|
|
||||||
|
@ -625,8 +624,6 @@ void Window::ReloadIgnoringCache(
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void Window::Initialize(v8::Handle<v8::Object> target) {
|
void Window::Initialize(v8::Handle<v8::Object> target) {
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
|
||||||
|
|
||||||
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(Window::New);
|
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(Window::New);
|
||||||
t->InstanceTemplate()->SetInternalFieldCount(1);
|
t->InstanceTemplate()->SetInternalFieldCount(1);
|
||||||
t->SetClassName(v8::String::NewSymbol("BrowserWindow"));
|
t->SetClassName(v8::String::NewSymbol("BrowserWindow"));
|
||||||
|
|
|
@ -25,6 +25,7 @@ void AtomBrowserBindings::OnRendererMessage(int process_id,
|
||||||
int routing_id,
|
int routing_id,
|
||||||
const string16& channel,
|
const string16& channel,
|
||||||
const base::ListValue& args) {
|
const base::ListValue& args) {
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
|
|
||||||
scoped_ptr<V8ValueConverter> converter(new V8ValueConverter);
|
scoped_ptr<V8ValueConverter> converter(new V8ValueConverter);
|
||||||
|
@ -58,6 +59,7 @@ void AtomBrowserBindings::OnRendererMessageSync(
|
||||||
const base::ListValue& args,
|
const base::ListValue& args,
|
||||||
NativeWindow* sender,
|
NativeWindow* sender,
|
||||||
IPC::Message* message) {
|
IPC::Message* message) {
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
|
|
||||||
scoped_ptr<V8ValueConverter> converter(new V8ValueConverter);
|
scoped_ptr<V8ValueConverter> converter(new V8ValueConverter);
|
||||||
|
|
|
@ -51,6 +51,7 @@ void AtomBrowserMainParts::PostEarlyInitialization() {
|
||||||
v8::V8::Initialize();
|
v8::V8::Initialize();
|
||||||
|
|
||||||
// Create context.
|
// Create context.
|
||||||
|
v8::Locker locker(node_isolate);
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
v8::Local<v8::Context> context = v8::Context::New(node_isolate);
|
v8::Local<v8::Context> context = v8::Context::New(node_isolate);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>atom.icns</string>
|
<string>atom.icns</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>0.8.5</string>
|
<string>0.8.7</string>
|
||||||
<key>NSMainNibFile</key>
|
<key>NSMainNibFile</key>
|
||||||
<string>MainMenu</string>
|
<string>MainMenu</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
|
|
|
@ -74,8 +74,6 @@ void Clipboard::Clear(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void Clipboard::Initialize(v8::Handle<v8::Object> target) {
|
void Clipboard::Initialize(v8::Handle<v8::Object> target) {
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
|
||||||
|
|
||||||
NODE_SET_METHOD(target, "has", Has);
|
NODE_SET_METHOD(target, "has", Has);
|
||||||
NODE_SET_METHOD(target, "read", Read);
|
NODE_SET_METHOD(target, "read", Read);
|
||||||
NODE_SET_METHOD(target, "readText", ReadText);
|
NODE_SET_METHOD(target, "readText", ReadText);
|
||||||
|
|
|
@ -21,6 +21,11 @@ EventEmitter::EventEmitter(v8::Handle<v8::Object> wrapper) {
|
||||||
}
|
}
|
||||||
|
|
||||||
EventEmitter::~EventEmitter() {
|
EventEmitter::~EventEmitter() {
|
||||||
|
// Use Locker in browser process.
|
||||||
|
scoped_ptr<v8::Locker> locker;
|
||||||
|
if (node::g_standalone_mode)
|
||||||
|
locker.reset(new v8::Locker(node_isolate));
|
||||||
|
|
||||||
// Clear the aligned pointer, it should have been done by ObjectWrap but
|
// Clear the aligned pointer, it should have been done by ObjectWrap but
|
||||||
// somehow node v0.11.x changed this behaviour.
|
// somehow node v0.11.x changed this behaviour.
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
|
@ -33,6 +38,11 @@ bool EventEmitter::Emit(const std::string& name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EventEmitter::Emit(const std::string& name, base::ListValue* args) {
|
bool EventEmitter::Emit(const std::string& name, base::ListValue* args) {
|
||||||
|
// Use Locker in browser process.
|
||||||
|
scoped_ptr<v8::Locker> locker;
|
||||||
|
if (node::g_standalone_mode)
|
||||||
|
locker.reset(new v8::Locker(node_isolate));
|
||||||
|
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
|
|
||||||
v8::Handle<v8::Context> context = v8::Context::GetCurrent();
|
v8::Handle<v8::Context> context = v8::Context::GetCurrent();
|
||||||
|
|
|
@ -122,8 +122,6 @@ void IDWeakMap::Remove(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void IDWeakMap::Initialize(v8::Handle<v8::Object> target) {
|
void IDWeakMap::Initialize(v8::Handle<v8::Object> target) {
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
|
||||||
|
|
||||||
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(New);
|
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(New);
|
||||||
t->InstanceTemplate()->SetInternalFieldCount(1);
|
t->InstanceTemplate()->SetInternalFieldCount(1);
|
||||||
t->SetClassName(v8::String::NewSymbol("IDWeakMap"));
|
t->SetClassName(v8::String::NewSymbol("IDWeakMap"));
|
||||||
|
|
|
@ -67,8 +67,6 @@ void Screen::GetPrimaryDisplay(
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void Screen::Initialize(v8::Handle<v8::Object> target) {
|
void Screen::Initialize(v8::Handle<v8::Object> target) {
|
||||||
v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
|
|
||||||
|
|
||||||
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(New);
|
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(New);
|
||||||
t->InstanceTemplate()->SetInternalFieldCount(1);
|
t->InstanceTemplate()->SetInternalFieldCount(1);
|
||||||
t->SetClassName(v8::String::NewSymbol("Screen"));
|
t->SetClassName(v8::String::NewSymbol("Screen"));
|
||||||
|
|
|
@ -60,8 +60,6 @@ void Shell::Beep(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void Shell::Initialize(v8::Handle<v8::Object> target) {
|
void Shell::Initialize(v8::Handle<v8::Object> target) {
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
|
||||||
|
|
||||||
NODE_SET_METHOD(target, "showItemInFolder", ShowItemInFolder);
|
NODE_SET_METHOD(target, "showItemInFolder", ShowItemInFolder);
|
||||||
NODE_SET_METHOD(target, "openItem", OpenItem);
|
NODE_SET_METHOD(target, "openItem", OpenItem);
|
||||||
NODE_SET_METHOD(target, "openExternal", OpenExternal);
|
NODE_SET_METHOD(target, "openExternal", OpenExternal);
|
||||||
|
|
|
@ -46,8 +46,6 @@ void TakeHeapSnapshot(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
void InitializeV8Util(v8::Handle<v8::Object> target) {
|
void InitializeV8Util(v8::Handle<v8::Object> target) {
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
|
||||||
|
|
||||||
NODE_SET_METHOD(target, "createObjectWithName", CreateObjectWithName);
|
NODE_SET_METHOD(target, "createObjectWithName", CreateObjectWithName);
|
||||||
NODE_SET_METHOD(target, "getHiddenValue", GetHiddenValue);
|
NODE_SET_METHOD(target, "getHiddenValue", GetHiddenValue);
|
||||||
NODE_SET_METHOD(target, "setHiddenValue", SetHiddenValue);
|
NODE_SET_METHOD(target, "setHiddenValue", SetHiddenValue);
|
||||||
|
|
|
@ -53,6 +53,13 @@ void UvOnCallback(uv_async_t* handle, int status) {
|
||||||
g_v8_callback->NewHandle()->Call(global, 0, NULL);
|
g_v8_callback->NewHandle()->Call(global, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Called when there is a fatal error in V8, we just crash the process here so
|
||||||
|
// we can get the stack trace.
|
||||||
|
void FatalErrorCallback(const char* location, const char* message) {
|
||||||
|
LOG(ERROR) << "Fatal error in V8: " << location << " " << message;
|
||||||
|
static_cast<DummyClass*>(NULL)->crash = true;
|
||||||
|
}
|
||||||
|
|
||||||
v8::Handle<v8::Object> DumpStackFrame(v8::Handle<v8::StackFrame> stack_frame) {
|
v8::Handle<v8::Object> DumpStackFrame(v8::Handle<v8::StackFrame> stack_frame) {
|
||||||
v8::Local<v8::Object> result = v8::Object::New();
|
v8::Local<v8::Object> result = v8::Object::New();
|
||||||
result->Set(ToV8Value("line"), ToV8Value(stack_frame->GetLineNumber()));
|
result->Set(ToV8Value("line"), ToV8Value(stack_frame->GetLineNumber()));
|
||||||
|
@ -76,14 +83,13 @@ node::node_module_struct* GetBuiltinModule(const char *name, bool is_browser);
|
||||||
AtomBindings::AtomBindings() {
|
AtomBindings::AtomBindings() {
|
||||||
uv_async_init(uv_default_loop(), &g_next_tick_uv_handle, UvCallNextTick);
|
uv_async_init(uv_default_loop(), &g_next_tick_uv_handle, UvCallNextTick);
|
||||||
uv_async_init(uv_default_loop(), &g_callback_uv_handle, UvOnCallback);
|
uv_async_init(uv_default_loop(), &g_callback_uv_handle, UvOnCallback);
|
||||||
|
v8::V8::SetFatalErrorHandler(FatalErrorCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
AtomBindings::~AtomBindings() {
|
AtomBindings::~AtomBindings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtomBindings::BindTo(v8::Handle<v8::Object> process) {
|
void AtomBindings::BindTo(v8::Handle<v8::Object> process) {
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
|
||||||
|
|
||||||
NODE_SET_METHOD(process, "atomBinding", Binding);
|
NODE_SET_METHOD(process, "atomBinding", Binding);
|
||||||
NODE_SET_METHOD(process, "crash", Crash);
|
NODE_SET_METHOD(process, "crash", Crash);
|
||||||
NODE_SET_METHOD(process, "activateUvLoop", ActivateUVLoop);
|
NODE_SET_METHOD(process, "activateUvLoop", ActivateUVLoop);
|
||||||
|
@ -162,8 +168,6 @@ void AtomBindings::Log(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
// static
|
// static
|
||||||
void AtomBindings::GetCurrentStackTrace(
|
void AtomBindings::GetCurrentStackTrace(
|
||||||
const v8::FunctionCallbackInfo<v8::Value>& args) {
|
const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
v8::HandleScope handle_scope(args.GetIsolate());
|
|
||||||
|
|
||||||
int stack_limit = kMaxCallStackSize;
|
int stack_limit = kMaxCallStackSize;
|
||||||
FromV8Arguments(args, &stack_limit);
|
FromV8Arguments(args, &stack_limit);
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#define ATOM_MAJOR_VERSION 0
|
#define ATOM_MAJOR_VERSION 0
|
||||||
#define ATOM_MINOR_VERSION 8
|
#define ATOM_MINOR_VERSION 8
|
||||||
#define ATOM_PATCH_VERSION 5
|
#define ATOM_PATCH_VERSION 7
|
||||||
|
|
||||||
#define ATOM_VERSION_IS_RELEASE 1
|
#define ATOM_VERSION_IS_RELEASE 1
|
||||||
|
|
||||||
|
|
|
@ -194,6 +194,11 @@ void NodeBindings::RunMessageLoop() {
|
||||||
void NodeBindings::UvRunOnce() {
|
void NodeBindings::UvRunOnce() {
|
||||||
DCHECK(!is_browser_ || BrowserThread::CurrentlyOn(BrowserThread::UI));
|
DCHECK(!is_browser_ || BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||||
|
|
||||||
|
// Use Locker in browser process.
|
||||||
|
scoped_ptr<v8::Locker> locker;
|
||||||
|
if (is_browser_)
|
||||||
|
locker.reset(new v8::Locker(node_isolate));
|
||||||
|
|
||||||
v8::HandleScope handle_scope(node_isolate);
|
v8::HandleScope handle_scope(node_isolate);
|
||||||
|
|
||||||
// Enter node context while dealing with uv events, by default the global
|
// Enter node context while dealing with uv events, by default the global
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
{
|
{
|
||||||
"name": "atom-shell",
|
"name": "atom-shell",
|
||||||
"version": "0.8.5",
|
"version": "0.8.7",
|
||||||
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"coffee-script": "~1.6.3",
|
"coffee-script": "~1.6.3",
|
||||||
"coffeelint": "~0.6.1",
|
"coffeelint": "~0.6.1",
|
||||||
|
"formidable": "~1.0.14",
|
||||||
"mocha": "~1.13.0",
|
"mocha": "~1.13.0",
|
||||||
"pathwatcher": "0.14.0",
|
"pathwatcher": "0.14.0",
|
||||||
"q": "0.9.7",
|
"q": "0.9.7",
|
||||||
"walkdir": "~0.0.7",
|
|
||||||
"runas": "0.3.0",
|
"runas": "0.3.0",
|
||||||
"formidable": "~1.0.14",
|
"temp": "~0.6.0",
|
||||||
"temp": "~0.6.0"
|
"walkdir": "~0.0.7"
|
||||||
},
|
},
|
||||||
|
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|
|
@ -25,11 +25,12 @@ global.module = module
|
||||||
|
|
||||||
# Set the __filename to the path of html file if it's file:// protocol.
|
# Set the __filename to the path of html file if it's file:// protocol.
|
||||||
if window.location.protocol is 'file:'
|
if window.location.protocol is 'file:'
|
||||||
global.__filename =
|
pathname =
|
||||||
if process.platform is 'win32'
|
if process.platform is 'win32'
|
||||||
window.location.pathname.substr 1
|
window.location.pathname.substr 1
|
||||||
else
|
else
|
||||||
window.location.pathname
|
window.location.pathname
|
||||||
|
global.__filename = decodeURIComponent pathname
|
||||||
global.__dirname = path.dirname global.__filename
|
global.__dirname = path.dirname global.__filename
|
||||||
|
|
||||||
# Set module's filename so relative require can work as expected.
|
# Set module's filename so relative require can work as expected.
|
||||||
|
|
|
@ -5,34 +5,51 @@ import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from lib.util import get_atom_shell_version, scoped_cwd
|
||||||
|
|
||||||
|
|
||||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if len(sys.argv) != 2:
|
if len(sys.argv) != 2 or sys.argv[1] == '-h':
|
||||||
print 'Usage: bump-version.py version'
|
print 'Usage: bump-version.py [<version> | major | minor | patch]'
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
version = sys.argv[1]
|
option = sys.argv[1]
|
||||||
if version[0] == 'v':
|
increments = ['major', 'minor', 'patch', 'build']
|
||||||
version = version[1:]
|
if option in increments:
|
||||||
versions = parse_version(version)
|
version = get_atom_shell_version()
|
||||||
|
versions = parse_version(version.split('-')[0])
|
||||||
|
versions = increase_version(versions, increments.index(option))
|
||||||
|
else:
|
||||||
|
versions = parse_version(option)
|
||||||
|
|
||||||
os.chdir(SOURCE_ROOT)
|
version = '.'.join(versions[:3])
|
||||||
update_package_json(version)
|
|
||||||
update_win_rc(version, versions)
|
with scoped_cwd(SOURCE_ROOT):
|
||||||
update_version_h(versions)
|
update_package_json(version)
|
||||||
update_info_plist(version)
|
update_win_rc(version, versions)
|
||||||
tag_version(version)
|
update_version_h(versions)
|
||||||
|
update_info_plist(version)
|
||||||
|
tag_version(version)
|
||||||
|
git_push()
|
||||||
|
|
||||||
|
|
||||||
def parse_version(version):
|
def parse_version(version):
|
||||||
|
if version[0] == 'v':
|
||||||
|
version = version[1:]
|
||||||
|
|
||||||
vs = version.split('.')
|
vs = version.split('.')
|
||||||
if len(vs) > 4:
|
if len(vs) > 4:
|
||||||
return vs[0:4]
|
return vs[0:4]
|
||||||
else:
|
else:
|
||||||
return vs + [0] * (4 - len(vs))
|
return vs + ['0'] * (4 - len(vs))
|
||||||
|
|
||||||
|
|
||||||
|
def increase_version(versions, index):
|
||||||
|
versions[index] = str(int(versions[index]) + 1)
|
||||||
|
return versions
|
||||||
|
|
||||||
|
|
||||||
def update_package_json(version):
|
def update_package_json(version):
|
||||||
|
@ -112,5 +129,9 @@ def tag_version(version):
|
||||||
subprocess.check_call(['git', 'tag', 'v{0}'.format(version)])
|
subprocess.check_call(['git', 'tag', 'v{0}'.format(version)])
|
||||||
|
|
||||||
|
|
||||||
|
def git_push():
|
||||||
|
subprocess.check_call(['git', 'push'])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|
2
vendor/node
vendored
2
vendor/node
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 7fa644854f91c8dd23d8cec21be1310f0b69d813
|
Subproject commit 80c5e17c09fdf2fc0b74353b285bb33a6ecf5e62
|
Loading…
Reference in a new issue