mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-22 00:19:24 +03:00
f22fedebcf
This prevents concurrent access to the same state from different worker threads. We needed to treat windowState specially because we explicitly want it to last beyond the life-span of a single context. So we store it as a static variable in `native.mm` and synchronize access with a static `NSLock`. Good enough for now.
23 lines
654 B
C++
23 lines
654 B
C++
#include "include/cef_base.h"
|
|
#include "include/cef_v8.h"
|
|
|
|
namespace v8_extensions {
|
|
class Git : public CefV8Handler {
|
|
public:
|
|
Git();
|
|
void CreateContextBinding(CefRefPtr<CefV8Context> context);
|
|
virtual bool Execute(const CefString& name,
|
|
CefRefPtr<CefV8Value> object,
|
|
const CefV8ValueList& arguments,
|
|
CefRefPtr<CefV8Value>& retval,
|
|
CefString& exception) OVERRIDE;
|
|
|
|
// Provide the reference counting implementation for this class.
|
|
IMPLEMENT_REFCOUNTING(Git);
|
|
|
|
private:
|
|
Git(Git const&);
|
|
void operator=(Git const&);
|
|
};
|
|
}
|