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

Side by Side Diff: Source/core/loader/ImageLoader.cpp

Issue 1174463003: Oilpan: Disable lazy seeping for ImageLoaders (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/ImageLoader.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights reserv ed.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 else 99 else
100 m_scriptState = ScriptState::from(context); 100 m_scriptState = ScriptState::from(context);
101 } 101 }
102 102
103 ~Task() override 103 ~Task() override
104 { 104 {
105 } 105 }
106 106
107 void run() override 107 void run() override
108 { 108 {
109 if (m_loader) { 109 if (!m_loader)
110 #if ENABLE(OILPAN) 110 return;
111 // Oilpan: this WebThread::Task microtask may run after the 111 if (m_scriptState->contextIsValid()) {
112 // loader has been GCed, but not yet lazily swept & finalized 112 ScriptState::Scope scope(m_scriptState.get());
113 // (when this task's loader reference will be cleared.) 113 m_loader->doUpdateFromElement(m_shouldBypassMainWorldCSP, m_updateBe havior);
114 // 114 } else {
115 // Handle this transient condition by explicitly checking here 115 m_loader->doUpdateFromElement(m_shouldBypassMainWorldCSP, m_updateBe havior);
116 // before going ahead with the update operation. Unsafe to do it
117 // if so, as the objects that the loader refers to may have been
118 // finalized by this time.
119 if (Heap::willObjectBeLazilySwept(m_loader))
120 return;
121 #endif
122 if (m_scriptState->contextIsValid()) {
123 ScriptState::Scope scope(m_scriptState.get());
124 m_loader->doUpdateFromElement(m_shouldBypassMainWorldCSP, m_upda teBehavior);
125 } else {
126 m_loader->doUpdateFromElement(m_shouldBypassMainWorldCSP, m_upda teBehavior);
127 }
128 } 116 }
129 } 117 }
130 118
131 void clearLoader() 119 void clearLoader()
132 { 120 {
133 m_loader = 0; 121 m_loader = 0;
134 m_scriptState.clear(); 122 m_scriptState.clear();
135 } 123 }
136 124
137 WeakPtr<Task> createWeakPtr() 125 WeakPtr<Task> createWeakPtr()
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 #endif 651 #endif
664 } 652 }
665 653
666 #if ENABLE(OILPAN) 654 #if ENABLE(OILPAN)
667 ImageLoader::ImageLoaderClientRemover::~ImageLoaderClientRemover() 655 ImageLoader::ImageLoaderClientRemover::~ImageLoaderClientRemover()
668 { 656 {
669 m_loader.willRemoveClient(m_client); 657 m_loader.willRemoveClient(m_client);
670 } 658 }
671 #endif 659 #endif
672 } 660 }
OLDNEW
« no previous file with comments | « Source/core/loader/ImageLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698