cppgc: Various trivial fixes

- Document internal namespace
- Various trivial fixes

Bug: chromium:1056170
Change-Id: If527d491a37d7ccd0aa4ff829ccc5dc06c02da38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2246569
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68349}
This commit is contained in:
Michael Lippautz 2020-06-15 19:23:19 +02:00 committed by Commit Bot
parent c821daae6d
commit 2f8c30ef69
4 changed files with 9 additions and 4 deletions

View File

@ -20,6 +20,11 @@ namespace cppgc {
class AllocationHandle;
/**
* Implementation details of cppgc. Those details are considered internal and
* may change at any point in time without notice. Users should never rely on
* the contents of this namespace.
*/
namespace internal {
class Heap;
} // namespace internal

View File

@ -61,6 +61,9 @@ class V8_EXPORT_PRIVATE HeapBase {
HeapBase(std::shared_ptr<cppgc::Platform> platform, size_t custom_spaces);
virtual ~HeapBase();
HeapBase(const HeapBase&) = delete;
HeapBase& operator=(const HeapBase&) = delete;
RawHeap& raw_heap() { return raw_heap_; }
const RawHeap& raw_heap() const { return raw_heap_; }

View File

@ -33,9 +33,6 @@ void ExitIncrementalMarkingIfNeeded(Marker::MarkingConfig config) {
}
}
} // namespace
namespace {
template <typename Worklist, typename Callback>
bool DrainWorklistWithDeadline(v8::base::TimeTicks deadline, Worklist* worklist,
Callback callback, int task_id) {

View File

@ -76,7 +76,7 @@ void MarkingVisitor::VisitWeakRoot(const void* object, TraceDescriptor desc,
// construction, then it should be reachable from the stack.
return;
}
// Since weak roots arev only traced at the end of marking, we can execute
// Since weak roots are only traced at the end of marking, we can execute
// the callback instead of registering it.
weak_callback(LivenessBrokerFactory::Create(), weak_root);
}