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

Unified Diff: third_party/WebKit/Source/platform/heap/ThreadState.cpp

Issue 2703713003: Remove SafePointBarrier (Closed)
Patch Set: temp Created 3 years, 10 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/platform/heap/ThreadState.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/ThreadState.cpp
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
index a41c70bd4385a11c132162fa51d5db9bea8726ba..0dfd5f425bfd10307ffb79cc5400a05ef90ca7a1 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -1125,6 +1125,17 @@ NO_SANITIZE_ADDRESS static void* adjustScopeMarkerForAdressSanitizer(
}
#endif
+// TODO(haraken): The first void* pointer is unused. Remove it.
+using PushAllRegistersCallback = void (*)(void*, ThreadState*, intptr_t*);
+extern "C" void pushAllRegisters(void*, ThreadState*, PushAllRegistersCallback);
+
+static void enterSafePointAfterPushRegisters(void*,
+ ThreadState* state,
+ intptr_t* stackEnd) {
+ state->recordStackEnd(stackEnd);
+ state->copyStackUntilSafePointScope();
+}
+
void ThreadState::enterSafePoint(BlinkGC::StackState stackState,
void* scopeMarker) {
ASSERT(checkThread());
@@ -1136,12 +1147,11 @@ void ThreadState::enterSafePoint(BlinkGC::StackState stackState,
runScheduledGC(stackState);
m_stackState = stackState;
m_safePointScopeMarker = scopeMarker;
- m_heap->enterSafePoint(this);
+ pushAllRegisters(nullptr, this, enterSafePointAfterPushRegisters);
}
void ThreadState::leaveSafePoint() {
ASSERT(checkThread());
- m_heap->leaveSafePoint();
m_stackState = BlinkGC::HeapPointersOnStack;
clearSafePointScopeMarker();
}
« no previous file with comments | « third_party/WebKit/Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698