Changeset 208953 in webkit for trunk/Source/JavaScriptCore/runtime/TemplateRegistry.cpp
- Timestamp:
- Nov 21, 2016, 3:54:43 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/TemplateRegistry.cpp
r206386 r208953 28 28 #include "TemplateRegistry.h" 29 29 30 #include "BuiltinNames.h" 30 31 #include "JSCInlines.h" 31 32 #include "JSGlobalObject.h" 33 #include "JSTemplateRegistryKey.h" 32 34 #include "ObjectConstructor.h" 35 #include "TemplateRegistryKey.h" 33 36 #include "WeakGCMapInlines.h" 34 37 … … 40 43 } 41 44 42 JSArray* TemplateRegistry::getTemplateObject(ExecState* exec, const TemplateRegistryKey& templateKey)45 JSArray* TemplateRegistry::getTemplateObject(ExecState* exec, JSTemplateRegistryKey* templateKeyObject) 43 46 { 44 JSArray* cached = m_templateMap.get(templateKey); 47 auto& templateKey = templateKeyObject->templateRegistryKey(); 48 JSArray* cached = m_templateMap.get(&templateKey); 45 49 if (cached) 46 50 return cached; … … 64 68 templateObject->putDirect(vm, exec->propertyNames().raw, rawObject, ReadOnly | DontEnum | DontDelete); 65 69 70 // Template JSArray hold the reference to JSTemplateRegistryKey to make TemplateRegistryKey pointer live until this JSArray is collected. 71 // TemplateRegistryKey pointer is used for TemplateRegistry's key. 72 templateObject->putDirect(vm, vm.propertyNames->builtinNames().templateRegistryKeyPrivateName(), templateKeyObject, ReadOnly | DontEnum | DontDelete); 73 66 74 objectConstructorFreeze(exec, templateObject); 67 75 ASSERT(!scope.exception()); 68 76 69 m_templateMap.set( templateKey, templateObject);77 m_templateMap.set(&templateKey, templateObject); 70 78 71 79 return templateObject;
Note:
See TracChangeset
for help on using the changeset viewer.