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

Unified Diff: sky/engine/platform/heap/Handle.cpp

Issue 683593002: Remove GarbageCollected support from the bindings (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « sky/engine/platform/heap/Handle.h ('k') | sky/engine/platform/heap/ThreadState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/platform/heap/Handle.cpp
diff --git a/sky/engine/platform/heap/Handle.cpp b/sky/engine/platform/heap/Handle.cpp
index e2da7b2893b9f5e6ffc96909ff78fbf0d9d4612e..6577aeb597396d07870237e11ba38d821ba90ec9 100644
--- a/sky/engine/platform/heap/Handle.cpp
+++ b/sky/engine/platform/heap/Handle.cpp
@@ -7,68 +7,4 @@
namespace blink {
-bool WrapperPersistentRegion::removeIfNotLast(WrapperPersistentRegion** headPtr)
-{
- ASSERT(!m_count);
- // We are the last region in the list if both the region's m_prev and
- // m_next are 0.
- if (!m_prev && !m_next)
- return false;
- if (m_prev) {
- m_prev->m_next = m_next;
- } else {
- ASSERT(*headPtr == this);
- *headPtr = m_next;
- }
- if (m_next)
- m_next->m_prev = m_prev;
- m_prev = 0;
- m_next = 0;
- return true;
-}
-
-void WrapperPersistentRegion::insertHead(WrapperPersistentRegion** headPtr, WrapperPersistentRegion* newHead)
-{
- ASSERT(headPtr);
- WrapperPersistentRegion* oldHead = *headPtr;
- if (oldHead) {
- ASSERT(!oldHead->m_prev);
- oldHead->m_prev = newHead;
- }
- newHead->m_prev = 0;
- newHead->m_next = oldHead;
- *headPtr = newHead;
-}
-
-WrapperPersistentRegion* WrapperPersistentRegion::removeHead(WrapperPersistentRegion** headPtr)
-{
- // We only call this if there is at least one element in the list.
- ASSERT(headPtr && *headPtr);
- WrapperPersistentRegion* oldHead = *headPtr;
- ASSERT(!oldHead->m_prev);
- *headPtr = oldHead->m_next;
- oldHead->m_next = 0;
- ASSERT(!(*headPtr) || (*headPtr)->m_prev == oldHead);
- if (*headPtr)
- (*headPtr)->m_prev = 0;
- return oldHead;
-}
-
-void* WrapperPersistentRegion::outOfLineAllocate(ThreadState* state, WrapperPersistentRegion* head)
-{
- void* persistent = 0;
- // The caller has already tried allocating in the passed-in region, start
- // from the next.
- for (WrapperPersistentRegion* current = head->m_next; current; current = current->m_next) {
- persistent = current->allocate();
- if (persistent)
- return persistent;
- }
- ASSERT(!persistent);
- WrapperPersistentRegion* newRegion = state->takeWrapperPersistentRegion();
- persistent = newRegion->allocate();
- ASSERT(persistent);
- return persistent;
-}
-
}
« no previous file with comments | « sky/engine/platform/heap/Handle.h ('k') | sky/engine/platform/heap/ThreadState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698