Fix a crash when creating window.

This commit is contained in:
Cheng Zhao 2014-07-11 19:39:35 +08:00
parent 43e8ecb118
commit b4ba149662

View file

@ -26,6 +26,10 @@ struct FindByProcessId {
}
bool operator() (NativeWindow* const window) {
content::WebContents* web_contents = window->GetWebContents();
if (!web_contents)
return false;
int id = window->GetWebContents()->GetRenderProcessHost()->GetID();
return id == child_process_id_;
}