| Index: tools/gn/scope.cc
|
| diff --git a/tools/gn/scope.cc b/tools/gn/scope.cc
|
| index 931574935e22d36001aebc68931c64b08bc41947..437b31fafde23b0e6aeb07fb9b64a7657e4c7198 100644
|
| --- a/tools/gn/scope.cc
|
| +++ b/tools/gn/scope.cc
|
| @@ -22,21 +22,24 @@ Scope::Scope(const Settings* settings)
|
| : const_containing_(NULL),
|
| mutable_containing_(NULL),
|
| settings_(settings),
|
| - mode_flags_(0) {
|
| + mode_flags_(0),
|
| + item_collector_(NULL) {
|
| }
|
|
|
| Scope::Scope(Scope* parent)
|
| : const_containing_(NULL),
|
| mutable_containing_(parent),
|
| settings_(parent->settings()),
|
| - mode_flags_(0) {
|
| + mode_flags_(0),
|
| + item_collector_(NULL) {
|
| }
|
|
|
| Scope::Scope(const Scope* parent)
|
| : const_containing_(parent),
|
| mutable_containing_(NULL),
|
| settings_(parent->settings()),
|
| - mode_flags_(0) {
|
| + mode_flags_(0),
|
| + item_collector_(NULL) {
|
| }
|
|
|
| Scope::~Scope() {
|
| @@ -390,6 +393,14 @@ const SourceDir& Scope::GetSourceDir() const {
|
| return source_dir_;
|
| }
|
|
|
| +Scope::ItemVector* Scope::GetItemCollector() {
|
| + if (item_collector_)
|
| + return item_collector_;
|
| + if (mutable_containing())
|
| + return mutable_containing()->GetItemCollector();
|
| + return NULL;
|
| +}
|
| +
|
| void Scope::SetProperty(const void* key, void* value) {
|
| if (!value) {
|
| DCHECK(properties_.find(key) != properties_.end());
|
|
|