v8::Persistent<v8::FunctionTemplate> V8DOMStringMap::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 = ConfigureV8DOMStringMapTemplate(GetRawTemplate()); data->templateMap().add(&info, templ); return templ; }
v8::Persistent<v8::FunctionTemplate> V8DOMStringMap::GetTemplate() { static v8::Persistent<v8::FunctionTemplate> V8DOMStringMapCache = ConfigureV8DOMStringMapTemplate(GetRawTemplate()); return V8DOMStringMapCache; }