mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
24 lines
456 B
C
24 lines
456 B
C
|
#ifndef mozilla_dom_AtomList_h__
|
||
|
#define mozilla_dom_AtomList_h__
|
||
|
|
||
|
#include "jsapi.h"
|
||
|
#include "mozilla/dom/GeneratedAtomList.h"
|
||
|
|
||
|
namespace mozilla {
|
||
|
namespace dom {
|
||
|
|
||
|
template<class T>
|
||
|
T* GetAtomCache(JSContext* aCx)
|
||
|
{
|
||
|
JSRuntime* rt = JS_GetRuntime(aCx);
|
||
|
|
||
|
auto atomCache = static_cast<PerThreadAtomCache*>(JS_GetRuntimePrivate(rt));
|
||
|
|
||
|
return static_cast<T*>(atomCache);
|
||
|
}
|
||
|
|
||
|
} // namespace dom
|
||
|
} // namespace mozilla
|
||
|
|
||
|
#endif // mozilla_dom_AtomList_h__
|