Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(703)

Unified Diff: third_party/WebKit/Source/platform/heap/WrapperVisitor.h

Issue 2609883003: [wrapper-tracing] Avoid firing the write barrier after TraceEpilogue (Closed)
Patch Set: Fix tests: Wrap testing code with TracePrologue and AbortTracing Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitorVerifier.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/WrapperVisitor.h
diff --git a/third_party/WebKit/Source/platform/heap/WrapperVisitor.h b/third_party/WebKit/Source/platform/heap/WrapperVisitor.h
index a4fc9770b40bf4d861284984759e290d0c61198d..bd63dc073f2429efd81af61b96bc649acacb1d39 100644
--- a/third_party/WebKit/Source/platform/heap/WrapperVisitor.h
+++ b/third_party/WebKit/Source/platform/heap/WrapperVisitor.h
@@ -105,9 +105,10 @@ class PLATFORM_EXPORT WrapperVisitor {
return;
}
- TraceTrait<T>::markWrapperNoTracing(this, traceable);
- pushToMarkingDeque(TraceTrait<T>::traceMarkedWrapper,
- TraceTrait<T>::heapObjectHeader, traceable);
+ if (pushToMarkingDeque(TraceTrait<T>::traceMarkedWrapper,
+ TraceTrait<T>::heapObjectHeader, traceable)) {
+ TraceTrait<T>::markWrapperNoTracing(this, traceable);
+ }
}
/**
@@ -163,7 +164,8 @@ class PLATFORM_EXPORT WrapperVisitor {
// don't require marking wrappers in all worlds, so just nop on those.
}
- virtual void pushToMarkingDeque(
+ // Returns true if pushing to the marking deque was successful.
+ virtual bool pushToMarkingDeque(
void (*traceWrappersCallback)(const WrapperVisitor*, const void*),
HeapObjectHeader* (*heapObjectHeaderCallback)(const void*),
const void*) const = 0;
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitorVerifier.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698