Commit 8e0a1604 authored by haraken@chromium.org's avatar haraken@chromium.org

Oilpan: Expose Heap::collectGarbage to the web layer

Heap::collectGarbage is needed in media_stream_impl_unittest.

BUG=340522

Review URL: https://codereview.chromium.org/543603003

git-svn-id: svn://svn.chromium.org/blink/trunk@181615 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5b01920e
......@@ -31,7 +31,7 @@
#include "config.h"
#include "public/web/WebHeap.h"
#include "platform/heap/ThreadState.h"
#include "platform/heap/Handle.h"
namespace blink {
......@@ -45,4 +45,14 @@ WebHeap::SafePointScope::~SafePointScope()
ThreadState::current()->leaveSafePoint();
}
void WebHeap::collectGarbageForTesting()
{
Heap::collectGarbage(ThreadState::HeapPointersOnStack);
}
void WebHeap::collectAllGarbageForTesting()
{
Heap::collectAllGarbage();
}
} // namespace blink
......@@ -47,6 +47,11 @@ public:
BLINK_EXPORT SafePointScope();
BLINK_EXPORT ~SafePointScope();
};
// These APIs are only for testing purposes and should not be used
// outside of tests.
BLINK_EXPORT static void collectGarbageForTesting();
BLINK_EXPORT static void collectAllGarbageForTesting();
};
} // namespace blink
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment