зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1669847 - Make CompilationStencil instantiation const. r=arai
Depends on D92831 Differential Revision: https://phabricator.services.mozilla.com/D92832
This commit is contained in:
Родитель
505d444976
Коммит
c78aa7792a
|
@ -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) {}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче