pulsar/native/v8_extensions/atom.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

23 lines
664 B
C++

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