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

Unified Diff: chrome/plugin/webplugin_delegate_stub.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/plugin/webplugin_delegate_stub.h ('k') | chrome/plugin/webplugin_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/webplugin_delegate_stub.cc
===================================================================
--- chrome/plugin/webplugin_delegate_stub.cc (revision 20181)
+++ chrome/plugin/webplugin_delegate_stub.cc (working copy)
@@ -7,6 +7,7 @@
#include "build/build_config.h"
#include "base/command_line.h"
+#include "chrome/common/child_process_logging.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/plugin_messages.h"
#include "chrome/plugin/npobject_stub.h"
@@ -49,6 +50,8 @@
}
WebPluginDelegateStub::~WebPluginDelegateStub() {
+ child_process_logging::ScopedActiveURLSetter url_setter(page_url_);
+
if (channel_->in_send()) {
// The delegate or an npobject is in the callstack, so don't delete it
// right away.
@@ -64,6 +67,8 @@
}
void WebPluginDelegateStub::OnMessageReceived(const IPC::Message& msg) {
+ child_process_logging::ScopedActiveURLSetter url_setter(page_url_);
+
// A plugin can execute a script to delete itself in any of its NPP methods.
// Hold an extra reference to ourself so that if this does occur and we're
// handling a sync message, we don't crash when attempting to send a reply.
@@ -110,6 +115,9 @@
void WebPluginDelegateStub::OnInit(const PluginMsg_Init_Params& params,
bool* result) {
+ page_url_ = params.page_url;
+ child_process_logging::ScopedActiveURLSetter url_setter(page_url_);
+
*result = false;
int argc = static_cast<int>(params.arg_names.size());
if (argc != static_cast<int>(params.arg_values.size())) {
@@ -139,7 +147,8 @@
delegate_ = WebPluginDelegate::Create(path, mime_type_, parent);
if (delegate_) {
- webplugin_ = new WebPluginProxy(channel_, instance_id_, delegate_);
+ webplugin_ = new WebPluginProxy(
+ channel_, instance_id_, delegate_, page_url_);
#if defined(OS_WIN)
if (!webplugin_->SetModalDialogEvent(params.modal_dialog_event))
return;
@@ -278,7 +287,8 @@
// The stub will delete itself when the proxy tells it that it's released, or
// otherwise when the channel is closed.
new NPObjectStub(
- object, channel_.get(), *route_id, webplugin_->modal_dialog_event());
+ object, channel_.get(), *route_id, webplugin_->modal_dialog_event(),
+ page_url_);
// Release ref added by GetPluginScriptableObject (our stub holds its own).
NPN_ReleaseObject(object);
« no previous file with comments | « chrome/plugin/webplugin_delegate_stub.h ('k') | chrome/plugin/webplugin_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698