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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 } | 234 } |
235 | 235 |
236 bool ScriptExecutionContext::dispatchErrorEvent(PassRefPtr<ErrorEvent> event, Ac
cessControlStatus corsStatus) | 236 bool ScriptExecutionContext::dispatchErrorEvent(PassRefPtr<ErrorEvent> event, Ac
cessControlStatus corsStatus) |
237 { | 237 { |
238 EventTarget* target = errorEventTarget(); | 238 EventTarget* target = errorEventTarget(); |
239 if (!target) | 239 if (!target) |
240 return false; | 240 return false; |
241 | 241 |
242 RefPtr<ErrorEvent> errorEvent = event; | 242 RefPtr<ErrorEvent> errorEvent = event; |
243 if (shouldSanitizeScriptError(errorEvent->filename(), corsStatus)) | 243 if (shouldSanitizeScriptError(errorEvent->filename(), corsStatus)) |
244 errorEvent = ErrorEvent::createSanitizedError(); | 244 errorEvent = ErrorEvent::createSanitizedError(errorEvent->world()); |
245 | 245 |
246 ASSERT(!m_inDispatchErrorEvent); | 246 ASSERT(!m_inDispatchErrorEvent); |
247 m_inDispatchErrorEvent = true; | 247 m_inDispatchErrorEvent = true; |
248 target->dispatchEvent(errorEvent); | 248 target->dispatchEvent(errorEvent); |
249 m_inDispatchErrorEvent = false; | 249 m_inDispatchErrorEvent = false; |
250 return errorEvent->defaultPrevented(); | 250 return errorEvent->defaultPrevented(); |
251 } | 251 } |
252 | 252 |
253 int ScriptExecutionContext::circularSequentialID() | 253 int ScriptExecutionContext::circularSequentialID() |
254 { | 254 { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 ScriptExecutionContext::Task::~Task() | 313 ScriptExecutionContext::Task::~Task() |
314 { | 314 { |
315 } | 315 } |
316 | 316 |
317 void ScriptExecutionContext::setDatabaseContext(DatabaseContext* databaseContext
) | 317 void ScriptExecutionContext::setDatabaseContext(DatabaseContext* databaseContext
) |
318 { | 318 { |
319 m_databaseContext = databaseContext; | 319 m_databaseContext = databaseContext; |
320 } | 320 } |
321 | 321 |
322 } // namespace WebCore | 322 } // namespace WebCore |
OLD | NEW |