Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/gfx/layers/ipc/LayerTransactionChild.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
3
/* This Source Code Form is subject to the terms of the Mozilla Public
4
 * License, v. 2.0. If a copy of the MPL was not distributed with this
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#include "LayerTransactionChild.h"
8
#include "mozilla/gfx/Logging.h"
9
#include "mozilla/layers/ShadowLayers.h"  // for ShadowLayerForwarder
10
#include "mozilla/mozalloc.h"           // for operator delete, etc
11
#include "nsTArray.h"                   // for nsTArray
12
#include "mozilla/layers/TextureClient.h"
13
14
namespace mozilla {
15
namespace layers {
16
17
void
18
LayerTransactionChild::Destroy()
19
0
{
20
0
  if (!IPCOpen()) {
21
0
    return;
22
0
  }
23
0
  // mDestroyed is used to prevent calling Send__delete__() twice.
24
0
  // When this function is called from CompositorBridgeChild::Destroy(),
25
0
  // under Send__delete__() call, this function is called from
26
0
  // ShadowLayerForwarder's destructor.
27
0
  // When it happens, IPCOpen() is still true.
28
0
  // See bug 1004191.
29
0
  mDestroyed = true;
30
0
31
0
  SendShutdown();
32
0
}
33
34
void
35
LayerTransactionChild::ActorDestroy(ActorDestroyReason why)
36
0
{
37
0
  mDestroyed = true;
38
0
}
39
40
} // namespace layers
41
} // namespace mozilla