This source file includes following definitions.
- runner_
- From
#include "gin/per_context_data.h"
#include "base/logging.h"
#include "gin/public/context_holder.h"
#include "gin/public/wrapper_info.h"
namespace gin {
PerContextData::PerContextData(ContextHolder* context_holder,
v8::Handle<v8::Context> context)
: context_holder_(context_holder),
runner_(NULL) {
context->SetAlignedPointerInEmbedderData(
kPerContextDataStartIndex + kEmbedderNativeGin, this);
}
PerContextData::~PerContextData() {
v8::HandleScope handle_scope(context_holder_->isolate());
context_holder_->context()->SetAlignedPointerInEmbedderData(
kPerContextDataStartIndex + kEmbedderNativeGin, NULL);
}
PerContextData* PerContextData::From(v8::Handle<v8::Context> context) {
return static_cast<PerContextData*>(
context->GetAlignedPointerFromEmbedderData(kEncodedValueIndex));
}
}