diff --git a/atom/browser/api/atom_api_app.cc b/atom/browser/api/atom_api_app.cc index fb3655cef70..3851fcfccbc 100644 --- a/atom/browser/api/atom_api_app.cc +++ b/atom/browser/api/atom_api_app.cc @@ -532,6 +532,7 @@ mate::Handle App::Create(v8::Isolate* isolate) { // static void App::BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "App")); auto browser = base::Unretained(Browser::Get()); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("quit", base::Bind(&Browser::Quit, browser)) diff --git a/atom/browser/api/atom_api_auto_updater.cc b/atom/browser/api/atom_api_auto_updater.cc index ed1193d46df..0908911bd52 100644 --- a/atom/browser/api/atom_api_auto_updater.cc +++ b/atom/browser/api/atom_api_auto_updater.cc @@ -107,6 +107,7 @@ mate::Handle AutoUpdater::Create(v8::Isolate* isolate) { // static void AutoUpdater::BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "AutoUpdater")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("checkForUpdates", &auto_updater::AutoUpdater::CheckForUpdates) .SetMethod("getFeedURL", &auto_updater::AutoUpdater::GetFeedURL) diff --git a/atom/browser/api/atom_api_cookies.cc b/atom/browser/api/atom_api_cookies.cc index 0f1fb33dde4..86cc59847b2 100644 --- a/atom/browser/api/atom_api_cookies.cc +++ b/atom/browser/api/atom_api_cookies.cc @@ -249,6 +249,7 @@ mate::Handle Cookies::Create( // static void Cookies::BuildPrototype(v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "Cookies")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("get", &Cookies::Get) .SetMethod("remove", &Cookies::Remove) diff --git a/atom/browser/api/atom_api_debugger.cc b/atom/browser/api/atom_api_debugger.cc index f867adb1edb..dea70b23e5c 100644 --- a/atom/browser/api/atom_api_debugger.cc +++ b/atom/browser/api/atom_api_debugger.cc @@ -160,6 +160,7 @@ mate::Handle Debugger::Create( // static void Debugger::BuildPrototype(v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "Debugger")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("attach", &Debugger::Attach) .SetMethod("isAttached", &Debugger::IsAttached) diff --git a/atom/browser/api/atom_api_desktop_capturer.cc b/atom/browser/api/atom_api_desktop_capturer.cc index 053efbdbd50..1ff5aadc0fa 100644 --- a/atom/browser/api/atom_api_desktop_capturer.cc +++ b/atom/browser/api/atom_api_desktop_capturer.cc @@ -100,6 +100,7 @@ mate::Handle DesktopCapturer::Create(v8::Isolate* isolate) { // static void DesktopCapturer::BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "DesktopCapturer")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("startHandling", &DesktopCapturer::StartHandling); } diff --git a/atom/browser/api/atom_api_download_item.cc b/atom/browser/api/atom_api_download_item.cc index 1a3a9ec64ae..5c7ea07e2b0 100644 --- a/atom/browser/api/atom_api_download_item.cc +++ b/atom/browser/api/atom_api_download_item.cc @@ -168,6 +168,7 @@ base::FilePath DownloadItem::GetSavePath() const { // static void DownloadItem::BuildPrototype(v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "DownloadItem")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .MakeDestroyable() .SetMethod("pause", &DownloadItem::Pause) diff --git a/atom/browser/api/atom_api_global_shortcut.cc b/atom/browser/api/atom_api_global_shortcut.cc index 7ed826593eb..039d708a7c1 100644 --- a/atom/browser/api/atom_api_global_shortcut.cc +++ b/atom/browser/api/atom_api_global_shortcut.cc @@ -75,6 +75,7 @@ mate::Handle GlobalShortcut::Create(v8::Isolate* isolate) { // static void GlobalShortcut::BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "GlobalShortcut")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("register", &GlobalShortcut::Register) .SetMethod("isRegistered", &GlobalShortcut::IsRegistered) diff --git a/atom/browser/api/atom_api_menu.cc b/atom/browser/api/atom_api_menu.cc index 8150feeee1b..627ce601f54 100644 --- a/atom/browser/api/atom_api_menu.cc +++ b/atom/browser/api/atom_api_menu.cc @@ -156,6 +156,7 @@ bool Menu::IsVisibleAt(int index) const { // static void Menu::BuildPrototype(v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "Menu")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .MakeDestroyable() .SetMethod("insertItem", &Menu::InsertItemAt) @@ -190,7 +191,7 @@ using atom::api::Menu; void Initialize(v8::Local exports, v8::Local unused, v8::Local context, void* priv) { v8::Isolate* isolate = context->GetIsolate(); - Menu::SetConstructor(isolate, "Menu", base::Bind(&Menu::New)); + Menu::SetConstructor(isolate, base::Bind(&Menu::New)); mate::Dictionary dict(isolate, exports); dict.Set("Menu", Menu::GetConstructor(isolate)->GetFunction()); diff --git a/atom/browser/api/atom_api_power_monitor.cc b/atom/browser/api/atom_api_power_monitor.cc index 06ab986308c..51d078bb948 100644 --- a/atom/browser/api/atom_api_power_monitor.cc +++ b/atom/browser/api/atom_api_power_monitor.cc @@ -53,7 +53,7 @@ v8::Local PowerMonitor::Create(v8::Isolate* isolate) { // static void PowerMonitor::BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()); + prototype->SetClassName(mate::StringToV8(isolate, "PowerMonitor")); } } // namespace api diff --git a/atom/browser/api/atom_api_power_save_blocker.cc b/atom/browser/api/atom_api_power_save_blocker.cc index 7aa079c8a33..0f017be5fb1 100644 --- a/atom/browser/api/atom_api_power_save_blocker.cc +++ b/atom/browser/api/atom_api_power_save_blocker.cc @@ -106,6 +106,7 @@ mate::Handle PowerSaveBlocker::Create(v8::Isolate* isolate) { // static void PowerSaveBlocker::BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "PowerSaveBlocker")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("start", &PowerSaveBlocker::Start) .SetMethod("stop", &PowerSaveBlocker::Stop) diff --git a/atom/browser/api/atom_api_protocol.cc b/atom/browser/api/atom_api_protocol.cc index c081c1379c4..eaed0c6dca3 100644 --- a/atom/browser/api/atom_api_protocol.cc +++ b/atom/browser/api/atom_api_protocol.cc @@ -161,6 +161,7 @@ mate::Handle Protocol::Create( // static void Protocol::BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "Protocol")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("registerServiceWorkerSchemes", &Protocol::RegisterServiceWorkerSchemes) diff --git a/atom/browser/api/atom_api_render_process_preferences.cc b/atom/browser/api/atom_api_render_process_preferences.cc index 5f577638675..d5017122dd6 100644 --- a/atom/browser/api/atom_api_render_process_preferences.cc +++ b/atom/browser/api/atom_api_render_process_preferences.cc @@ -54,6 +54,8 @@ void RenderProcessPreferences::RemoveEntry(int id) { // static void RenderProcessPreferences::BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName( + mate::StringToV8(isolate, "RenderProcessPreferences")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("addEntry", &RenderProcessPreferences::AddEntry) .SetMethod("removeEntry", &RenderProcessPreferences::RemoveEntry); diff --git a/atom/browser/api/atom_api_screen.cc b/atom/browser/api/atom_api_screen.cc index 56e49abf418..eabfc18d887 100644 --- a/atom/browser/api/atom_api_screen.cc +++ b/atom/browser/api/atom_api_screen.cc @@ -114,6 +114,7 @@ v8::Local Screen::Create(v8::Isolate* isolate) { // static void Screen::BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "Screen")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("getCursorScreenPoint", &Screen::GetCursorScreenPoint) .SetMethod("getPrimaryDisplay", &Screen::GetPrimaryDisplay) diff --git a/atom/browser/api/atom_api_session.cc b/atom/browser/api/atom_api_session.cc index f483980e73c..25eca3b7e5d 100644 --- a/atom/browser/api/atom_api_session.cc +++ b/atom/browser/api/atom_api_session.cc @@ -571,6 +571,7 @@ mate::Handle Session::FromPartition( // static void Session::BuildPrototype(v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "Session")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .MakeDestroyable() .SetMethod("resolveProxy", &Session::ResolveProxy) diff --git a/atom/browser/api/atom_api_system_preferences.cc b/atom/browser/api/atom_api_system_preferences.cc index a7fca68f0b7..df66234b9b0 100644 --- a/atom/browser/api/atom_api_system_preferences.cc +++ b/atom/browser/api/atom_api_system_preferences.cc @@ -45,6 +45,7 @@ mate::Handle SystemPreferences::Create( // static void SystemPreferences::BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "SystemPreferences")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) #if defined(OS_WIN) .SetMethod("isAeroGlassEnabled", &SystemPreferences::IsAeroGlassEnabled) diff --git a/atom/browser/api/atom_api_tray.cc b/atom/browser/api/atom_api_tray.cc index 051b7b2be0b..3f0386ab70a 100644 --- a/atom/browser/api/atom_api_tray.cc +++ b/atom/browser/api/atom_api_tray.cc @@ -202,6 +202,7 @@ gfx::Rect Tray::GetBounds() { // static void Tray::BuildPrototype(v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "Tray")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .MakeDestroyable() .SetMethod("setImage", &Tray::SetImage) @@ -227,7 +228,7 @@ using atom::api::Tray; void Initialize(v8::Local exports, v8::Local unused, v8::Local context, void* priv) { v8::Isolate* isolate = context->GetIsolate(); - Tray::SetConstructor(isolate, "Tray", base::Bind(&Tray::New)); + Tray::SetConstructor(isolate, base::Bind(&Tray::New)); mate::Dictionary dict(isolate, exports); dict.Set("Tray", Tray::GetConstructor(isolate)->GetFunction()); diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 2a830722d76..bb73e04f135 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -1365,6 +1365,7 @@ v8::Local WebContents::Debugger(v8::Isolate* isolate) { // static void WebContents::BuildPrototype(v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "WebContents")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .MakeDestroyable() .SetMethod("getId", &WebContents::GetID) diff --git a/atom/browser/api/atom_api_web_request.cc b/atom/browser/api/atom_api_web_request.cc index 11ba39c789c..2a39347d02a 100644 --- a/atom/browser/api/atom_api_web_request.cc +++ b/atom/browser/api/atom_api_web_request.cc @@ -89,6 +89,7 @@ mate::Handle WebRequest::Create( // static void WebRequest::BuildPrototype(v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "WebRequest")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("onBeforeRequest", &WebRequest::SetResponseListener< diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index a013b4ef25f..bb78b376eaf 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -747,6 +747,7 @@ void Window::RemoveFromParentChildWindows() { // static void Window::BuildPrototype(v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "BrowserWindow")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .MakeDestroyable() .SetMethod("close", &Window::Close) @@ -869,7 +870,7 @@ using atom::api::Window; void Initialize(v8::Local exports, v8::Local unused, v8::Local context, void* priv) { v8::Isolate* isolate = context->GetIsolate(); - Window::SetConstructor(isolate, "BrowserWindow", base::Bind(&Window::New)); + Window::SetConstructor(isolate, base::Bind(&Window::New)); mate::Dictionary browser_window( isolate, Window::GetConstructor(isolate)->GetFunction()); diff --git a/atom/browser/api/event.cc b/atom/browser/api/event.cc index 874e30fb2f9..8810fed4b9a 100644 --- a/atom/browser/api/event.cc +++ b/atom/browser/api/event.cc @@ -59,6 +59,7 @@ Handle Event::Create(v8::Isolate* isolate) { // static void Event::BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "Event")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("preventDefault", &Event::PreventDefault) .SetMethod("sendReply", &Event::SendReply); diff --git a/atom/common/api/atom_api_asar.cc b/atom/common/api/atom_api_asar.cc index 08903685c69..012d8f3c167 100644 --- a/atom/common/api/atom_api_asar.cc +++ b/atom/common/api/atom_api_asar.cc @@ -30,6 +30,7 @@ class Archive : public mate::Wrappable { static void BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "Archive")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetProperty("path", &Archive::GetPath) .SetMethod("getFileInfo", &Archive::GetFileInfo) diff --git a/atom/common/api/atom_api_key_weak_map.h b/atom/common/api/atom_api_key_weak_map.h index b6549e2af8f..743b719e40e 100644 --- a/atom/common/api/atom_api_key_weak_map.h +++ b/atom/common/api/atom_api_key_weak_map.h @@ -23,6 +23,7 @@ class KeyWeakMap : public mate::Wrappable> { static void BuildPrototype(v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "KeyWeakMap")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("set", &KeyWeakMap::Set) .SetMethod("get", &KeyWeakMap::Get) diff --git a/atom/common/api/atom_api_native_image.cc b/atom/common/api/atom_api_native_image.cc index d135e998cf5..bd97ea33850 100644 --- a/atom/common/api/atom_api_native_image.cc +++ b/atom/common/api/atom_api_native_image.cc @@ -356,6 +356,7 @@ mate::Handle NativeImage::CreateFromDataURL( // static void NativeImage::BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "NativeImage")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("toPNG", &NativeImage::ToPNG) .SetMethod("toJPEG", &NativeImage::ToJPEG) diff --git a/atom/renderer/api/atom_api_web_frame.cc b/atom/renderer/api/atom_api_web_frame.cc index 1c88b53b67e..7c6bed9d62a 100644 --- a/atom/renderer/api/atom_api_web_frame.cc +++ b/atom/renderer/api/atom_api_web_frame.cc @@ -188,6 +188,7 @@ void WebFrame::ClearCache(v8::Isolate* isolate) { // static void WebFrame::BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { + prototype->SetClassName(mate::StringToV8(isolate, "WebFrame")); mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("setName", &WebFrame::SetName) .SetMethod("setZoomLevel", &WebFrame::SetZoomLevel) diff --git a/vendor/native_mate b/vendor/native_mate index 4dbe0514941..fa483e1fe01 160000 --- a/vendor/native_mate +++ b/vendor/native_mate @@ -1 +1 @@ -Subproject commit 4dbe0514941b3e6176414d7ceccc90d364726c30 +Subproject commit fa483e1fe012f873ad9812a67a66e2b7dbb570c6