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

Unified Diff: chrome/renderer/webplugin_delegate_proxy.cc

Issue 155238: Add the page url to plugin crashes to aid debugging. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.h ('k') | chrome\common\child_process_logging.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/webplugin_delegate_proxy.cc
===================================================================
--- chrome/renderer/webplugin_delegate_proxy.cc (revision 20181)
+++ chrome/renderer/webplugin_delegate_proxy.cc (working copy)
@@ -19,6 +19,7 @@
#include "base/gfx/size.h"
#include "base/gfx/native_widget_types.h"
#include "chrome/app/chrome_dll_resource.h"
+#include "chrome/common/child_process_logging.h"
#include "chrome/common/plugin_messages.h"
#include "chrome/common/render_messages.h"
#include "chrome/plugin/npobject_proxy.h"
@@ -26,7 +27,6 @@
#include "chrome/plugin/npobject_util.h"
#include "chrome/renderer/render_thread.h"
#include "chrome/renderer/render_view.h"
-#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "net/base/mime_util.h"
#include "printing/native_metafile.h"
@@ -170,7 +170,8 @@
window_script_object_(NULL),
sad_plugin_(NULL),
invalidate_pending_(false),
- transparent_(false) {
+ transparent_(false),
+ page_url_(render_view_->webview()->GetMainFrame()->GetURL()) {
}
WebPluginDelegateProxy::~WebPluginDelegateProxy() {
@@ -245,6 +246,7 @@
PluginMsg_Init_Params params;
params.containing_window = render_view_->host_window();
params.url = url;
+ params.page_url = page_url_;
for (int i = 0; i < argc; ++i) {
params.arg_names.push_back(argn[i]);
params.arg_values.push_back(argv[i]);
@@ -329,6 +331,8 @@
}
void WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) {
+ child_process_logging::ScopedActiveURLSetter url_setter(page_url_);
+
IPC_BEGIN_MESSAGE_MAP(WebPluginDelegateProxy, msg)
IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindow, OnSetWindow)
#if defined(OS_LINUX)
@@ -608,7 +612,7 @@
npobject_ = NPObjectProxy::Create(
channel_host_.get(), route_id, npobject_ptr,
- render_view_->modal_dialog_event());
+ render_view_->modal_dialog_event(), page_url_);
return NPN_RetainObject(npobject_);
}
@@ -698,7 +702,7 @@
// otherwise when the channel is closed.
NPObjectStub* stub = new NPObjectStub(
npobject, channel_host_.get(), route_id,
- render_view_->modal_dialog_event());
+ render_view_->modal_dialog_event(), page_url_);
window_script_object_ = stub;
window_script_object_->set_proxy(this);
*success = true;
@@ -718,7 +722,7 @@
// otherwise when the channel is closed.
new NPObjectStub(
npobject, channel_host_.get(), route_id,
- render_view_->modal_dialog_event());
+ render_view_->modal_dialog_event(), page_url_);
*success = true;
*npobject_ptr = reinterpret_cast<intptr_t>(npobject);
}
@@ -809,7 +813,8 @@
for (size_t i = 0; i < arraysize(results); ++i) {
values->push_back(NPVariant_Param());
- CreateNPVariantParam(results[i], NULL, &values->back(), false, NULL);
+ CreateNPVariantParam(
+ results[i], NULL, &values->back(), false, NULL, page_url_);
}
*success = true;
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.h ('k') | chrome\common\child_process_logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698