[Webkit-unassigned] [Bug 66230] New: Also release media resources when media is completely loaded.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 15 08:46:56 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=66230

           Summary: Also release media resources when media is completely
                    loaded.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Media Elements
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: zhenghao at chromium.org
                CC: hclam at google.com


DRT will not release resources of media player in the old page when opening a new page. It will only release resources when GC is needed (see stacktrace GC). But actually DRT will try to release media resources explicitly if it is not completely loaded (see stacktrace EXPLICIT). It may not be a problem on other platforms, but it will cause unstable behavior on platforms with limited resources e.g. mobile phones, especially when running consecutive tests in DRT. If we release media which is not completely loaded, it's better to also release completely loaded media.

GC:
#0  webkit_glue::WebMediaPlayerImpl::Destroy (this=0x7fffea161930) at Source/WebKit/chromium/webkit/glue/webmediaplayer_impl.cc:1004
#1  0x000000000195e01c in webkit_glue::WebMediaPlayerImpl::~WebMediaPlayerImpl (this=0x7fffea161930, __in_chrg=<value optimized out>)
   at Source/WebKit/chromium/webkit/glue/webmediaplayer_impl.cc:424
#2  0x0000000000506477 in WTF::deleteOwnedPtr<WebKit::WebMediaPlayer> (ptr=0x7fffea161930) at Source/JavaScriptCore/wtf/OwnPtrCommon.h:65
#3  0x0000000000505eb5 in WTF::OwnPtr<WebKit::WebMediaPlayer>::~OwnPtr (this=0x7fffea0a8660, __in_chrg=<value optimized out>) at Source/JavaScriptCore/wtf/OwnPtr.h:54
#4  0x0000000000503aea in WebKit::WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl (this=0x7fffea0a8640, __in_chrg=<value optimized out>)
   at Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp:108
#5  0x0000000000ff31e2 in WTF::deleteOwnedPtr<WebCore::MediaPlayerPrivateInterface> (ptr=0x7fffea0a8640) at Source/JavaScriptCore/wtf/OwnPtrCommon.h:65
#6  0x0000000000ff2f63 in WTF::OwnPtr<WebCore::MediaPlayerPrivateInterface>::~OwnPtr (this=0x7fffea104af0, __in_chrg=<value optimized out>)
   at Source/JavaScriptCore/wtf/OwnPtr.h:54
#7  0x0000000000ff0f1e in WebCore::MediaPlayer::~MediaPlayer (this=0x7fffea104aa0, __in_chrg=<value optimized out>) at Source/WebCore/platform/graphics/MediaPlayer.cpp:318
#8  0x0000000000ebd891 in WTF::deleteOwnedPtr<WebCore::MediaPlayer> (ptr=0x7fffea104aa0) at Source/JavaScriptCore/wtf/OwnPtrCommon.h:65
#9  0x0000000000ebd4ef in WTF::OwnPtr<WebCore::MediaPlayer>::~OwnPtr (this=0x7ffff7e8cb40, __in_chrg=<value optimized out>) at Source/JavaScriptCore/wtf/OwnPtr.h:54
#10 0x0000000000eb41eb in WebCore::HTMLMediaElement::~HTMLMediaElement (this=0x7ffff7e8c8c0, __in_chrg=<value optimized out>) at Source/WebCore/html/HTMLMediaElement.cpp:201
#11 0x000000000211445b in WebCore::HTMLAudioElement::~HTMLAudioElement (this=0x7ffff7e8c8c0, __in_chrg=<value optimized out>) at Source/WebCore/html/HTMLAudioElement.h:38
#12 0x0000000000d943fc in WebCore::TreeShared<WebCore::ContainerNode>::removedLastRef (this=0x7ffff7e8c8c8) at Source/WebCore/platform/TreeShared.h:118
#13 0x0000000000476865 in WebCore::TreeShared<WebCore::ContainerNode>::deref (this=0x7ffff7e8c8c8) at Source/WebCore/platform/TreeShared.h:79
#14 0x0000000001569a72 in WebCore::DOMDataStore::weakNodeCallback (value=..., domObject=0x7ffff7e8c8c0) at Source/WebCore/bindings/v8/DOMDataStore.cpp:153
#15 0x0000000000a47232 in v8::internal::GlobalHandles::Node::PostGarbageCollectionProcessing (this=0x7ffff7e5cc00, isolate=0x7ffff7e44000, global_handles=0x7ffff7e74000)
   at Source/WebKit/chromium/v8/src/global-handles.cc:233
