Merge pull request #6832 from hammerandchisel/bug/remote_object_freer_crash
fix intermittent crash in RemoteObjectFreer
This commit is contained in:
commit
bd03ae53f2
2 changed files with 9 additions and 2 deletions
|
@ -41,14 +41,20 @@ void RemoteObjectFreer::BindTo(
|
|||
RemoteObjectFreer::RemoteObjectFreer(
|
||||
v8::Isolate* isolate, v8::Local<v8::Object> target, int object_id)
|
||||
: ObjectLifeMonitor(isolate, target),
|
||||
object_id_(object_id) {
|
||||
object_id_(object_id),
|
||||
routing_id_(MSG_ROUTING_NONE) {
|
||||
content::RenderView* render_view = GetCurrentRenderView();
|
||||
if (render_view) {
|
||||
routing_id_ = render_view->GetRoutingID();
|
||||
}
|
||||
}
|
||||
|
||||
RemoteObjectFreer::~RemoteObjectFreer() {
|
||||
}
|
||||
|
||||
void RemoteObjectFreer::RunDestructor() {
|
||||
content::RenderView* render_view = GetCurrentRenderView();
|
||||
content::RenderView* render_view =
|
||||
content::RenderView::FromRoutingID(routing_id_);
|
||||
if (!render_view)
|
||||
return;
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ class RemoteObjectFreer : public ObjectLifeMonitor {
|
|||
|
||||
private:
|
||||
int object_id_;
|
||||
int routing_id_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RemoteObjectFreer);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue