| Index: components/plugins/renderer/webview_plugin.cc
|
| diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc
|
| index 6200094c08b4ac6035218dddb1c50cad9f0133df..6ecab2c8d838e17ea4de6f47f3736f062119ef5d 100644
|
| --- a/components/plugins/renderer/webview_plugin.cc
|
| +++ b/components/plugins/renderer/webview_plugin.cc
|
| @@ -45,7 +45,7 @@ using content::WebPreferences;
|
| WebViewPlugin::WebViewPlugin(WebViewPlugin::Delegate* delegate,
|
| const WebPreferences& preferences)
|
| : delegate_(delegate),
|
| - container_(NULL),
|
| + container_(nullptr),
|
| web_view_(WebView::create(this)),
|
| finished_loading_(false),
|
| focused_(false) {
|
| @@ -61,6 +61,7 @@ WebViewPlugin* WebViewPlugin::Create(WebViewPlugin::Delegate* delegate,
|
| const WebPreferences& preferences,
|
| const std::string& html_data,
|
| const GURL& url) {
|
| + DCHECK(url.is_valid()) << "Blink requires the WebView to have a valid URL.";
|
| WebViewPlugin* plugin = new WebViewPlugin(delegate, preferences);
|
| plugin->web_view()->mainFrame()->loadHTMLString(html_data, url);
|
| return plugin;
|
| @@ -122,9 +123,9 @@ bool WebViewPlugin::initialize(WebPluginContainer* container) {
|
| void WebViewPlugin::destroy() {
|
| if (delegate_) {
|
| delegate_->PluginDestroyed();
|
| - delegate_ = NULL;
|
| + delegate_ = nullptr;
|
| }
|
| - container_ = NULL;
|
| + container_ = nullptr;
|
| base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
|
| }
|
|
|
| @@ -261,6 +262,7 @@ void WebViewPlugin::scheduleAnimation() {
|
| }
|
|
|
| void WebViewPlugin::didClearWindowObject(WebLocalFrame* frame) {
|
| + DCHECK_EQ(web_frame_, frame);
|
| if (delegate_)
|
| delegate_->BindWebFrame(frame);
|
| }
|
|
|