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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 ASSERT(contains(object)); | 137 ASSERT(contains(object)); |
138 // Ensure all ActiveDOMObjects are suspended also newly created ones. | 138 // Ensure all ActiveDOMObjects are suspended also newly created ones. |
139 if (m_activeDOMObjectsAreSuspended) | 139 if (m_activeDOMObjectsAreSuspended) |
140 object->suspend(); | 140 object->suspend(); |
141 } | 141 } |
142 | 142 |
143 bool ExecutionContext::shouldSanitizeScriptError(const String& sourceURL, Access
ControlStatus corsStatus) | 143 bool ExecutionContext::shouldSanitizeScriptError(const String& sourceURL, Access
ControlStatus corsStatus) |
144 { | 144 { |
145 if (corsStatus == OpaqueResource) | 145 if (corsStatus == OpaqueResource) |
146 return true; | 146 return true; |
147 return !(securityOrigin()->canRequestNoSuborigin(completeURL(sourceURL)) ||
corsStatus == SharableCrossOrigin); | 147 return !(getSecurityOrigin()->canRequestNoSuborigin(completeURL(sourceURL))
|| corsStatus == SharableCrossOrigin); |
148 } | 148 } |
149 | 149 |
150 void ExecutionContext::reportException(PassRefPtrWillBeRawPtr<ErrorEvent> event,
int scriptId, PassRefPtr<ScriptCallStack> callStack, AccessControlStatus corsSt
atus) | 150 void ExecutionContext::reportException(PassRefPtrWillBeRawPtr<ErrorEvent> event,
int scriptId, PassRefPtr<ScriptCallStack> callStack, AccessControlStatus corsSt
atus) |
151 { | 151 { |
152 RefPtrWillBeRawPtr<ErrorEvent> errorEvent = event; | 152 RefPtrWillBeRawPtr<ErrorEvent> errorEvent = event; |
153 if (m_inDispatchErrorEvent) { | 153 if (m_inDispatchErrorEvent) { |
154 if (!m_pendingExceptions) | 154 if (!m_pendingExceptions) |
155 m_pendingExceptions = adoptPtr(new Vector<OwnPtr<PendingException>>(
)); | 155 m_pendingExceptions = adoptPtr(new Vector<OwnPtr<PendingException>>(
)); |
156 m_pendingExceptions->append(adoptPtr(new PendingException(errorEvent->me
ssageForConsole(), errorEvent->lineno(), errorEvent->colno(), scriptId, errorEve
nt->filename(), callStack))); | 156 m_pendingExceptions->append(adoptPtr(new PendingException(errorEvent->me
ssageForConsole(), errorEvent->lineno(), errorEvent->colno(), scriptId, errorEve
nt->filename(), callStack))); |
157 return; | 157 return; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 return m_circularSequentialID; | 206 return m_circularSequentialID; |
207 } | 207 } |
208 | 208 |
209 PublicURLManager& ExecutionContext::publicURLManager() | 209 PublicURLManager& ExecutionContext::publicURLManager() |
210 { | 210 { |
211 if (!m_publicURLManager) | 211 if (!m_publicURLManager) |
212 m_publicURLManager = PublicURLManager::create(this); | 212 m_publicURLManager = PublicURLManager::create(this); |
213 return *m_publicURLManager; | 213 return *m_publicURLManager; |
214 } | 214 } |
215 | 215 |
216 SecurityOrigin* ExecutionContext::securityOrigin() | 216 SecurityOrigin* ExecutionContext::getSecurityOrigin() |
217 { | 217 { |
218 return securityContext().securityOrigin(); | 218 return securityContext().getSecurityOrigin(); |
219 } | 219 } |
220 | 220 |
221 ContentSecurityPolicy* ExecutionContext::contentSecurityPolicy() | 221 ContentSecurityPolicy* ExecutionContext::contentSecurityPolicy() |
222 { | 222 { |
223 return securityContext().contentSecurityPolicy(); | 223 return securityContext().contentSecurityPolicy(); |
224 } | 224 } |
225 | 225 |
226 const KURL& ExecutionContext::url() const | 226 const KURL& ExecutionContext::url() const |
227 { | 227 { |
228 return virtualURL(); | 228 return virtualURL(); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 DEFINE_TRACE(ExecutionContext) | 279 DEFINE_TRACE(ExecutionContext) |
280 { | 280 { |
281 #if ENABLE(OILPAN) | 281 #if ENABLE(OILPAN) |
282 visitor->trace(m_publicURLManager); | 282 visitor->trace(m_publicURLManager); |
283 HeapSupplementable<ExecutionContext>::trace(visitor); | 283 HeapSupplementable<ExecutionContext>::trace(visitor); |
284 #endif | 284 #endif |
285 ContextLifecycleNotifier::trace(visitor); | 285 ContextLifecycleNotifier::trace(visitor); |
286 } | 286 } |
287 | 287 |
288 } // namespace blink | 288 } // namespace blink |
OLD | NEW |