Esempio n. 1
0
v8::Persistent<v8::FunctionTemplate> V8ClientRect::GetTemplate()
{
    V8BindingPerIsolateData* data = V8BindingPerIsolateData::current();
    V8BindingPerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info);
    if (result != data->templateMap().end())
        return result->second;

    v8::HandleScope handleScope;
    v8::Persistent<v8::FunctionTemplate> templ =
        ConfigureV8ClientRectTemplate(GetRawTemplate());
    data->templateMap().add(&info, templ);
    return templ;
}
Esempio n. 2
0
v8::Persistent<v8::FunctionTemplate> V8ClientRect::GetTemplate() {
  static v8::Persistent<v8::FunctionTemplate> V8ClientRect_cache_ = ConfigureV8ClientRectTemplate(GetRawTemplate());
  return V8ClientRect_cache_;
}