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

Side by Side Diff: webkit/glue/webmediaplayer_impl.cc

Issue 8382012: Fix shutdown crash when WebMediaPlayerImpl is destroyed after RenderViewImpl is. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test callers Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webmediaplayer_impl.h ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/glue/webmediaplayer_impl.h" 5 #include "webkit/glue/webmediaplayer_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Now we can safely cast to int64 microseconds. 91 // Now we can safely cast to int64 microseconds.
92 return base::TimeDelta::FromMicroseconds(static_cast<int64>(integer)); 92 return base::TimeDelta::FromMicroseconds(static_cast<int64>(integer));
93 } 93 }
94 94
95 } // namespace 95 } // namespace
96 96
97 namespace webkit_glue { 97 namespace webkit_glue {
98 98
99 WebMediaPlayerImpl::WebMediaPlayerImpl( 99 WebMediaPlayerImpl::WebMediaPlayerImpl(
100 WebKit::WebMediaPlayerClient* client, 100 WebKit::WebMediaPlayerClient* client,
101 WebMediaPlayerDelegate* delegate, 101 base::WeakPtr<WebMediaPlayerDelegate> delegate,
102 media::FilterCollection* collection, 102 media::FilterCollection* collection,
103 media::MessageLoopFactory* message_loop_factory, 103 media::MessageLoopFactory* message_loop_factory,
104 MediaStreamClient* media_stream_client, 104 MediaStreamClient* media_stream_client,
105 media::MediaLog* media_log) 105 media::MediaLog* media_log)
106 : network_state_(WebKit::WebMediaPlayer::Empty), 106 : network_state_(WebKit::WebMediaPlayer::Empty),
107 ready_state_(WebKit::WebMediaPlayer::HaveNothing), 107 ready_state_(WebKit::WebMediaPlayer::HaveNothing),
108 main_loop_(NULL), 108 main_loop_(NULL),
109 filter_collection_(collection), 109 filter_collection_(collection),
110 pipeline_(NULL), 110 pipeline_(NULL),
111 message_loop_factory_(message_loop_factory), 111 message_loop_factory_(message_loop_factory),
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 return client_; 858 return client_;
859 } 859 }
860 860
861 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { 861 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() {
862 DCHECK_EQ(main_loop_, MessageLoop::current()); 862 DCHECK_EQ(main_loop_, MessageLoop::current());
863 incremented_externally_allocated_memory_ = true; 863 incremented_externally_allocated_memory_ = true;
864 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); 864 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory);
865 } 865 }
866 866
867 } // namespace webkit_glue 867 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webmediaplayer_impl.h ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698