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

Side by Side Diff: Source/core/html/imports/LinkImport.cpp

Issue 1119033003: Sever HTMLImportChild client connection upon disposal. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « Source/core/html/imports/LinkImport.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 } 101 }
102 102
103 void LinkImport::didFinish() 103 void LinkImport::didFinish()
104 { 104 {
105 if (!m_owner || !m_owner->inDocument()) 105 if (!m_owner || !m_owner->inDocument())
106 return; 106 return;
107 m_owner->scheduleEvent(); 107 m_owner->scheduleEvent();
108 } 108 }
109 109
110 #if !ENABLE(OILPAN) 110 void LinkImport::importChildWasDisposed(HTMLImportChild* child)
111 void LinkImport::importChildWasDestroyed(HTMLImportChild* child)
112 { 111 {
113 ASSERT(m_child == child); 112 ASSERT(m_child == child);
114 m_child = nullptr; 113 m_child = nullptr;
115 m_owner = nullptr; 114 m_owner = nullptr;
116 } 115 }
117 #endif
118 116
119 bool LinkImport::isSync() const 117 bool LinkImport::isSync() const
120 { 118 {
121 return m_owner && !m_owner->async(); 119 return m_owner && !m_owner->async();
122 } 120 }
123 121
124 HTMLLinkElement* LinkImport::link() 122 HTMLLinkElement* LinkImport::link()
125 { 123 {
126 return m_owner; 124 return m_owner;
127 } 125 }
(...skipping 10 matching lines...) Expand all
138 } 136 }
139 137
140 DEFINE_TRACE(LinkImport) 138 DEFINE_TRACE(LinkImport)
141 { 139 {
142 visitor->trace(m_child); 140 visitor->trace(m_child);
143 HTMLImportChildClient::trace(visitor); 141 HTMLImportChildClient::trace(visitor);
144 LinkResource::trace(visitor); 142 LinkResource::trace(visitor);
145 } 143 }
146 144
147 } // namespace blink 145 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/imports/LinkImport.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698