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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLSourceElement.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) 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 24 matching lines...) Expand all
35 #include "core/html/HTMLMediaElement.h" 35 #include "core/html/HTMLMediaElement.h"
36 #include "core/html/HTMLPictureElement.h" 36 #include "core/html/HTMLPictureElement.h"
37 #include "platform/Logging.h" 37 #include "platform/Logging.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 using namespace HTMLNames; 41 using namespace HTMLNames;
42 42
43 static SourceEventSender& sourceErrorEventSender() 43 static SourceEventSender& sourceErrorEventSender()
44 { 44 {
45 DEFINE_STATIC_LOCAL(Persistent<SourceEventSender>, sharedErrorEventSender, ( SourceEventSender::create(EventTypeNames::error))); 45 DEFINE_STATIC_LOCAL(SourceEventSender, sharedErrorEventSender, (SourceEventS ender::create(EventTypeNames::error)));
46 return *sharedErrorEventSender; 46 return sharedErrorEventSender;
47 } 47 }
48 48
49 class HTMLSourceElement::Listener final : public MediaQueryListListener { 49 class HTMLSourceElement::Listener final : public MediaQueryListListener {
50 public: 50 public:
51 explicit Listener(HTMLSourceElement* element) : m_element(element) { } 51 explicit Listener(HTMLSourceElement* element) : m_element(element) { }
52 void notifyMediaQueryChanged() override 52 void notifyMediaQueryChanged() override
53 { 53 {
54 if (m_element) 54 if (m_element)
55 m_element->notifyMediaQueryChanged(); 55 m_element->notifyMediaQueryChanged();
56 } 56 }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 DEFINE_TRACE(HTMLSourceElement) 192 DEFINE_TRACE(HTMLSourceElement)
193 { 193 {
194 visitor->trace(m_mediaQueryList); 194 visitor->trace(m_mediaQueryList);
195 visitor->trace(m_listener); 195 visitor->trace(m_listener);
196 HTMLElement::trace(visitor); 196 HTMLElement::trace(visitor);
197 } 197 }
198 198
199 } // namespace blink 199 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLStyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698