| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 return m_client->timerAlignmentInterval(); | 296 return m_client->timerAlignmentInterval(); |
| 297 } | 297 } |
| 298 | 298 |
| 299 void ExecutionContext::postTask(PassOwnPtr<ExecutionContextTask> task) | 299 void ExecutionContext::postTask(PassOwnPtr<ExecutionContextTask> task) |
| 300 { | 300 { |
| 301 if (!m_client) | 301 if (!m_client) |
| 302 return; | 302 return; |
| 303 m_client->postTask(task); | 303 m_client->postTask(task); |
| 304 } | 304 } |
| 305 | 305 |
| 306 void ExecutionContext::postTask(const Closure& closure) | |
| 307 { | |
| 308 if (!m_client) | |
| 309 return; | |
| 310 m_client->postTask(CallClosureTask::create(closure)); | |
| 311 } | |
| 312 | |
| 313 PassOwnPtr<LifecycleNotifier<ExecutionContext> > ExecutionContext::createLifecyc
leNotifier() | 306 PassOwnPtr<LifecycleNotifier<ExecutionContext> > ExecutionContext::createLifecyc
leNotifier() |
| 314 { | 307 { |
| 315 return ContextLifecycleNotifier::create(this); | 308 return ContextLifecycleNotifier::create(this); |
| 316 } | 309 } |
| 317 | 310 |
| 318 ContextLifecycleNotifier& ExecutionContext::lifecycleNotifier() | 311 ContextLifecycleNotifier& ExecutionContext::lifecycleNotifier() |
| 319 { | 312 { |
| 320 return static_cast<ContextLifecycleNotifier&>(LifecycleContext<ExecutionCont
ext>::lifecycleNotifier()); | 313 return static_cast<ContextLifecycleNotifier&>(LifecycleContext<ExecutionCont
ext>::lifecycleNotifier()); |
| 321 } | 314 } |
| 322 | 315 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 339 | 332 |
| 340 void ExecutionContext::trace(Visitor* visitor) | 333 void ExecutionContext::trace(Visitor* visitor) |
| 341 { | 334 { |
| 342 #if ENABLE(OILPAN) | 335 #if ENABLE(OILPAN) |
| 343 visitor->trace(m_pendingExceptions); | 336 visitor->trace(m_pendingExceptions); |
| 344 #endif | 337 #endif |
| 345 Supplementable<WebCore::ExecutionContext>::trace(visitor); | 338 Supplementable<WebCore::ExecutionContext>::trace(visitor); |
| 346 } | 339 } |
| 347 | 340 |
| 348 } // namespace WebCore | 341 } // namespace WebCore |
| OLD | NEW |