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

Side by Side Diff: third_party/WebKit/Source/core/dom/SecurityContext.cpp

Issue 1854423002: ASSERT -> {DCHECK|DCHECK_XX}, ENABLE(ASSERT) -> DCHECK_IS_ON() in dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark svg/as-image/svg-nested.html crash on win 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) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 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 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 // Enforces the given suborigin as part of the security origin for this 93 // Enforces the given suborigin as part of the security origin for this
94 // security context. |name| must not be empty, although it may be null. A null 94 // security context. |name| must not be empty, although it may be null. A null
95 // name represents a lack of a suborigin. 95 // name represents a lack of a suborigin.
96 // See: https://w3c.github.io/webappsec-suborigins/index.html 96 // See: https://w3c.github.io/webappsec-suborigins/index.html
97 void SecurityContext::enforceSuborigin(const Suborigin& suborigin) 97 void SecurityContext::enforceSuborigin(const Suborigin& suborigin)
98 { 98 {
99 if (!RuntimeEnabledFeatures::suboriginsEnabled()) 99 if (!RuntimeEnabledFeatures::suboriginsEnabled())
100 return; 100 return;
101 101
102 ASSERT(!suborigin.name().isEmpty()); 102 DCHECK(!suborigin.name().isEmpty());
103 ASSERT(RuntimeEnabledFeatures::suboriginsEnabled()); 103 DCHECK(RuntimeEnabledFeatures::suboriginsEnabled());
104 ASSERT(m_securityOrigin.get()); 104 DCHECK(m_securityOrigin.get());
105 ASSERT(!m_securityOrigin->hasSuborigin() || m_securityOrigin->suborigin()->n ame() == suborigin.name()); 105 DCHECK(!m_securityOrigin->hasSuborigin() || m_securityOrigin->suborigin()->n ame() == suborigin.name());
106 m_securityOrigin->addSuborigin(suborigin); 106 m_securityOrigin->addSuborigin(suborigin);
107 didUpdateSecurityOrigin(); 107 didUpdateSecurityOrigin();
108 } 108 }
109 109
110 } // namespace blink 110 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698