v8::Persistent<v8::FunctionTemplate> V8HTMLAnchorElement::GetTemplate()
{
    V8PerIsolateData* data = V8PerIsolateData::current();
    V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info);
    if (result != data->templateMap().end())
        return result->value;

    v8::HandleScope handleScope;
    v8::Persistent<v8::FunctionTemplate> templ =
        ConfigureV8HTMLAnchorElementTemplate(GetRawTemplate());
    data->templateMap().add(&info, templ);
    return templ;
}
Exemplo n.º 2
0
v8::Persistent<v8::FunctionTemplate> V8HTMLAnchorElement::GetTemplate() {
  static v8::Persistent<v8::FunctionTemplate> V8HTMLAnchorElement_cache_ = ConfigureV8HTMLAnchorElementTemplate(GetRawTemplate());
  return V8HTMLAnchorElement_cache_;
}