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

Unified Diff: Source/web/WebKit.cpp

Issue 1183763003: Remove ArrayBufferDeallocationObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: move callback to WTF.cpp Created 5 years, 6 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
Index: Source/web/WebKit.cpp
diff --git a/Source/web/WebKit.cpp b/Source/web/WebKit.cpp
index f916b41bf2f12e6843812e49a8515dbfeeeb79fc..4feeb438a928452009f0d1fd5f63a1abac8c4a46 100644
--- a/Source/web/WebKit.cpp
+++ b/Source/web/WebKit.cpp
@@ -163,6 +163,11 @@ static void callOnMainThreadFunction(WTF::MainThreadFunction function, void* con
Platform::current()->mainThread()->postTask(FROM_HERE, new MainThreadTaskRunner(function, context));
}
+static void arrayBufferAllocationListener(int size)
haraken 2015/06/15 20:05:25 arrayBufferAllocationListener => adjustAmountOfExt
binji 2015/06/15 22:53:12 Done.
+{
+ v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(size);
+}
+
void initializeWithoutV8(Platform* platform)
{
ASSERT(!s_webKitInitialized);
@@ -172,7 +177,7 @@ void initializeWithoutV8(Platform* platform)
Platform::initialize(platform);
WTF::setRandomSource(cryptographicallyRandomValues);
- WTF::initialize(currentTimeFunction, monotonicallyIncreasingTimeFunction, systemTraceTimeFunction, histogramEnumerationFunction);
+ WTF::initialize(currentTimeFunction, monotonicallyIncreasingTimeFunction, systemTraceTimeFunction, histogramEnumerationFunction, arrayBufferAllocationListener);
WTF::initializeMainThread(callOnMainThreadFunction);
Heap::init();

Powered by Google App Engine
This is Rietveld 408576698