| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 RefPtrWillBeRawPtr<Document> document = PassRefPtrWillBeRawPtr<Document>
(frame->document()); | 96 RefPtrWillBeRawPtr<Document> document = PassRefPtrWillBeRawPtr<Document>
(frame->document()); |
| 97 if (ResourceFetcher* fetcher = document->fetcher()) | 97 if (ResourceFetcher* fetcher = document->fetcher()) |
| 98 fetcher->garbageCollectDocumentResources(); | 98 fetcher->garbageCollectDocumentResources(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 // FIXME: HTML5 Notification should be closed because notification affects t
he result of number of DOM objects. | 101 // FIXME: HTML5 Notification should be closed because notification affects t
he result of number of DOM objects. |
| 102 | 102 |
| 103 V8GCController::collectAllGarbageForTesting(isolate); | 103 V8GCController::collectAllGarbageForTesting(isolate); |
| 104 // Note: Oilpan precise GC is scheduled at the end of the event loop. | 104 // Note: Oilpan precise GC is scheduled at the end of the event loop. |
| 105 | 105 |
| 106 V8PerIsolateData::from(isolate)->clearScriptRegexpContext(); |
| 107 |
| 106 // Task queue may contain delayed object destruction tasks. | 108 // Task queue may contain delayed object destruction tasks. |
| 107 // This method is called from navigation hook inside FrameLoader, | 109 // This method is called from navigation hook inside FrameLoader, |
| 108 // so previous document is still held by the loader until the next event loo
p. | 110 // so previous document is still held by the loader until the next event loo
p. |
| 109 // Complete all pending tasks before proceeding to gc. | 111 // Complete all pending tasks before proceeding to gc. |
| 110 m_numberOfGCNeeded = 2; | 112 m_numberOfGCNeeded = 2; |
| 111 m_delayedGCAndReportTimer.startOneShot(0, FROM_HERE); | 113 m_delayedGCAndReportTimer.startOneShot(0, FROM_HERE); |
| 112 } | 114 } |
| 113 | 115 |
| 114 void WebLeakDetectorImpl::delayedGCAndReport(Timer<WebLeakDetectorImpl>*) | 116 void WebLeakDetectorImpl::delayedGCAndReport(Timer<WebLeakDetectorImpl>*) |
| 115 { | 117 { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } | 152 } |
| 151 | 153 |
| 152 } // namespace | 154 } // namespace |
| 153 | 155 |
| 154 WebLeakDetector* WebLeakDetector::create(WebLeakDetectorClient* client) | 156 WebLeakDetector* WebLeakDetector::create(WebLeakDetectorClient* client) |
| 155 { | 157 { |
| 156 return new WebLeakDetectorImpl(client); | 158 return new WebLeakDetectorImpl(client); |
| 157 } | 159 } |
| 158 | 160 |
| 159 } // namespace blink | 161 } // namespace blink |
| OLD | NEW |