From cb19efe49cc8a5824140400652e22091c0c5816a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 2 Aug 2016 18:08:12 +0900 Subject: [PATCH] Pass FunctionTemplate in BuildPrototype --- atom/browser/api/atom_api_app.cc | 4 ++-- atom/browser/api/atom_api_app.h | 2 +- atom/browser/api/atom_api_auto_updater.cc | 4 ++-- atom/browser/api/atom_api_auto_updater.h | 2 +- atom/browser/api/atom_api_cookies.cc | 4 ++-- atom/browser/api/atom_api_cookies.h | 2 +- atom/browser/api/atom_api_debugger.cc | 4 ++-- atom/browser/api/atom_api_debugger.h | 2 +- atom/browser/api/atom_api_desktop_capturer.cc | 4 ++-- atom/browser/api/atom_api_desktop_capturer.h | 2 +- atom/browser/api/atom_api_download_item.cc | 4 ++-- atom/browser/api/atom_api_download_item.h | 2 +- atom/browser/api/atom_api_global_shortcut.cc | 4 ++-- atom/browser/api/atom_api_global_shortcut.h | 2 +- atom/browser/api/atom_api_menu.cc | 4 ++-- atom/browser/api/atom_api_menu.h | 2 +- atom/browser/api/atom_api_power_monitor.cc | 4 ++-- atom/browser/api/atom_api_power_monitor.h | 2 +- atom/browser/api/atom_api_power_save_blocker.cc | 4 ++-- atom/browser/api/atom_api_power_save_blocker.h | 2 +- atom/browser/api/atom_api_protocol.cc | 4 ++-- atom/browser/api/atom_api_protocol.h | 2 +- atom/browser/api/atom_api_render_process_preferences.cc | 4 ++-- atom/browser/api/atom_api_render_process_preferences.h | 2 +- atom/browser/api/atom_api_screen.cc | 4 ++-- atom/browser/api/atom_api_screen.h | 2 +- atom/browser/api/atom_api_session.cc | 4 ++-- atom/browser/api/atom_api_session.h | 2 +- atom/browser/api/atom_api_system_preferences.cc | 4 ++-- atom/browser/api/atom_api_system_preferences.h | 2 +- atom/browser/api/atom_api_tray.cc | 4 ++-- atom/browser/api/atom_api_tray.h | 2 +- atom/browser/api/atom_api_web_contents.cc | 4 ++-- atom/browser/api/atom_api_web_contents.h | 2 +- atom/browser/api/atom_api_web_request.cc | 4 ++-- atom/browser/api/atom_api_web_request.h | 2 +- atom/browser/api/atom_api_window.cc | 4 ++-- atom/browser/api/atom_api_window.h | 2 +- atom/browser/api/event.cc | 4 ++-- atom/browser/api/event.h | 2 +- atom/common/api/atom_api_asar.cc | 4 ++-- atom/common/api/atom_api_key_weak_map.h | 4 ++-- atom/common/api/atom_api_native_image.cc | 4 ++-- atom/common/api/atom_api_native_image.h | 2 +- atom/renderer/api/atom_api_web_frame.cc | 4 ++-- atom/renderer/api/atom_api_web_frame.h | 2 +- vendor/native_mate | 2 +- 47 files changed, 71 insertions(+), 71 deletions(-) diff --git a/atom/browser/api/atom_api_app.cc b/atom/browser/api/atom_api_app.cc index 534e5c4..fb3655c 100644 --- a/atom/browser/api/atom_api_app.cc +++ b/atom/browser/api/atom_api_app.cc @@ -531,9 +531,9 @@ mate::Handle App::Create(v8::Isolate* isolate) { // static void App::BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { + v8::Isolate* isolate, v8::Local prototype) { auto browser = base::Unretained(Browser::Get()); - mate::ObjectTemplateBuilder(isolate, prototype) + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("quit", base::Bind(&Browser::Quit, browser)) .SetMethod("exit", base::Bind(&Browser::Exit, browser)) .SetMethod("focus", base::Bind(&Browser::Focus, browser)) diff --git a/atom/browser/api/atom_api_app.h b/atom/browser/api/atom_api_app.h index 13cedaa..990199c 100644 --- a/atom/browser/api/atom_api_app.h +++ b/atom/browser/api/atom_api_app.h @@ -40,7 +40,7 @@ class App : public AtomBrowserClient::Delegate, static mate::Handle Create(v8::Isolate* isolate); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); // Called when window with disposition needs to be created. void OnCreateWindow(const GURL& target_url, diff --git a/atom/browser/api/atom_api_auto_updater.cc b/atom/browser/api/atom_api_auto_updater.cc index f8d9a2f..ed1193d 100644 --- a/atom/browser/api/atom_api_auto_updater.cc +++ b/atom/browser/api/atom_api_auto_updater.cc @@ -106,8 +106,8 @@ mate::Handle AutoUpdater::Create(v8::Isolate* isolate) { // static void AutoUpdater::BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Isolate* isolate, v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("checkForUpdates", &auto_updater::AutoUpdater::CheckForUpdates) .SetMethod("getFeedURL", &auto_updater::AutoUpdater::GetFeedURL) .SetMethod("setFeedURL", &AutoUpdater::SetFeedURL) diff --git a/atom/browser/api/atom_api_auto_updater.h b/atom/browser/api/atom_api_auto_updater.h index 4c73f7c..83a6614 100644 --- a/atom/browser/api/atom_api_auto_updater.h +++ b/atom/browser/api/atom_api_auto_updater.h @@ -24,7 +24,7 @@ class AutoUpdater : public mate::EventEmitter, static mate::Handle Create(v8::Isolate* isolate); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); protected: explicit AutoUpdater(v8::Isolate* isolate); diff --git a/atom/browser/api/atom_api_cookies.cc b/atom/browser/api/atom_api_cookies.cc index 4ee2190..0f1fb33 100644 --- a/atom/browser/api/atom_api_cookies.cc +++ b/atom/browser/api/atom_api_cookies.cc @@ -248,8 +248,8 @@ mate::Handle Cookies::Create( // static void Cookies::BuildPrototype(v8::Isolate* isolate, - v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("get", &Cookies::Get) .SetMethod("remove", &Cookies::Remove) .SetMethod("set", &Cookies::Set); diff --git a/atom/browser/api/atom_api_cookies.h b/atom/browser/api/atom_api_cookies.h index ce20c77..5f60cb7 100644 --- a/atom/browser/api/atom_api_cookies.h +++ b/atom/browser/api/atom_api_cookies.h @@ -41,7 +41,7 @@ class Cookies : public mate::TrackableObject { // mate::TrackableObject: static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); protected: Cookies(v8::Isolate* isolate, AtomBrowserContext* browser_context); diff --git a/atom/browser/api/atom_api_debugger.cc b/atom/browser/api/atom_api_debugger.cc index 48b7a6f..f867adb 100644 --- a/atom/browser/api/atom_api_debugger.cc +++ b/atom/browser/api/atom_api_debugger.cc @@ -159,8 +159,8 @@ mate::Handle Debugger::Create( // static void Debugger::BuildPrototype(v8::Isolate* isolate, - v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("attach", &Debugger::Attach) .SetMethod("isAttached", &Debugger::IsAttached) .SetMethod("detach", &Debugger::Detach) diff --git a/atom/browser/api/atom_api_debugger.h b/atom/browser/api/atom_api_debugger.h index 1e97fa8..2f7106e 100644 --- a/atom/browser/api/atom_api_debugger.h +++ b/atom/browser/api/atom_api_debugger.h @@ -39,7 +39,7 @@ class Debugger: public mate::TrackableObject, // mate::TrackableObject: static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); protected: Debugger(v8::Isolate* isolate, content::WebContents* web_contents); diff --git a/atom/browser/api/atom_api_desktop_capturer.cc b/atom/browser/api/atom_api_desktop_capturer.cc index 3cb29a9..053efbd 100644 --- a/atom/browser/api/atom_api_desktop_capturer.cc +++ b/atom/browser/api/atom_api_desktop_capturer.cc @@ -99,8 +99,8 @@ mate::Handle DesktopCapturer::Create(v8::Isolate* isolate) { // static void DesktopCapturer::BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Isolate* isolate, v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("startHandling", &DesktopCapturer::StartHandling); } diff --git a/atom/browser/api/atom_api_desktop_capturer.h b/atom/browser/api/atom_api_desktop_capturer.h index 4d1755e..571f08b 100644 --- a/atom/browser/api/atom_api_desktop_capturer.h +++ b/atom/browser/api/atom_api_desktop_capturer.h @@ -20,7 +20,7 @@ class DesktopCapturer: public mate::EventEmitter, static mate::Handle Create(v8::Isolate* isolate); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); void StartHandling(bool capture_window, bool capture_screen, diff --git a/atom/browser/api/atom_api_download_item.cc b/atom/browser/api/atom_api_download_item.cc index 79ea3fa..1a3a9ec 100644 --- a/atom/browser/api/atom_api_download_item.cc +++ b/atom/browser/api/atom_api_download_item.cc @@ -167,8 +167,8 @@ base::FilePath DownloadItem::GetSavePath() const { // static void DownloadItem::BuildPrototype(v8::Isolate* isolate, - v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .MakeDestroyable() .SetMethod("pause", &DownloadItem::Pause) .SetMethod("isPaused", &DownloadItem::IsPaused) diff --git a/atom/browser/api/atom_api_download_item.h b/atom/browser/api/atom_api_download_item.h index fa330b90..332c8ce 100644 --- a/atom/browser/api/atom_api_download_item.h +++ b/atom/browser/api/atom_api_download_item.h @@ -24,7 +24,7 @@ class DownloadItem : public mate::TrackableObject, content::DownloadItem* item); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); void Pause(); bool IsPaused() const; diff --git a/atom/browser/api/atom_api_global_shortcut.cc b/atom/browser/api/atom_api_global_shortcut.cc index 2b1e5d6..7ed8265 100644 --- a/atom/browser/api/atom_api_global_shortcut.cc +++ b/atom/browser/api/atom_api_global_shortcut.cc @@ -74,8 +74,8 @@ mate::Handle GlobalShortcut::Create(v8::Isolate* isolate) { // static void GlobalShortcut::BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Isolate* isolate, v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("register", &GlobalShortcut::Register) .SetMethod("isRegistered", &GlobalShortcut::IsRegistered) .SetMethod("unregister", &GlobalShortcut::Unregister) diff --git a/atom/browser/api/atom_api_global_shortcut.h b/atom/browser/api/atom_api_global_shortcut.h index 41eb42f..b023aec 100644 --- a/atom/browser/api/atom_api_global_shortcut.h +++ b/atom/browser/api/atom_api_global_shortcut.h @@ -24,7 +24,7 @@ class GlobalShortcut : public extensions::GlobalShortcutListener::Observer, static mate::Handle Create(v8::Isolate* isolate); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); protected: explicit GlobalShortcut(v8::Isolate* isolate); diff --git a/atom/browser/api/atom_api_menu.cc b/atom/browser/api/atom_api_menu.cc index e705f61..8150fee 100644 --- a/atom/browser/api/atom_api_menu.cc +++ b/atom/browser/api/atom_api_menu.cc @@ -155,8 +155,8 @@ bool Menu::IsVisibleAt(int index) const { // static void Menu::BuildPrototype(v8::Isolate* isolate, - v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .MakeDestroyable() .SetMethod("insertItem", &Menu::InsertItemAt) .SetMethod("insertCheckItem", &Menu::InsertCheckItemAt) diff --git a/atom/browser/api/atom_api_menu.h b/atom/browser/api/atom_api_menu.h index 24164e5..97b6360 100644 --- a/atom/browser/api/atom_api_menu.h +++ b/atom/browser/api/atom_api_menu.h @@ -23,7 +23,7 @@ class Menu : public mate::TrackableObject, static mate::WrappableBase* New(mate::Arguments* args); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); #if defined(OS_MACOSX) // Set the global menubar. diff --git a/atom/browser/api/atom_api_power_monitor.cc b/atom/browser/api/atom_api_power_monitor.cc index 32c50c6..06ab986 100644 --- a/atom/browser/api/atom_api_power_monitor.cc +++ b/atom/browser/api/atom_api_power_monitor.cc @@ -52,8 +52,8 @@ v8::Local PowerMonitor::Create(v8::Isolate* isolate) { // static void PowerMonitor::BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype); + v8::Isolate* isolate, v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()); } } // namespace api diff --git a/atom/browser/api/atom_api_power_monitor.h b/atom/browser/api/atom_api_power_monitor.h index 50d4bb4..94717e4 100644 --- a/atom/browser/api/atom_api_power_monitor.h +++ b/atom/browser/api/atom_api_power_monitor.h @@ -20,7 +20,7 @@ class PowerMonitor : public mate::TrackableObject, static v8::Local Create(v8::Isolate* isolate); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); protected: explicit PowerMonitor(v8::Isolate* isolate); diff --git a/atom/browser/api/atom_api_power_save_blocker.cc b/atom/browser/api/atom_api_power_save_blocker.cc index 67c9b6d..7aa079c 100644 --- a/atom/browser/api/atom_api_power_save_blocker.cc +++ b/atom/browser/api/atom_api_power_save_blocker.cc @@ -105,8 +105,8 @@ mate::Handle PowerSaveBlocker::Create(v8::Isolate* isolate) { // static void PowerSaveBlocker::BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Isolate* isolate, v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("start", &PowerSaveBlocker::Start) .SetMethod("stop", &PowerSaveBlocker::Stop) .SetMethod("isStarted", &PowerSaveBlocker::IsStarted); diff --git a/atom/browser/api/atom_api_power_save_blocker.h b/atom/browser/api/atom_api_power_save_blocker.h index ee1e0e3..0687106 100644 --- a/atom/browser/api/atom_api_power_save_blocker.h +++ b/atom/browser/api/atom_api_power_save_blocker.h @@ -25,7 +25,7 @@ class PowerSaveBlocker : public mate::TrackableObject { static mate::Handle Create(v8::Isolate* isolate); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); protected: explicit PowerSaveBlocker(v8::Isolate* isolate); diff --git a/atom/browser/api/atom_api_protocol.cc b/atom/browser/api/atom_api_protocol.cc index 4019a96..c081c13 100644 --- a/atom/browser/api/atom_api_protocol.cc +++ b/atom/browser/api/atom_api_protocol.cc @@ -160,8 +160,8 @@ mate::Handle Protocol::Create( // static void Protocol::BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Isolate* isolate, v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("registerServiceWorkerSchemes", &Protocol::RegisterServiceWorkerSchemes) .SetMethod("registerStringProtocol", diff --git a/atom/browser/api/atom_api_protocol.h b/atom/browser/api/atom_api_protocol.h index b5d47de..969fe7f 100644 --- a/atom/browser/api/atom_api_protocol.h +++ b/atom/browser/api/atom_api_protocol.h @@ -39,7 +39,7 @@ class Protocol : public mate::TrackableObject { v8::Isolate* isolate, AtomBrowserContext* browser_context); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); protected: Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context); diff --git a/atom/browser/api/atom_api_render_process_preferences.cc b/atom/browser/api/atom_api_render_process_preferences.cc index 3d9495d..5f57763 100644 --- a/atom/browser/api/atom_api_render_process_preferences.cc +++ b/atom/browser/api/atom_api_render_process_preferences.cc @@ -53,8 +53,8 @@ void RenderProcessPreferences::RemoveEntry(int id) { // static void RenderProcessPreferences::BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Isolate* isolate, v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("addEntry", &RenderProcessPreferences::AddEntry) .SetMethod("removeEntry", &RenderProcessPreferences::RemoveEntry); } diff --git a/atom/browser/api/atom_api_render_process_preferences.h b/atom/browser/api/atom_api_render_process_preferences.h index 3fa197e..19cc0d8 100644 --- a/atom/browser/api/atom_api_render_process_preferences.h +++ b/atom/browser/api/atom_api_render_process_preferences.h @@ -20,7 +20,7 @@ class RenderProcessPreferences ForAllWebContents(v8::Isolate* isolate); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); int AddEntry(const base::DictionaryValue& entry); void RemoveEntry(int id); diff --git a/atom/browser/api/atom_api_screen.cc b/atom/browser/api/atom_api_screen.cc index 68f4bae..56e49ab 100644 --- a/atom/browser/api/atom_api_screen.cc +++ b/atom/browser/api/atom_api_screen.cc @@ -113,8 +113,8 @@ v8::Local Screen::Create(v8::Isolate* isolate) { // static void Screen::BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Isolate* isolate, v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("getCursorScreenPoint", &Screen::GetCursorScreenPoint) .SetMethod("getPrimaryDisplay", &Screen::GetPrimaryDisplay) .SetMethod("getAllDisplays", &Screen::GetAllDisplays) diff --git a/atom/browser/api/atom_api_screen.h b/atom/browser/api/atom_api_screen.h index feff6dd..2bbaa13 100644 --- a/atom/browser/api/atom_api_screen.h +++ b/atom/browser/api/atom_api_screen.h @@ -28,7 +28,7 @@ class Screen : public mate::EventEmitter, static v8::Local Create(v8::Isolate* isolate); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); protected: Screen(v8::Isolate* isolate, display::Screen* screen); diff --git a/atom/browser/api/atom_api_session.cc b/atom/browser/api/atom_api_session.cc index 9117ff5..f483980 100644 --- a/atom/browser/api/atom_api_session.cc +++ b/atom/browser/api/atom_api_session.cc @@ -570,8 +570,8 @@ mate::Handle Session::FromPartition( // static void Session::BuildPrototype(v8::Isolate* isolate, - v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .MakeDestroyable() .SetMethod("resolveProxy", &Session::ResolveProxy) .SetMethod("getCacheSize", &Session::DoCacheAction) diff --git a/atom/browser/api/atom_api_session.h b/atom/browser/api/atom_api_session.h index c3bb82e..18189cf 100644 --- a/atom/browser/api/atom_api_session.h +++ b/atom/browser/api/atom_api_session.h @@ -57,7 +57,7 @@ class Session: public mate::TrackableObject, // mate::TrackableObject: static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); // Methods. void ResolveProxy(const GURL& url, ResolveProxyCallback callback); diff --git a/atom/browser/api/atom_api_system_preferences.cc b/atom/browser/api/atom_api_system_preferences.cc index c342136..a7fca68 100644 --- a/atom/browser/api/atom_api_system_preferences.cc +++ b/atom/browser/api/atom_api_system_preferences.cc @@ -44,8 +44,8 @@ mate::Handle SystemPreferences::Create( // static void SystemPreferences::BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Isolate* isolate, v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) #if defined(OS_WIN) .SetMethod("isAeroGlassEnabled", &SystemPreferences::IsAeroGlassEnabled) #elif defined(OS_MACOSX) diff --git a/atom/browser/api/atom_api_system_preferences.h b/atom/browser/api/atom_api_system_preferences.h index 9a5cf99..0d1f954 100644 --- a/atom/browser/api/atom_api_system_preferences.h +++ b/atom/browser/api/atom_api_system_preferences.h @@ -24,7 +24,7 @@ class SystemPreferences : public mate::EventEmitter { static mate::Handle Create(v8::Isolate* isolate); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); #if defined(OS_WIN) bool IsAeroGlassEnabled(); diff --git a/atom/browser/api/atom_api_tray.cc b/atom/browser/api/atom_api_tray.cc index 7892c7b..051b7b2 100644 --- a/atom/browser/api/atom_api_tray.cc +++ b/atom/browser/api/atom_api_tray.cc @@ -201,8 +201,8 @@ gfx::Rect Tray::GetBounds() { // static void Tray::BuildPrototype(v8::Isolate* isolate, - v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .MakeDestroyable() .SetMethod("setImage", &Tray::SetImage) .SetMethod("setPressedImage", &Tray::SetPressedImage) diff --git a/atom/browser/api/atom_api_tray.h b/atom/browser/api/atom_api_tray.h index 038c441..61ee72b 100644 --- a/atom/browser/api/atom_api_tray.h +++ b/atom/browser/api/atom_api_tray.h @@ -39,7 +39,7 @@ class Tray : public mate::TrackableObject, mate::Arguments* args); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); protected: Tray(v8::Isolate* isolate, v8::Local wrapper, diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 967dc04..2a83072 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -1364,8 +1364,8 @@ v8::Local WebContents::Debugger(v8::Isolate* isolate) { // static void WebContents::BuildPrototype(v8::Isolate* isolate, - v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .MakeDestroyable() .SetMethod("getId", &WebContents::GetID) .SetMethod("equal", &WebContents::Equal) diff --git a/atom/browser/api/atom_api_web_contents.h b/atom/browser/api/atom_api_web_contents.h index 381f377..e3049f6 100644 --- a/atom/browser/api/atom_api_web_contents.h +++ b/atom/browser/api/atom_api_web_contents.h @@ -63,7 +63,7 @@ class WebContents : public mate::TrackableObject, v8::Isolate* isolate, const mate::Dictionary& options); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); int GetID() const; Type GetType() const; diff --git a/atom/browser/api/atom_api_web_request.cc b/atom/browser/api/atom_api_web_request.cc index 867901d..11ba39c 100644 --- a/atom/browser/api/atom_api_web_request.cc +++ b/atom/browser/api/atom_api_web_request.cc @@ -88,8 +88,8 @@ mate::Handle WebRequest::Create( // static void WebRequest::BuildPrototype(v8::Isolate* isolate, - v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("onBeforeRequest", &WebRequest::SetResponseListener< AtomNetworkDelegate::kOnBeforeRequest>) diff --git a/atom/browser/api/atom_api_web_request.h b/atom/browser/api/atom_api_web_request.h index edcdcc5..b05a4e1 100644 --- a/atom/browser/api/atom_api_web_request.h +++ b/atom/browser/api/atom_api_web_request.h @@ -22,7 +22,7 @@ class WebRequest : public mate::TrackableObject { AtomBrowserContext* browser_context); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); protected: WebRequest(v8::Isolate* isolate, AtomBrowserContext* browser_context); diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index 70ecf8f..a013b4e 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -746,8 +746,8 @@ void Window::RemoveFromParentChildWindows() { // static void Window::BuildPrototype(v8::Isolate* isolate, - v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .MakeDestroyable() .SetMethod("close", &Window::Close) .SetMethod("focus", &Window::Focus) diff --git a/atom/browser/api/atom_api_window.h b/atom/browser/api/atom_api_window.h index c585af1..5da7bd8 100644 --- a/atom/browser/api/atom_api_window.h +++ b/atom/browser/api/atom_api_window.h @@ -43,7 +43,7 @@ class Window : public mate::TrackableObject, static mate::WrappableBase* New(mate::Arguments* args); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); // Returns the BrowserWindow object from |native_window|. static v8::Local From(v8::Isolate* isolate, diff --git a/atom/browser/api/event.cc b/atom/browser/api/event.cc index 8c60eda..874e30f 100644 --- a/atom/browser/api/event.cc +++ b/atom/browser/api/event.cc @@ -58,8 +58,8 @@ Handle Event::Create(v8::Isolate* isolate) { // static void Event::BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Isolate* isolate, v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("preventDefault", &Event::PreventDefault) .SetMethod("sendReply", &Event::SendReply); } diff --git a/atom/browser/api/event.h b/atom/browser/api/event.h index 81db638..f08802b 100644 --- a/atom/browser/api/event.h +++ b/atom/browser/api/event.h @@ -21,7 +21,7 @@ class Event : public Wrappable, static Handle Create(v8::Isolate* isolate); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); // Pass the sender and message to be replied. void SetSenderAndMessage(content::WebContents* sender, IPC::Message* message); diff --git a/atom/common/api/atom_api_asar.cc b/atom/common/api/atom_api_asar.cc index 97c2e47..0890368 100644 --- a/atom/common/api/atom_api_asar.cc +++ b/atom/common/api/atom_api_asar.cc @@ -29,8 +29,8 @@ class Archive : public mate::Wrappable { } static void BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Isolate* isolate, v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetProperty("path", &Archive::GetPath) .SetMethod("getFileInfo", &Archive::GetFileInfo) .SetMethod("stat", &Archive::Stat) diff --git a/atom/common/api/atom_api_key_weak_map.h b/atom/common/api/atom_api_key_weak_map.h index 021b690..b6549e2 100644 --- a/atom/common/api/atom_api_key_weak_map.h +++ b/atom/common/api/atom_api_key_weak_map.h @@ -22,8 +22,8 @@ class KeyWeakMap : public mate::Wrappable> { } static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("set", &KeyWeakMap::Set) .SetMethod("get", &KeyWeakMap::Get) .SetMethod("has", &KeyWeakMap::Has) diff --git a/atom/common/api/atom_api_native_image.cc b/atom/common/api/atom_api_native_image.cc index 187ec7f..d135e99 100644 --- a/atom/common/api/atom_api_native_image.cc +++ b/atom/common/api/atom_api_native_image.cc @@ -355,8 +355,8 @@ mate::Handle NativeImage::CreateFromDataURL( // static void NativeImage::BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Isolate* isolate, v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("toPNG", &NativeImage::ToPNG) .SetMethod("toJPEG", &NativeImage::ToJPEG) .SetMethod("toBitmap", &NativeImage::ToBitmap) diff --git a/atom/common/api/atom_api_native_image.h b/atom/common/api/atom_api_native_image.h index 6702b33..d6fddd1 100644 --- a/atom/common/api/atom_api_native_image.h +++ b/atom/common/api/atom_api_native_image.h @@ -52,7 +52,7 @@ class NativeImage : public mate::Wrappable { v8::Isolate* isolate, const GURL& url); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); #if defined(OS_WIN) HICON GetHICON(int size); diff --git a/atom/renderer/api/atom_api_web_frame.cc b/atom/renderer/api/atom_api_web_frame.cc index dce72b58..1c88b53 100644 --- a/atom/renderer/api/atom_api_web_frame.cc +++ b/atom/renderer/api/atom_api_web_frame.cc @@ -187,8 +187,8 @@ void WebFrame::ClearCache(v8::Isolate* isolate) { // static void WebFrame::BuildPrototype( - v8::Isolate* isolate, v8::Local prototype) { - mate::ObjectTemplateBuilder(isolate, prototype) + v8::Isolate* isolate, v8::Local prototype) { + mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("setName", &WebFrame::SetName) .SetMethod("setZoomLevel", &WebFrame::SetZoomLevel) .SetMethod("getZoomLevel", &WebFrame::GetZoomLevel) diff --git a/atom/renderer/api/atom_api_web_frame.h b/atom/renderer/api/atom_api_web_frame.h index 852191f..7b2401d 100644 --- a/atom/renderer/api/atom_api_web_frame.h +++ b/atom/renderer/api/atom_api_web_frame.h @@ -32,7 +32,7 @@ class WebFrame : public mate::Wrappable { static mate::Handle Create(v8::Isolate* isolate); static void BuildPrototype(v8::Isolate* isolate, - v8::Local prototype); + v8::Local prototype); private: explicit WebFrame(v8::Isolate* isolate); diff --git a/vendor/native_mate b/vendor/native_mate index 3a7a6ef..4dbe051 160000 --- a/vendor/native_mate +++ b/vendor/native_mate @@ -1 +1 @@ -Subproject commit 3a7a6efffb4b3cd68967466cb1cab337509e3b07 +Subproject commit 4dbe0514941b3e6176414d7ceccc90d364726c30 -- 2.7.4