diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-10 09:41:25 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-10 09:41:25 +0000 |
commit | 44fcf79100e66ef18af6165db1665f9c28781ed0 (patch) | |
tree | f853c2855d72ffa4a706e16cc2e402ce9c85e494 /chrome/browser | |
parent | f5df639a1f1807141f2979d3969dea54d83040e2 (diff) | |
download | chromium_src-44fcf79100e66ef18af6165db1665f9c28781ed0.zip chromium_src-44fcf79100e66ef18af6165db1665f9c28781ed0.tar.gz chromium_src-44fcf79100e66ef18af6165db1665f9c28781ed0.tar.bz2 |
Linux: fix crash in OnGetScreenInfo
In the ViewMsg_New, we pass a NativeViewId to the renderer. When
WebKit wishes to know the metrics of the window, it echos that id back
in a ViewHostMsg_GetScreenInfo. Without this patch, it echos back NULL
and the browser crashes.
This highlights a semi-major TODO for the porting effort at some
point. We need to abstract the NativeViewIds from the NativeViews as
we cannot trust pointer values from the renderers.
The conversion code is in base/gfx/native_widget_types.h and currently
just casts between them (which is correct for Windows, where both
typedefs are HWNDs). One, maybe interresting idea is that we could
generate a random secret key in the browser and HMAC sign the pointer
values.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9476 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_gtk.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc index d5b6799..4c03783 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc @@ -124,7 +124,10 @@ void RenderWidgetHostViewGtk::SetSize(const gfx::Size& size) { gfx::NativeView RenderWidgetHostViewGtk::GetPluginNativeView() { NOTIMPLEMENTED(); - return NULL; + // TODO(port): We need to pass some widget pointer out here because the + // renderer echos it back to us when it asks for GetScreenInfo. However, we + // should probably be passing the top-level window or some such instead. + return view_; } void RenderWidgetHostViewGtk::MovePluginWindows( |