WebCore/ChangeLog

 12010-09-08 Anton Muhin <antonm@chromium.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [v8] bypass caches when query memory usage from post GC and in crash handler.
 6 https://bugs.webkit.org/show_bug.cgi?id=45036
 7
 8 Second part of the whole change: now use API introduced in
 9 http://trac.webkit.org/changeset/66818 and now backed by Chromium.
 10
 11 * bindings/v8/V8DOMWindowShell.cpp:
 12 (WebCore::reportFatalErrorInV8):
 13 * bindings/v8/V8GCController.cpp:
 14 (WebCore::V8GCController::gcEpilogue):
 15
1162010-09-08 Philippe Normand <pnormand@igalia.com>
217
318 Reviewed by Eric Carlson.

WebCore/bindings/v8/V8DOMWindowShell.cpp

@@static void reportFatalErrorInV8(const char* location, const char* message)
8585 // FIXME: clean up V8Proxy and disable JavaScript.
8686 int memoryUsageMB = -1;
8787#if PLATFORM(CHROMIUM)
88  memoryUsageMB = ChromiumBridge::memoryUsageMB();
 88 memoryUsageMB = ChromiumBridge::actualMemoryUsageMB();
8989#endif
9090 printf("V8 error: %s (%s). Current memory usage: %d MB\n", message, location, memoryUsageMB);
9191 handleFatalErrorInV8();

WebCore/bindings/v8/V8GCController.cpp

@@int getMemoryUsageInMB()
406406#endif
407407}
408408
 409int getActualMemoryUsageInMB()
 410{
 411#if PLATFORM(CHROMIUM)
 412 return ChromiumBridge::actualMemoryUsageMB();
 413#else
 414 return 0;
 415#endif
 416}
 417
409418} // anonymous namespace
410419
411420void V8GCController::gcEpilogue()

@@void V8GCController::gcEpilogue()
417426 GCEpilogueVisitor epilogueVisitor;
418427 visitActiveDOMObjectsInCurrentThread(&epilogueVisitor);
419428
420  workingSetEstimateMB = getMemoryUsageInMB();
 429 workingSetEstimateMB = getActualMemoryUsageInMB();
421430
422431#ifndef NDEBUG
423432 // Check all survivals are weak.