Chromium Code Reviews| Index: Source/core/loader/ImageLoader.cpp |
| diff --git a/Source/core/loader/ImageLoader.cpp b/Source/core/loader/ImageLoader.cpp |
| index a49ab8df6509ab49e7abba6dcdcdef979cb9a8fb..6eeb61f9c3371368491730b2c9ed363ff10859fc 100644 |
| --- a/Source/core/loader/ImageLoader.cpp |
| +++ b/Source/core/loader/ImageLoader.cpp |
| @@ -80,14 +80,18 @@ public: |
| Task(ImageLoader* loader, UpdateFromElementBehavior updateBehavior) |
| : m_loader(loader) |
| , m_shouldBypassMainWorldCSP(shouldBypassMainWorldCSP(loader)) |
| - , m_weakFactory(this) |
| , m_updateBehavior(updateBehavior) |
|
kouhei (in TOK)
2015/02/13 00:25:58
unintended change?
sof
2015/02/13 06:40:48
It helps to be have the weak factory last, and kee
kouhei (in TOK)
2015/02/13 09:00:34
sgtm. It might be helpful to mention about this ch
|
| + , m_weakFactory(this) |
| { |
| } |
| virtual void run() override |
| { |
| if (m_loader) { |
| +#if ENABLE(OILPAN) |
| + if (Heap::willObjectBeLazilySwept(m_loader)) |
| + return; |
|
kouhei (in TOK)
2015/02/13 00:25:58
Is this needed for all places where non-Oilpan obj
haraken
2015/02/13 01:41:59
In most cases, no.
This hack is needed only when
sof
2015/02/13 06:40:48
I will go through the Microtasks and check if they
|
| +#endif |
| m_loader->doUpdateFromElement(m_shouldBypassMainWorldCSP, m_updateBehavior); |
| } |
| } |
| @@ -105,8 +109,8 @@ public: |
| private: |
| ImageLoader* m_loader; |
| BypassMainWorldBehavior m_shouldBypassMainWorldCSP; |
| - WeakPtrFactory<Task> m_weakFactory; |
| UpdateFromElementBehavior m_updateBehavior; |
|
kouhei (in TOK)
2015/02/13 00:25:58
Ditto.
|
| + WeakPtrFactory<Task> m_weakFactory; |
| }; |
| ImageLoader::ImageLoader(Element* element) |