зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1547977 - Use JS::DefaultHeapMaxBytes instead of 4 MB for PAC runtime. r=jonco,mayhemer
DefaultHeapMaxBytes is currently 32 MB so it should give us a bit more breathing room. Differential Revision: https://phabricator.services.mozilla.com/D42819 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2183a1dea8
Коммит
28c7a3ddb9
|
@ -562,7 +562,7 @@ static const JSFunctionSpec PACGlobalFunctions[] = {
|
|||
class JSContextWrapper {
|
||||
public:
|
||||
static JSContextWrapper* Create(uint32_t aExtraHeapSize) {
|
||||
JSContext* cx = JS_NewContext(sContextHeapSize + aExtraHeapSize);
|
||||
JSContext* cx = JS_NewContext(JS::DefaultHeapMaxBytes + aExtraHeapSize);
|
||||
if (NS_WARN_IF(!cx)) return nullptr;
|
||||
|
||||
JSContextWrapper* entry = new JSContextWrapper(cx);
|
||||
|
@ -593,8 +593,6 @@ class JSContextWrapper {
|
|||
bool IsOK() { return mOK; }
|
||||
|
||||
private:
|
||||
static const uint32_t sContextHeapSize = 4 << 20; // 4 MB
|
||||
|
||||
JSContext* mContext;
|
||||
JS::PersistentRooted<JSObject*> mGlobal;
|
||||
bool mOK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче