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

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

Issue 1850413002: Improve DEFINE_STATIC_LOCAL()'s handling of Blink GCed objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address compilation failure Created 4 years, 8 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
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "core/svg/graphics/SVGImage.h" 47 #include "core/svg/graphics/SVGImage.h"
48 #include "platform/Logging.h" 48 #include "platform/Logging.h"
49 #include "platform/weborigin/SecurityOrigin.h" 49 #include "platform/weborigin/SecurityOrigin.h"
50 #include "platform/weborigin/SecurityPolicy.h" 50 #include "platform/weborigin/SecurityPolicy.h"
51 #include "public/platform/WebURLRequest.h" 51 #include "public/platform/WebURLRequest.h"
52 52
53 namespace blink { 53 namespace blink {
54 54
55 static ImageEventSender& loadEventSender() 55 static ImageEventSender& loadEventSender()
56 { 56 {
57 DEFINE_STATIC_LOCAL(Persistent<ImageEventSender>, sender, (ImageEventSender: :create(EventTypeNames::load))); 57 DEFINE_STATIC_LOCAL(ImageEventSender, sender, (ImageEventSender::create(Even tTypeNames::load)));
58 return *sender; 58 return sender;
59 } 59 }
60 60
61 static ImageEventSender& errorEventSender() 61 static ImageEventSender& errorEventSender()
62 { 62 {
63 DEFINE_STATIC_LOCAL(Persistent<ImageEventSender>, sender, (ImageEventSender: :create(EventTypeNames::error))); 63 DEFINE_STATIC_LOCAL(ImageEventSender, sender, (ImageEventSender::create(Even tTypeNames::error)));
64 return *sender; 64 return sender;
65 } 65 }
66 66
67 static inline bool pageIsBeingDismissed(Document* document) 67 static inline bool pageIsBeingDismissed(Document* document)
68 { 68 {
69 return document->pageDismissalEventBeingDispatched() != Document::NoDismissa l; 69 return document->pageDismissalEventBeingDispatched() != Document::NoDismissa l;
70 } 70 }
71 71
72 static ImageLoader::BypassMainWorldBehavior shouldBypassMainWorldCSP(ImageLoader * loader) 72 static ImageLoader::BypassMainWorldBehavior shouldBypassMainWorldCSP(ImageLoader * loader)
73 { 73 {
74 ASSERT(loader); 74 ASSERT(loader);
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 636
637 void ImageLoader::elementDidMoveToNewDocument() 637 void ImageLoader::elementDidMoveToNewDocument()
638 { 638 {
639 if (m_loadDelayCounter) 639 if (m_loadDelayCounter)
640 m_loadDelayCounter->documentChanged(m_element->document()); 640 m_loadDelayCounter->documentChanged(m_element->document());
641 clearFailedLoadURL(); 641 clearFailedLoadURL();
642 setImage(0); 642 setImage(0);
643 } 643 }
644 644
645 } // namespace blink 645 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/EmptyClients.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698