OLD | NEW |
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 bool ExecutionContext::shouldSanitizeScriptError(const String& sourceURL, Access
ControlStatus corsStatus) | 123 bool ExecutionContext::shouldSanitizeScriptError(const String& sourceURL, Access
ControlStatus corsStatus) |
124 { | 124 { |
125 return !(securityOrigin()->canRequest(completeURL(sourceURL)) || corsStatus
== SharableCrossOrigin); | 125 return !(securityOrigin()->canRequest(completeURL(sourceURL)) || corsStatus
== SharableCrossOrigin); |
126 } | 126 } |
127 | 127 |
128 void ExecutionContext::reportException(PassRefPtrWillBeRawPtr<ErrorEvent> event,
int scriptId, PassRefPtrWillBeRawPtr<ScriptCallStack> callStack, AccessControlS
tatus corsStatus) | 128 void ExecutionContext::reportException(PassRefPtrWillBeRawPtr<ErrorEvent> event,
int scriptId, PassRefPtrWillBeRawPtr<ScriptCallStack> callStack, AccessControlS
tatus corsStatus) |
129 { | 129 { |
130 RefPtrWillBeRawPtr<ErrorEvent> errorEvent = event; | 130 RefPtrWillBeRawPtr<ErrorEvent> errorEvent = event; |
131 if (m_inDispatchErrorEvent) { | 131 if (m_inDispatchErrorEvent) { |
132 if (!m_pendingExceptions) | 132 if (!m_pendingExceptions) |
133 m_pendingExceptions = adoptPtrWillBeNoop(new WillBeHeapVector<OwnPtr
WillBeMember<PendingException> >()); | 133 m_pendingExceptions = adoptPtrWillBeNoop(new WillBeHeapVector<OwnPtr
WillBeMember<PendingException>>()); |
134 m_pendingExceptions->append(adoptPtrWillBeNoop(new PendingException(erro
rEvent->messageForConsole(), errorEvent->lineno(), errorEvent->colno(), scriptId
, errorEvent->filename(), callStack))); | 134 m_pendingExceptions->append(adoptPtrWillBeNoop(new PendingException(erro
rEvent->messageForConsole(), errorEvent->lineno(), errorEvent->colno(), scriptId
, errorEvent->filename(), callStack))); |
135 return; | 135 return; |
136 } | 136 } |
137 | 137 |
138 // First report the original exception and only then all the nested ones. | 138 // First report the original exception and only then all the nested ones. |
139 if (!dispatchErrorEvent(errorEvent, corsStatus)) | 139 if (!dispatchErrorEvent(errorEvent, corsStatus)) |
140 logExceptionToConsole(errorEvent->messageForConsole(), scriptId, errorEv
ent->filename(), errorEvent->lineno(), errorEvent->colno(), callStack); | 140 logExceptionToConsole(errorEvent->messageForConsole(), scriptId, errorEv
ent->filename(), errorEvent->lineno(), errorEvent->colno(), callStack); |
141 | 141 |
142 if (!m_pendingExceptions) | 142 if (!m_pendingExceptions) |
143 return; | 143 return; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 { | 230 { |
231 #if ENABLE(OILPAN) | 231 #if ENABLE(OILPAN) |
232 visitor->trace(m_pendingExceptions); | 232 visitor->trace(m_pendingExceptions); |
233 visitor->trace(m_publicURLManager); | 233 visitor->trace(m_publicURLManager); |
234 HeapSupplementable<ExecutionContext>::trace(visitor); | 234 HeapSupplementable<ExecutionContext>::trace(visitor); |
235 #endif | 235 #endif |
236 ContextLifecycleNotifier::trace(visitor); | 236 ContextLifecycleNotifier::trace(visitor); |
237 } | 237 } |
238 | 238 |
239 } // namespace blink | 239 } // namespace blink |
OLD | NEW |