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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp

Issue 2049003002: Wrap GCed raw pointer parameters of WTF::bind with Persistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert "unretained" part and "disallow pointers" part Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 555
556 if (newState == m_contextState) { 556 if (newState == m_contextState) {
557 // ASSERTs above failed; just return. 557 // ASSERTs above failed; just return.
558 return; 558 return;
559 } 559 }
560 560
561 m_contextState = newState; 561 m_contextState = newState;
562 562
563 // Notify context that state changed 563 // Notify context that state changed
564 if (getExecutionContext()) 564 if (getExecutionContext())
565 getExecutionContext()->postTask(BLINK_FROM_HERE, createSameThreadTask(&A bstractAudioContext::notifyStateChange, this)); 565 getExecutionContext()->postTask(BLINK_FROM_HERE, createSameThreadTask(&A bstractAudioContext::notifyStateChange, wrapCrossThreadPersistent(this)));
566 } 566 }
567 567
568 void AbstractAudioContext::notifyStateChange() 568 void AbstractAudioContext::notifyStateChange()
569 { 569 {
570 dispatchEvent(Event::create(EventTypeNames::statechange)); 570 dispatchEvent(Event::create(EventTypeNames::statechange));
571 } 571 }
572 572
573 void AbstractAudioContext::notifySourceNodeFinishedProcessing(AudioHandler* hand ler) 573 void AbstractAudioContext::notifySourceNodeFinishedProcessing(AudioHandler* hand ler)
574 { 574 {
575 ASSERT(isAudioThread()); 575 ASSERT(isAudioThread());
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 790
791 SecurityOrigin* AbstractAudioContext::getSecurityOrigin() const 791 SecurityOrigin* AbstractAudioContext::getSecurityOrigin() const
792 { 792 {
793 if (getExecutionContext()) 793 if (getExecutionContext())
794 return getExecutionContext()->getSecurityOrigin(); 794 return getExecutionContext()->getSecurityOrigin();
795 795
796 return nullptr; 796 return nullptr;
797 } 797 }
798 798
799 } // namespace blink 799 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698