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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp

Issue 2570483002: Revert of Simple BlinkGC heap compaction. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "bindings/core/v8/ScriptWrappableVisitor.h" 5 #include "bindings/core/v8/ScriptWrappableVisitor.h"
6 6
7 #include "bindings/core/v8/ActiveScriptWrappable.h" 7 #include "bindings/core/v8/ActiveScriptWrappable.h"
8 #include "bindings/core/v8/DOMWrapperWorld.h" 8 #include "bindings/core/v8/DOMWrapperWorld.h"
9 #include "bindings/core/v8/ScopedPersistent.h" 9 #include "bindings/core/v8/ScopedPersistent.h"
10 #include "bindings/core/v8/ScriptWrappableVisitorVerifier.h" 10 #include "bindings/core/v8/ScriptWrappableVisitorVerifier.h"
11 #include "bindings/core/v8/V8AbstractEventListener.h" 11 #include "bindings/core/v8/V8AbstractEventListener.h"
12 #include "bindings/core/v8/WrapperTypeInfo.h" 12 #include "bindings/core/v8/WrapperTypeInfo.h"
13 #include "core/dom/DocumentStyleSheetCollection.h" 13 #include "core/dom/DocumentStyleSheetCollection.h"
14 #include "core/dom/ElementRareData.h" 14 #include "core/dom/ElementRareData.h"
15 #include "core/dom/NodeListsNodeData.h" 15 #include "core/dom/NodeListsNodeData.h"
16 #include "core/dom/NodeRareData.h" 16 #include "core/dom/NodeRareData.h"
17 #include "core/dom/StyleEngine.h" 17 #include "core/dom/StyleEngine.h"
18 #include "core/dom/shadow/ElementShadow.h" 18 #include "core/dom/shadow/ElementShadow.h"
19 #include "core/html/imports/HTMLImportsController.h" 19 #include "core/html/imports/HTMLImportsController.h"
20 #include "platform/heap/HeapCompact.h"
21 #include "platform/heap/HeapPage.h" 20 #include "platform/heap/HeapPage.h"
22 #include "public/platform/Platform.h" 21 #include "public/platform/Platform.h"
23 #include "public/platform/WebScheduler.h" 22 #include "public/platform/WebScheduler.h"
24 #include "wtf/AutoReset.h" 23 #include "wtf/AutoReset.h"
25 24
26 namespace blink { 25 namespace blink {
27 26
28 ScriptWrappableVisitor::~ScriptWrappableVisitor() {} 27 ScriptWrappableVisitor::~ScriptWrappableVisitor() {}
29 28
30 void ScriptWrappableVisitor::TracePrologue() { 29 void ScriptWrappableVisitor::TracePrologue() {
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 196 }
198 m_markingDeque.takeFirst().traceWrappers(this); 197 m_markingDeque.takeFirst().traceWrappers(this);
199 } 198 }
200 return true; 199 return true;
201 } 200 }
202 201
203 bool ScriptWrappableVisitor::markWrapperHeader(HeapObjectHeader* header) const { 202 bool ScriptWrappableVisitor::markWrapperHeader(HeapObjectHeader* header) const {
204 if (header->isWrapperHeaderMarked()) 203 if (header->isWrapperHeaderMarked())
205 return false; 204 return false;
206 205
207 // Verify that no compactable & movable objects are slated for
208 // lazy unmarking.
209 DCHECK(!HeapCompact::isCompactableArena(
210 pageFromObject(header)->arena()->arenaIndex()));
211 header->markWrapperHeader(); 206 header->markWrapperHeader();
212 m_headersToUnmark.push_back(header); 207 m_headersToUnmark.push_back(header);
213 return true; 208 return true;
214 } 209 }
215 210
216 void ScriptWrappableVisitor::markWrappersInAllWorlds( 211 void ScriptWrappableVisitor::markWrappersInAllWorlds(
217 const ScriptWrappable* scriptWrappable) const { 212 const ScriptWrappable* scriptWrappable) const {
218 DOMWrapperWorld::markWrappersInAllWorlds( 213 DOMWrapperWorld::markWrappersInAllWorlds(
219 const_cast<ScriptWrappable*>(scriptWrappable), this); 214 const_cast<ScriptWrappable*>(scriptWrappable), this);
220 } 215 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 V8PerIsolateData::from(isolate)->scriptWrappableVisitor(); 295 V8PerIsolateData::from(isolate)->scriptWrappableVisitor();
301 if (scriptWrappableVisitor) 296 if (scriptWrappableVisitor)
302 scriptWrappableVisitor->performCleanup(); 297 scriptWrappableVisitor->performCleanup();
303 } 298 }
304 299
305 WrapperVisitor* ScriptWrappableVisitor::currentVisitor(v8::Isolate* isolate) { 300 WrapperVisitor* ScriptWrappableVisitor::currentVisitor(v8::Isolate* isolate) {
306 return V8PerIsolateData::from(isolate)->scriptWrappableVisitor(); 301 return V8PerIsolateData::from(isolate)->scriptWrappableVisitor();
307 } 302 }
308 303
309 } // namespace blink 304 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698