mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-03 20:33:33 +03:00
Remove existing PathWatcher when window is reloaded or closed
This commit is contained in:
parent
0149012efc
commit
18f4134e81
@ -10,6 +10,9 @@ class AtomCefRenderProcessHandler : public CefRenderProcessHandler {
|
||||
virtual void OnContextCreated(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefV8Context> context) OVERRIDE;
|
||||
virtual void OnContextReleased(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefV8Context> context) OVERRIDE;
|
||||
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
|
||||
CefProcessId source_process,
|
||||
CefRefPtr<CefProcessMessage> message) OVERRIDE;
|
||||
|
@ -5,6 +5,7 @@
|
||||
#import "native/v8_extensions/onig_scanner.h"
|
||||
#import "native/v8_extensions/git.h"
|
||||
#import "native/message_translation.h"
|
||||
#import "path_watcher.h"
|
||||
#include <iostream>
|
||||
|
||||
void AtomCefRenderProcessHandler::OnWebKitInitialized() {
|
||||
@ -20,6 +21,12 @@ void AtomCefRenderProcessHandler::OnContextCreated(CefRefPtr<CefBrowser> browser
|
||||
CefRefPtr<CefV8Context> context) {
|
||||
}
|
||||
|
||||
void AtomCefRenderProcessHandler::OnContextReleased(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefV8Context> context) {
|
||||
[PathWatcher removePathWatcherForContext:context];
|
||||
}
|
||||
|
||||
bool AtomCefRenderProcessHandler::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
|
||||
CefProcessId source_process,
|
||||
CefRefPtr<CefProcessMessage> message) {
|
||||
|
Loading…
Reference in New Issue
Block a user