2013-09-06 10:42:57 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_AtomList_h
|
|
|
|
#define mozilla_dom_AtomList_h
|
2013-08-23 09:17:09 +04:00
|
|
|
|
|
|
|
#include "jsapi.h"
|
|
|
|
#include "mozilla/dom/GeneratedAtomList.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
T* GetAtomCache(JSContext* aCx) {
|
2016-07-18 15:36:13 +03:00
|
|
|
auto atomCache = static_cast<PerThreadAtomCache*>(JS_GetContextPrivate(aCx));
|
2013-08-23 09:17:09 +04:00
|
|
|
|
|
|
|
return static_cast<T*>(atomCache);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2013-09-06 10:42:57 +04:00
|
|
|
#endif // mozilla_dom_AtomList_h
|