| Index: third_party/WebKit/Source/core/html/PluginDocument.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/PluginDocument.cpp b/third_party/WebKit/Source/core/html/PluginDocument.cpp
|
| index e92d21952d6b71c5b3bbb59eb6d91c3e71ec8c82..84d6e6b1ae1e85588e455ff8d9cb7d77931b8903 100644
|
| --- a/third_party/WebKit/Source/core/html/PluginDocument.cpp
|
| +++ b/third_party/WebKit/Source/core/html/PluginDocument.cpp
|
| @@ -93,10 +93,14 @@ void PluginDocumentParser::createDocumentStructure()
|
| rootElement->insertedByParser();
|
| document()->appendChild(rootElement);
|
| frame->loader().dispatchDocumentElementAvailable();
|
| + if (isStopped())
|
| + return;
|
|
|
| RefPtrWillBeRawPtr<HTMLBodyElement> body = HTMLBodyElement::create(*document());
|
| body->setAttribute(styleAttr, "background-color: rgb(38,38,38); height: 100%; width: 100%; overflow: hidden; margin: 0");
|
| rootElement->appendChild(body);
|
| + if (isStopped())
|
| + return;
|
|
|
| m_embedElement = HTMLEmbedElement::create(*document());
|
| m_embedElement->setAttribute(widthAttr, "100%");
|
| @@ -106,6 +110,8 @@ void PluginDocumentParser::createDocumentStructure()
|
| m_embedElement->setAttribute(srcAttr, AtomicString(document()->url().string()));
|
| m_embedElement->setAttribute(typeAttr, document()->loader()->mimeType());
|
| body->appendChild(m_embedElement);
|
| + if (isStopped())
|
| + return;
|
|
|
| toPluginDocument(document())->setPluginNode(m_embedElement.get());
|
|
|
| @@ -116,6 +122,8 @@ void PluginDocumentParser::createDocumentStructure()
|
| frame->view()->flushAnyPendingPostLayoutTasks();
|
| // Focus the plugin here, as the line above is where the plugin is created.
|
| m_embedElement->focus();
|
| + if (isStopped())
|
| + return;
|
|
|
| if (PluginView* view = pluginView())
|
| view->didReceiveResponse(document()->loader()->response());
|
| @@ -123,8 +131,11 @@ void PluginDocumentParser::createDocumentStructure()
|
|
|
| void PluginDocumentParser::appendBytes(const char* data, size_t length)
|
| {
|
| - if (!m_embedElement)
|
| + if (!m_embedElement) {
|
| createDocumentStructure();
|
| + if (isStopped())
|
| + return;
|
| + }
|
|
|
| if (!length)
|
| return;
|
|
|