| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include <v8.h> | 46 #include <v8.h> |
| 47 | 47 |
| 48 namespace blink { | 48 namespace blink { |
| 49 | 49 |
| 50 namespace { | 50 namespace { |
| 51 | 51 |
| 52 // FIXME: Oilpan: It may take multiple GC to collect on-heap objects referenced
from off-heap objects. | 52 // FIXME: Oilpan: It may take multiple GC to collect on-heap objects referenced
from off-heap objects. |
| 53 // Please see comment in Heap::collectAllGarbage() | 53 // Please see comment in Heap::collectAllGarbage() |
| 54 static const int kNumberOfGCsToClaimChains = 5; | 54 static const int kNumberOfGCsToClaimChains = 5; |
| 55 | 55 |
| 56 class WebLeakDetectorImpl FINAL : public WebLeakDetector { | 56 class WebLeakDetectorImpl final : public WebLeakDetector { |
| 57 WTF_MAKE_NONCOPYABLE(WebLeakDetectorImpl); | 57 WTF_MAKE_NONCOPYABLE(WebLeakDetectorImpl); |
| 58 public: | 58 public: |
| 59 explicit WebLeakDetectorImpl(WebLeakDetectorClient* client) | 59 explicit WebLeakDetectorImpl(WebLeakDetectorClient* client) |
| 60 : m_client(client) | 60 : m_client(client) |
| 61 , m_delayedGCAndReportTimer(this, &WebLeakDetectorImpl::delayedGCAndRepo
rt) | 61 , m_delayedGCAndReportTimer(this, &WebLeakDetectorImpl::delayedGCAndRepo
rt) |
| 62 , m_delayedReportTimer(this, &WebLeakDetectorImpl::delayedReport) | 62 , m_delayedReportTimer(this, &WebLeakDetectorImpl::delayedReport) |
| 63 , m_numberOfGCNeeded(0) | 63 , m_numberOfGCNeeded(0) |
| 64 { | 64 { |
| 65 ASSERT(m_client); | 65 ASSERT(m_client); |
| 66 } | 66 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace | 140 } // namespace |
| 141 | 141 |
| 142 WebLeakDetector* WebLeakDetector::create(WebLeakDetectorClient* client) | 142 WebLeakDetector* WebLeakDetector::create(WebLeakDetectorClient* client) |
| 143 { | 143 { |
| 144 return new WebLeakDetectorImpl(client); | 144 return new WebLeakDetectorImpl(client); |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace blink | 147 } // namespace blink |
| OLD | NEW |