Bug 878399: Preparatory cleanups; r=luke

--HG--
extra : rebase_source : febbb6a64aa0790641c5e0efb7103deac4412caa
This commit is contained in:
Benjamin Bouvier 2014-04-02 19:37:00 +02:00
Родитель 1df562a381
Коммит d812cd3dbd
4 изменённых файлов: 10 добавлений и 7 удалений

Просмотреть файл

@ -1096,7 +1096,7 @@ class ModuleCharsForStore : ModuleChars
js::Vector<char, 0, SystemAllocPolicy> compressedBuffer_;
public:
bool init(AsmJSParser &parser, const AsmJSModule &module) {
bool init(AsmJSParser &parser) {
JS_ASSERT(beginOffset(parser) < endOffset(parser));
uncompressedSize_ = (endOffset(parser) - beginOffset(parser)) * sizeof(jschar);
@ -1248,7 +1248,7 @@ js::StoreAsmJSModuleInCache(AsmJSParser &parser,
return false;
ModuleCharsForStore moduleChars;
if (!moduleChars.init(parser, module))
if (!moduleChars.init(parser))
return false;
size_t serializedSize = machineId.serializedSize() +

Просмотреть файл

@ -843,11 +843,14 @@ js::FunctionToString(JSContext *cx, HandleFunction fun, bool bodyOnly, bool lamb
return nullptr;
} else {
JS_ASSERT(!fun->isExprClosure());
if ((!bodyOnly && !out.append("() {\n ")) ||
!out.append("[native code]") ||
(!bodyOnly && !out.append("\n}")))
if ((!bodyOnly && !out.append("() {\n "))
|| !out.append("[native code]")
|| (!bodyOnly && !out.append("\n}")))
{
return nullptr;
}
}
return out.finishString();
}

Просмотреть файл

@ -25,7 +25,7 @@
*
* - MallocProvider. A mixin base class that handles automatically updating
* the GC's state in response to allocations that are tied to a GC lifetime
* or are for a particular GC purpose. These allocators must ony be used
* or are for a particular GC purpose. These allocators must only be used
* for memory that will be freed when a GC thing is swept.
*
* - gc::Zone: Automatically triggers zone GC.