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

Side by Side Diff: Source/core/html/imports/HTMLImportLoader.h

Issue 1032293002: Oilpan: dispose an HTMLImportsController on document detach/removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No need to call dispose() when destructing HTMLImportsController Created 5 years, 9 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) 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 StateLoaded, 64 StateLoaded,
65 StateError 65 StateError
66 }; 66 };
67 67
68 static PassOwnPtrWillBeRawPtr<HTMLImportLoader> create(HTMLImportsController * controller) 68 static PassOwnPtrWillBeRawPtr<HTMLImportLoader> create(HTMLImportsController * controller)
69 { 69 {
70 return adoptPtrWillBeNoop(new HTMLImportLoader(controller)); 70 return adoptPtrWillBeNoop(new HTMLImportLoader(controller));
71 } 71 }
72 72
73 virtual ~HTMLImportLoader(); 73 virtual ~HTMLImportLoader();
74 void dispose();
74 75
75 Document* document() const { return m_document.get(); } 76 Document* document() const { return m_document.get(); }
76 void addImport(HTMLImportChild*); 77 void addImport(HTMLImportChild*);
77 #if !ENABLE(OILPAN)
78 void removeImport(HTMLImportChild*); 78 void removeImport(HTMLImportChild*);
79 #endif 79
80 void moveToFirst(HTMLImportChild*); 80 void moveToFirst(HTMLImportChild*);
81 HTMLImportChild* firstImport() const { return m_imports[0]; } 81 HTMLImportChild* firstImport() const { return m_imports[0]; }
82 bool isFirstImport(const HTMLImportChild* child) const { return m_imports.si ze() ? firstImport() == child : false; } 82 bool isFirstImport(const HTMLImportChild* child) const { return m_imports.si ze() ? firstImport() == child : false; }
83 83
84 bool isDone() const { return m_state == StateLoaded || m_state == StateError ; } 84 bool isDone() const { return m_state == StateLoaded || m_state == StateError ; }
85 bool hasError() const { return m_state == StateError; } 85 bool hasError() const { return m_state == StateError; }
86 bool shouldBlockScriptExecution() const; 86 bool shouldBlockScriptExecution() const;
87 87
88 #if !ENABLE(OILPAN)
89 void importDestroyed();
90 #endif
91 void startLoading(const ResourcePtr<RawResource>&); 88 void startLoading(const ResourcePtr<RawResource>&);
92 89
93 // Tells the loader that all of the import's stylesheets finished 90 // Tells the loader that all of the import's stylesheets finished
94 // loading. 91 // loading.
95 // Called by Document::didRemoveAllPendingStylesheet. 92 // Called by Document::didRemoveAllPendingStylesheet.
96 void didRemoveAllPendingStylesheet(); 93 void didRemoveAllPendingStylesheet();
97 94
98 PassRefPtrWillBeRawPtr<CustomElementSyncMicrotaskQueue> microtaskQueue() con st; 95 PassRefPtrWillBeRawPtr<CustomElementSyncMicrotaskQueue> microtaskQueue() con st;
99 96
100 DECLARE_VIRTUAL_TRACE(); 97 DECLARE_VIRTUAL_TRACE();
(...skipping 27 matching lines...) Expand all
128 WillBeHeapVector<RawPtrWillBeMember<HTMLImportChild>> m_imports; 125 WillBeHeapVector<RawPtrWillBeMember<HTMLImportChild>> m_imports;
129 State m_state; 126 State m_state;
130 RefPtrWillBeMember<Document> m_document; 127 RefPtrWillBeMember<Document> m_document;
131 RefPtrWillBeMember<DocumentWriter> m_writer; 128 RefPtrWillBeMember<DocumentWriter> m_writer;
132 RefPtrWillBeMember<CustomElementSyncMicrotaskQueue> m_microtaskQueue; 129 RefPtrWillBeMember<CustomElementSyncMicrotaskQueue> m_microtaskQueue;
133 }; 130 };
134 131
135 } // namespace blink 132 } // namespace blink
136 133
137 #endif // HTMLImportLoader_h 134 #endif // HTMLImportLoader_h
OLDNEW
« no previous file with comments | « Source/core/html/imports/HTMLImportChild.cpp ('k') | Source/core/html/imports/HTMLImportLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698