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

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp

Issue 2736773004: Replace RELEASE_ASSERT with CHECK in core/svg/ (Closed)
Patch Set: Rebase on top of latest from master Created 3 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
« no previous file with comments | « third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp ('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) 2006 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 return page->chromeClient().isSVGImageChromeClient(); 92 return page->chromeClient().isSVGImageChromeClient();
93 } 93 }
94 94
95 bool SVGImage::currentFrameHasSingleSecurityOrigin() const { 95 bool SVGImage::currentFrameHasSingleSecurityOrigin() const {
96 if (!m_page) 96 if (!m_page)
97 return true; 97 return true;
98 98
99 LocalFrame* frame = toLocalFrame(m_page->mainFrame()); 99 LocalFrame* frame = toLocalFrame(m_page->mainFrame());
100 100
101 RELEASE_ASSERT(frame->document()->loadEventFinished()); 101 CHECK(frame->document()->loadEventFinished());
102 102
103 SVGSVGElement* rootElement = 103 SVGSVGElement* rootElement =
104 frame->document()->accessSVGExtensions().rootElement(); 104 frame->document()->accessSVGExtensions().rootElement();
105 if (!rootElement) 105 if (!rootElement)
106 return true; 106 return true;
107 107
108 // Don't allow foreignObject elements or images that are not known to be 108 // Don't allow foreignObject elements or images that are not known to be
109 // single-origin since these can leak cross-origin information. 109 // single-origin since these can leak cross-origin information.
110 for (Node* node = rootElement; node; node = FlatTreeTraversal::next(*node)) { 110 for (Node* node = rootElement; node; node = FlatTreeTraversal::next(*node)) {
111 if (isSVGForeignObjectElement(*node)) 111 if (isSVGForeignObjectElement(*node))
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 } 658 }
659 659
660 return m_page ? SizeAvailable : SizeUnavailable; 660 return m_page ? SizeAvailable : SizeUnavailable;
661 } 661 }
662 662
663 String SVGImage::filenameExtension() const { 663 String SVGImage::filenameExtension() const {
664 return "svg"; 664 return "svg";
665 } 665 }
666 666
667 } // namespace blink 667 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698