#16 0x0000000000a45b9d in v8::internal::GlobalHandles::PostGarbageCollectionProcessing (this=0x7ffff7e74000, collector=v8::internal::MARK_COMPACTOR)
   at Source/WebKit/chromium/v8/src/global-handles.cc:555
#17 0x0000000000a57ad0 in v8::internal::Heap::PerformGarbageCollection (this=0x7ffff7e44098, collector=v8::internal::MARK_COMPACTOR, tracer=0x7fffffffaa40)
   at Source/WebKit/chromium/v8/src/heap.cc:771
#18 0x0000000000a57089 in v8::internal::Heap::CollectGarbage (this=0x7ffff7e44098, space=v8::internal::NEW_SPACE, collector=v8::internal::MARK_COMPACTOR)
   at Source/WebKit/chromium/v8/src/heap.cc:508
#19 0x0000000000a11789 in v8::internal::Heap::CollectGarbage (this=0x7ffff7e44098, space=v8::internal::NEW_SPACE) at Source/WebKit/chromium/v8/src/heap-inl.h:427
#20 0x0000000000a4acea in v8::internal::SetProperty (object=..., key=..., value=..., attributes=READ_ONLY, strict_mode=v8::internal::kNonStrictMode)
   at Source/WebKit/chromium/v8/src/handles.cc:269
#21 0x0000000000b883cc in v8::internal::Runtime::SetObjectProperty (isolate=0x7ffff7e44000, object=..., key=..., value=..., attr=READ_ONLY,     strict_mode=v8::internal::kNonStrictMode) at Source/WebKit/chromium/v8/src/runtime.cc:4135
#22 0x0000000000b88b62 in v8::internal::Runtime_SetProperty (args=..., isolate=0x7ffff7e44000) at Source/WebKit/chromium/v8/src/runtime.cc:4270

EXPLICIT:
#10 0x002fb5a0 in ~MediaPlayer (this=0x12adb18, __in_chrg=<value optimized out>) at third_party/WebKit/Source/WebCore/platform/graphics/MediaPlayer.cpp:318
#11 0x0000cb2a in WTF::deleteOwnedPtr<CppBoundClass::Callback> (ptr=0x12adb18) at third_party/WebKit/Source/JavaScriptCore/wtf/OwnPtrCommon.h:65
#12 0x002a6f20 in WTF::OwnPtr<WebCore::MediaPlayer>::clear (this=0x123b840) at third_party/WebKit/Source/JavaScriptCore/wtf/OwnPtr.h:99
#13 WebCore::HTMLMediaElement::userCancelledLoad (this=0x123b840) at third_party/WebKit/Source/WebCore/html/HTMLMediaElement.cpp:2343
#14 0x002a9212 in WebCore::HTMLMediaElement::stop (this=0x123b840) at third_party/WebKit/Source/WebCore/html/HTMLMediaElement.cpp:2388
#15 0x0028e07c in WebCore::ScriptExecutionContext::stopActiveDOMObjects (this=0x1247c58) at third_party/WebKit/Source/WebCore/dom/ScriptExecutionContext.cpp:271
#16 0x00276930 in WebCore::Document::detach (this=0x1247bd0) at third_party/WebKit/Source/WebCore/dom/Document.cpp:1787
#17 0x003edc1e in WebCore::Frame::setView (this=0x12334c8, view=...) at third_party/WebKit/Source/WebCore/page/Frame.cpp:275
#18 0x00024104 in WebKit::WebFrameImpl::createFrameView (this=0x1233378) at third_party/WebKit/Source/WebKit/chromium/src/WebFrameImpl.cpp:2308
#19 0x0003a71c in WebKit::FrameLoaderClientImpl::makeDocumentView (this=<value optimized out>)
   at third_party/WebKit/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:254
#20 WebKit::FrameLoaderClientImpl::transitionToCommittedForNewPage (this=<value optimized out>)
   at third_party/WebKit/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:1395
#21 0x003c8ecc in WebCore::FrameLoader::transitionToCommitted (this=0x1233508, cachedPage=...) at third_party/WebKit/Source/WebCore/loader/FrameLoader.cpp:1892
#22 0x003c8fca in WebCore::FrameLoader::commitProvisionalLoad (this=0x1233508) at third_party/WebKit/Source/WebCore/loader/FrameLoader.cpp:1739
#23 0x003c056a in WebCore::DocumentLoader::commitIfReady (this=<value optimized out>) at third_party/WebKit/Source/WebCore/loader/DocumentLoader.cpp:279
#24 0x003c058c in WebCore::DocumentLoader::commitLoad (this=0x12c22d8,
   data=0x12c9b20 "<body>\n<p>Test that Audio(\"url\") constructor loads the specified resource.</p>\n<script src=media-file.js></script>\n<script src=video-test.js></script>\n<script>\n    var audioFile = findMediaFile(\"audio"..., length=506) at third_party/WebKit/Source/WebCore/loader/DocumentLoader.cpp:300
