Bug 1669847 - Make CompilationStencil instantiation const. r=arai

Depends on D92831

Differential Revision: https://phabricator.services.mozilla.com/D92832
This commit is contained in:
Ted Campbell 2020-10-08 16:16:05 +00:00
Родитель 505d444976
Коммит c78aa7792a
1 изменённых файлов: 6 добавлений и 6 удалений

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

@ -292,17 +292,17 @@ class ScriptStencilIterable {
class Iterator {
size_t index_ = 0;
CompilationStencil& stencil_;
const CompilationStencil& stencil_;
CompilationGCOutput& gcOutput_;
Iterator(CompilationStencil& stencil, CompilationGCOutput& gcOutput,
Iterator(const CompilationStencil& stencil, CompilationGCOutput& gcOutput,
size_t index)
: index_(index), stencil_(stencil), gcOutput_(gcOutput) {
skipNonFunctions();
}
public:
explicit Iterator(CompilationStencil& stencil,
explicit Iterator(const CompilationStencil& stencil,
CompilationGCOutput& gcOutput)
: stencil_(stencil), gcOutput_(gcOutput) {
skipNonFunctions();
@ -342,16 +342,16 @@ class ScriptStencilIterable {
functionIndex);
}
static Iterator end(CompilationStencil& stencil,
static Iterator end(const CompilationStencil& stencil,
CompilationGCOutput& gcOutput) {
return Iterator(stencil, gcOutput, stencil.scriptData.length());
}
};
CompilationStencil& stencil_;
const CompilationStencil& stencil_;
CompilationGCOutput& gcOutput_;
explicit ScriptStencilIterable(CompilationStencil& stencil,
explicit ScriptStencilIterable(const CompilationStencil& stencil,
CompilationGCOutput& gcOutput)
: stencil_(stencil), gcOutput_(gcOutput) {}