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

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

Issue 374583002: Replace CallClosureTask::create(bind()) with createCrossThreadTask() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months 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
« no previous file with comments | « Source/core/dom/ExecutionContext.h ('k') | Source/core/dom/ExecutionContextTask.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/core/dom/ExecutionContext.h ('k') | Source/core/dom/ExecutionContextTask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698