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

Side by Side Diff: third_party/WebKit/Source/core/xml/XSLImportRule.cpp

Issue 1667843003: Make Resource RefCountedWillBeGarbageCollectedFinalized, attempt #2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + address review comments Created 4 years, 10 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 * This file is part of the XSL implementation. 2 * This file is part of the XSL implementation.
3 * 3 *
4 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // Check for a cycle in our import chain. If we encounter a stylesheet in 93 // Check for a cycle in our import chain. If we encounter a stylesheet in
94 // our parent chain with the same URL, then just bail. 94 // our parent chain with the same URL, then just bail.
95 for (XSLStyleSheet* parentSheet = parentStyleSheet(); parentSheet; parentShe et = parentSheet->parentStyleSheet()) { 95 for (XSLStyleSheet* parentSheet = parentStyleSheet(); parentSheet; parentShe et = parentSheet->parentStyleSheet()) {
96 if (absHref == parentSheet->baseURL().string()) 96 if (absHref == parentSheet->baseURL().string())
97 return; 97 return;
98 } 98 }
99 99
100 ResourceLoaderOptions fetchOptions(ResourceFetcher::defaultResourceOptions() ); 100 ResourceLoaderOptions fetchOptions(ResourceFetcher::defaultResourceOptions() );
101 FetchRequest request(ResourceRequest(ownerDocument->completeURL(absHref)), F etchInitiatorTypeNames::xml, fetchOptions); 101 FetchRequest request(ResourceRequest(ownerDocument->completeURL(absHref)), F etchInitiatorTypeNames::xml, fetchOptions);
102 request.setOriginRestriction(FetchRequest::RestrictToSameOrigin); 102 request.setOriginRestriction(FetchRequest::RestrictToSameOrigin);
103 ResourcePtr<XSLStyleSheetResource> resource = XSLStyleSheetResource::fetchSy nchronously(request, ownerDocument->fetcher()); 103 RefPtrWillBeRawPtr<XSLStyleSheetResource> resource = XSLStyleSheetResource:: fetchSynchronously(request, ownerDocument->fetcher());
104 if (!resource || !resource->sheet()) 104 if (!resource || !resource->sheet())
105 return; 105 return;
106 106
107 ASSERT(!m_styleSheet); 107 ASSERT(!m_styleSheet);
108 setXSLStyleSheet(absHref, resource->response().url(), resource->sheet()); 108 setXSLStyleSheet(absHref, resource->response().url(), resource->sheet());
109 } 109 }
110 110
111 DEFINE_TRACE(XSLImportRule) 111 DEFINE_TRACE(XSLImportRule)
112 { 112 {
113 visitor->trace(m_parentStyleSheet); 113 visitor->trace(m_parentStyleSheet);
114 visitor->trace(m_styleSheet); 114 visitor->trace(m_styleSheet);
115 } 115 }
116 116
117 } // namespace blink 117 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/xml/XSLImportRule.h ('k') | third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698