2011-03-30 03:10:12 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
* vim: set ts=8 sw=4 et tw=99 ft=cpp:
|
|
|
|
*
|
2012-05-21 04:12:37 -07:00
|
|
|
* 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/. */
|
2011-03-30 03:10:12 -07:00
|
|
|
|
|
|
|
#include "jsalloc.h"
|
|
|
|
#include "jscntxt.h"
|
|
|
|
|
2012-11-16 13:59:26 -08:00
|
|
|
using namespace js;
|
2011-03-30 03:10:12 -07:00
|
|
|
|
|
|
|
void *
|
2011-06-17 10:11:33 -07:00
|
|
|
TempAllocPolicy::onOutOfMemory(void *p, size_t nbytes)
|
2011-03-30 03:10:12 -07:00
|
|
|
{
|
|
|
|
return cx->runtime->onOutOfMemory(p, nbytes, cx);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2011-06-17 10:11:33 -07:00
|
|
|
TempAllocPolicy::reportAllocOverflow() const
|
2011-03-30 03:10:12 -07:00
|
|
|
{
|
|
|
|
js_ReportAllocationOverflow(cx);
|
|
|
|
}
|