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

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

Issue 2574773002: Migrate WTF::Vector::append() to ::push_back() [part 4 of N] (Closed)
Patch Set: rebase Created 4 years 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2012 Google Inc. All Rights Reserved. 3 * Copyright (C) 2012 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 AccessControlStatus corsStatus) { 97 AccessControlStatus corsStatus) {
98 if (corsStatus == OpaqueResource) 98 if (corsStatus == OpaqueResource)
99 return true; 99 return true;
100 return !(getSecurityOrigin()->canRequestNoSuborigin(completeURL(sourceURL)) || 100 return !(getSecurityOrigin()->canRequestNoSuborigin(completeURL(sourceURL)) ||
101 corsStatus == SharableCrossOrigin); 101 corsStatus == SharableCrossOrigin);
102 } 102 }
103 103
104 void ExecutionContext::dispatchErrorEvent(ErrorEvent* errorEvent, 104 void ExecutionContext::dispatchErrorEvent(ErrorEvent* errorEvent,
105 AccessControlStatus corsStatus) { 105 AccessControlStatus corsStatus) {
106 if (m_inDispatchErrorEvent) { 106 if (m_inDispatchErrorEvent) {
107 m_pendingExceptions.append(errorEvent); 107 m_pendingExceptions.push_back(errorEvent);
108 return; 108 return;
109 } 109 }
110 110
111 // First report the original exception and only then all the nested ones. 111 // First report the original exception and only then all the nested ones.
112 if (!dispatchErrorEventInternal(errorEvent, corsStatus)) 112 if (!dispatchErrorEventInternal(errorEvent, corsStatus))
113 exceptionThrown(errorEvent); 113 exceptionThrown(errorEvent);
114 114
115 if (m_pendingExceptions.isEmpty()) 115 if (m_pendingExceptions.isEmpty())
116 return; 116 return;
117 for (ErrorEvent* e : m_pendingExceptions) 117 for (ErrorEvent* e : m_pendingExceptions)
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 246 }
247 247
248 DEFINE_TRACE(ExecutionContext) { 248 DEFINE_TRACE(ExecutionContext) {
249 visitor->trace(m_publicURLManager); 249 visitor->trace(m_publicURLManager);
250 visitor->trace(m_pendingExceptions); 250 visitor->trace(m_pendingExceptions);
251 ContextLifecycleNotifier::trace(visitor); 251 ContextLifecycleNotifier::trace(visitor);
252 Supplementable<ExecutionContext>::trace(visitor); 252 Supplementable<ExecutionContext>::trace(visitor);
253 } 253 }
254 254
255 } // namespace blink 255 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698