| Index: third_party/WebKit/Source/web/WebLeakDetector.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebLeakDetector.cpp b/third_party/WebKit/Source/web/WebLeakDetector.cpp
|
| index e1ddecbab86bf329b6cd9c60d7956be2f3b50bd0..54c16242e9826b7459cf8f1f0f1d377faff17104 100644
|
| --- a/third_party/WebKit/Source/web/WebLeakDetector.cpp
|
| +++ b/third_party/WebKit/Source/web/WebLeakDetector.cpp
|
| @@ -65,7 +65,8 @@ public:
|
|
|
| ~WebLeakDetectorImpl() override {}
|
|
|
| - void collectGarbageAndGetDOMCounts(WebLocalFrame*) override;
|
| + void prepareForLeakDetection(WebLocalFrame*) override;
|
| + void collectGarbageAndReport() override;
|
|
|
| private:
|
| void delayedGCAndReport(Timer<WebLeakDetectorImpl>*);
|
| @@ -77,7 +78,7 @@ private:
|
| int m_numberOfGCNeeded;
|
| };
|
|
|
| -void WebLeakDetectorImpl::collectGarbageAndGetDOMCounts(WebLocalFrame* frame)
|
| +void WebLeakDetectorImpl::prepareForLeakDetection(WebLocalFrame* frame)
|
| {
|
| v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
| v8::HandleScope handleScope(isolate);
|
| @@ -100,10 +101,13 @@ void WebLeakDetectorImpl::collectGarbageAndGetDOMCounts(WebLocalFrame* frame)
|
|
|
| // FIXME: HTML5 Notification should be closed because notification affects the result of number of DOM objects.
|
|
|
| - V8GCController::collectAllGarbageForTesting(isolate);
|
| - // Note: Oilpan precise GC is scheduled at the end of the event loop.
|
| -
|
| V8PerIsolateData::from(isolate)->clearScriptRegexpContext();
|
| +}
|
| +
|
| +void WebLeakDetectorImpl::collectGarbageAndReport()
|
| +{
|
| + V8GCController::collectAllGarbageForTesting(V8PerIsolateData::mainThreadIsolate());
|
| + // Note: Oilpan precise GC is scheduled at the end of the event loop.
|
|
|
| // Task queue may contain delayed object destruction tasks.
|
| // This method is called from navigation hook inside FrameLoader,
|
|
|