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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleFetchedImage.cpp

Issue 2570463005: Retire ThreadState::registerPreFinalizer<T>() (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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 22 matching lines...) Expand all
33 33
34 StyleFetchedImage::StyleFetchedImage(ImageResourceContent* image, 34 StyleFetchedImage::StyleFetchedImage(ImageResourceContent* image,
35 const Document& document, 35 const Document& document,
36 const KURL& url) 36 const KURL& url)
37 : m_image(image), m_document(&document), m_url(url) { 37 : m_image(image), m_document(&document), m_url(url) {
38 m_isImageResource = true; 38 m_isImageResource = true;
39 m_image->addObserver(this); 39 m_image->addObserver(this);
40 // ResourceFetcher is not determined from StyleFetchedImage and it is 40 // ResourceFetcher is not determined from StyleFetchedImage and it is
41 // impossible to send a request for refetching. 41 // impossible to send a request for refetching.
42 m_image->setNotRefetchableDataFromDiskCache(); 42 m_image->setNotRefetchableDataFromDiskCache();
43 ThreadState::current()->registerPreFinalizer(this);
44 } 43 }
45 44
46 StyleFetchedImage::~StyleFetchedImage() {} 45 StyleFetchedImage::~StyleFetchedImage() {}
47 46
48 void StyleFetchedImage::dispose() { 47 void StyleFetchedImage::dispose() {
49 m_image->removeObserver(this); 48 m_image->removeObserver(this);
50 m_image = nullptr; 49 m_image = nullptr;
51 } 50 }
52 51
53 WrappedImagePtr StyleFetchedImage::data() const { 52 WrappedImagePtr StyleFetchedImage::data() const {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 Image::PreCacheMetadata); 136 Image::PreCacheMetadata);
138 } 137 }
139 138
140 DEFINE_TRACE(StyleFetchedImage) { 139 DEFINE_TRACE(StyleFetchedImage) {
141 visitor->trace(m_image); 140 visitor->trace(m_image);
142 visitor->trace(m_document); 141 visitor->trace(m_document);
143 StyleImage::trace(visitor); 142 StyleImage::trace(visitor);
144 } 143 }
145 144
146 } // namespace blink 145 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698