Files
atom/native/v8_extensions/native.h
Nathan Sobo f22fedebcf Inject new instances of native objects into every JS context
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.
2013-01-24 17:22:50 -08:00

24 lines
733 B
C++

#include "include/cef_base.h"
#include "include/cef_v8.h"
namespace v8_extensions {
class Native : public CefV8Handler {
public:
Native();
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(Native);
private:
Native(Native const&);
void operator=(Native const&);
};
}