зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1716147 - Mark TempAllocPolicy as JS_PUBLIC_API. r=sfink
Fix MSVC issues due to inconsistent JS_PUBLIC_API markers. The forward definitions of TempAllocPolicy use JS_PUBLIC_API so the structure itself should match. Differential Revision: https://phabricator.services.mozilla.com/D117585
This commit is contained in:
Родитель
498eb65932
Коммит
ca7e9e9e07
|
@ -102,15 +102,15 @@ MOZ_COLD JS_PUBLIC_API void ReportOutOfMemory(JSContext* cx);
|
|||
* FIXME bug 647103 - rewrite this in terms of temporary allocation functions,
|
||||
* not the system ones.
|
||||
*/
|
||||
class TempAllocPolicy : public AllocPolicyBase {
|
||||
class JS_PUBLIC_API TempAllocPolicy : public AllocPolicyBase {
|
||||
JSContext* const cx_;
|
||||
|
||||
/*
|
||||
* Non-inline helper to call JSRuntime::onOutOfMemory with minimal
|
||||
* code bloat.
|
||||
*/
|
||||
JS_PUBLIC_API void* onOutOfMemory(arena_id_t arenaId, AllocFunction allocFunc,
|
||||
size_t nbytes, void* reallocPtr = nullptr);
|
||||
void* onOutOfMemory(arena_id_t arenaId, AllocFunction allocFunc,
|
||||
size_t nbytes, void* reallocPtr = nullptr);
|
||||
|
||||
template <typename T>
|
||||
T* onOutOfMemoryTyped(arena_id_t arenaId, AllocFunction allocFunc,
|
||||
|
@ -175,7 +175,7 @@ class TempAllocPolicy : public AllocPolicyBase {
|
|||
js_free(p);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API void reportAllocOverflow() const;
|
||||
void reportAllocOverflow() const;
|
||||
|
||||
bool checkSimulatedOOM() const {
|
||||
if (js::oom::ShouldFailWithOOM()) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче