Chromium Code Reviews| Index: chrome/renderer/extensions/user_script_slave.cc |
| diff --git a/chrome/renderer/extensions/user_script_slave.cc b/chrome/renderer/extensions/user_script_slave.cc |
| index dbdec7924398e6dc019162ca012d5d2ff5ce45de..0b6c34b559f8fb9d1371a691fd7423e950a6d37b 100644 |
| --- a/chrome/renderer/extensions/user_script_slave.cc |
| +++ b/chrome/renderer/extensions/user_script_slave.cc |
| @@ -239,7 +239,10 @@ void UserScriptSlave::InjectScripts(WebFrame* frame, |
| // changes to match the parent document after Gmail document.writes into |
| // it to create the editor. |
| // http://code.google.com/p/chromium/issues/detail?id=86742 |
| - GURL data_source_url = GURL(frame->dataSource()->request().url()); |
| + WebKit::WebDataSource* data_source = frame->dataSource() ? |
| + frame->dataSource() : frame->provisionalDataSource(); |
| + DCHECK(data_source); |
|
Aaron Boodman
2011/09/27 06:00:47
You should CHECK this. If NULL, it will crash soon
|
| + GURL data_source_url = GURL(data_source->request().url()); |
| if (data_source_url.is_empty()) |
| return; |