#25 0x003c060e in WebCore::DocumentLoader::receivedData (this=0x12c22d8,
   data=0x12c9b20 "<body>\n<p>Test that Audio(\"url\") constructor loads the specified resource.</p>\n<script src=media-file.js></script>\n<script src=video-test.js></script>\n<script>\n    var audioFile = findMediaFile(\"audio"..., length=506) at third_party/WebKit/Source/WebCore/loader/DocumentLoader.cpp:334
#26 0x003cdc6e in WebCore::MainResourceLoader::addData (this=0x12c3100,
   data=0x12c9b20 "<body>\n<p>Test that Audio(\"url\") constructor loads the specified resource.</p>\n<script src=media-file.js></script>\n<script src=video-test.js></script>\n<script>\n    var audioFile = findMediaFile(\"audio"..., length=506, allAtOnce=<value optimized out>)
   at third_party/WebKit/Source/WebCore/loader/MainResourceLoader.cpp:168
#27 0x003d2270 in WebCore::ResourceLoader::didReceiveData (this=0x12c3100,
   data=0x12c9b20 "<body>\n<p>Test that Audio(\"url\") constructor loads the specified resource.</p>\n<script src=media-file.js></script>\n<script src=video-test.js></script>\n<script>\n    var audioFile = findMediaFile(\"audio"..., length=506, encodedDataLength=<value optimized out>, allAtOnce=false)
   at third_party/WebKit/Source/WebCore/loader/ResourceLoader.cpp:304
#28 0x003cdc4a in WebCore::MainResourceLoader::didReceiveData (this=0x12c3100,
   data=0x12c9b20 "<body>\n<p>Test that Audio(\"url\") constructor loads the specified resource.</p>\n<script src=media-file.js></script>\n<script src=video-test.js></script>\n<script>\n    var audioFile = findMediaFile(\"audio"..., length=506, encodedDataLength=-1, allAtOnce=false)
   at third_party/WebKit/Source/WebCore/loader/MainResourceLoader.cpp:464
#29 0x003d2098 in WebCore::ResourceLoader::didReceiveData (this=0x12c3100,
   data=0x12c9b20 "<body>\n<p>Test that Audio(\"url\") constructor loads the specified resource.</p>\n<script src=media-file.js></script>\n<script src=video-test.js></script>\n<script>\n    var audioFile = findMediaFile(\"audio"..., length=506, encodedDataLength=-1) at third_party/WebKit/Source/WebCore/loader/ResourceLoader.cpp:462
#30 0x0057306e in WebCore::ResourceHandleInternal::didReceiveData (this=0x12c3870,
   data=0x12c9b20 "<body>\n<p>Test that Audio(\"url\") constructor loads the specified resource.</p>\n<script src=media-file.js></script>\n<script src=video-test.js></script>\n<script>\n    var audioFile = findMediaFile(\"audio"..., dataLength=506, encodedDataLength=-1) at third_party/WebKit/Source/WebKit/chromium/src/ResourceHandle.cpp:172
#31 0x005372a0 in webkit_glue::WebURLLoaderImpl::Context::OnReceivedData (this=0x128a148,
   data=0x12c9b20 "<body>\n<p>Test that Audio(\"url\") constructor loads the specified resource.</p>\n<script src=media-file.js></script>\n<script src=video-test.js></script>\n<script>\n    var audioFile = findMediaFile(\"audio"..., data_length=506, encoded_data_length=<value optimized out>) at webkit/glue/weburlloader_impl.cc:619
#32 0x0056c376 in NotifyReceivedData (this=<value optimized out>, bytes_read=506) at webkit/tools/test_shell/simple_resource_loader_bridge.cc:280
#33 0x0056a62c in DispatchToMethod<<unnamed>::RequestProxy, void (<unnamed>::RequestProxy::*)(int), int> (this=0x1fa) at ./base/tuple.h:551
#34 Run (this=0x1fa) at ./base/task.h:338
#35 0x0012651c in Run (this=0x12c8c40) at base/message_loop.cc:109
#36 0x001265c6 in DoInvoke (base=<value optimized out>) at ./base/bind_internal.h:595

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list