summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2009-08-28 16:29:07 -0700
committerGrace Kloba <klobag@google.com>2009-08-28 16:29:07 -0700
commitdeb338ee1849d227ba106f707fb53c0f18b49518 (patch)
tree2ea2a6f9658157b6520ecee7058c1877a5bb5bde /WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
parent194211f214e16956c937d03c2aff03936c22f928 (diff)
downloadexternal_webkit-deb338ee1849d227ba106f707fb53c0f18b49518.zip
external_webkit-deb338ee1849d227ba106f707fb53c0f18b49518.tar.gz
external_webkit-deb338ee1849d227ba106f707fb53c0f18b49518.tar.bz2
Fix the crash with sites having youtube video. It doesn't crash while loading.
It crashes when you leave the site. frame->view() returns m_view.get(). So we don't want to call adoptRef which will cause a deref. I verified that when you leave the page, the new widget is removed.
Diffstat (limited to 'WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp')
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
index c9e712e..74b62dd 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
@@ -961,7 +961,7 @@ WTF::PassRefPtr<Widget> FrameLoaderClientAndroid::createPlugin(
loadDataIntoFrame(frame.get(),
KURL("file:///android_asset/webkit/"), String(), s);
// Transfer ownership to a local refptr.
- WTF::RefPtr<Widget> widget = adoptRef(frame->view());
+ WTF::RefPtr<Widget> widget(frame->view());
return widget.release();
}
return NULL;