| Index: blimp/client/core/contents/blimp_contents_manager.cc
|
| diff --git a/blimp/client/core/contents/blimp_contents_manager.cc b/blimp/client/core/contents/blimp_contents_manager.cc
|
| index e93a018e574ce3eb0f6430315bade477052fe9d1..80023c697983596ad2e7c2a81064d7a87f9b83de 100644
|
| --- a/blimp/client/core/contents/blimp_contents_manager.cc
|
| +++ b/blimp/client/core/contents/blimp_contents_manager.cc
|
| @@ -56,6 +56,9 @@ BlimpContentsManager::BlimpContentsManager(
|
| BlimpContentsManager::~BlimpContentsManager() {}
|
|
|
| std::unique_ptr<BlimpContentsImpl> BlimpContentsManager::CreateBlimpContents() {
|
| + if (tab_exists_) return nullptr;
|
| + tab_exists_ = true;
|
| +
|
| int id = CreateBlimpContentsId();
|
|
|
| std::unique_ptr<BlimpContentsImpl> new_contents =
|
| @@ -100,6 +103,9 @@ void BlimpContentsManager::EraseObserverFromMap(int id) {
|
| }
|
|
|
| void BlimpContentsManager::OnContentsDestroyed(BlimpContents* contents) {
|
| + DCHECK(tab_exists_);
|
| + tab_exists_ = false;
|
| +
|
| int id = static_cast<BlimpContentsImpl*>(contents)->id();
|
|
|
| // Notify the engine that we've destroyed the BlimpContents.
|
|
|