summaryrefslogtreecommitdiffstats
path: root/WebCore/html/HTMLPlugInElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/HTMLPlugInElement.cpp')
-rw-r--r--WebCore/html/HTMLPlugInElement.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/WebCore/html/HTMLPlugInElement.cpp b/WebCore/html/HTMLPlugInElement.cpp
index 7334132..4344b3d 100644
--- a/WebCore/html/HTMLPlugInElement.cpp
+++ b/WebCore/html/HTMLPlugInElement.cpp
@@ -32,19 +32,12 @@
#include "HTMLNames.h"
#include "Page.h"
#include "RenderWidget.h"
+#include "ScriptController.h"
#include "Settings.h"
#include "Widget.h"
-#include "ScriptController.h"
-
-#if USE(JSC)
-#include "runtime.h"
-#endif
#if ENABLE(NETSCAPE_PLUGIN_API)
-#include "JSNode.h"
-#include "NP_jsobject.h"
#include "npruntime_impl.h"
-#include "runtime_root.h"
#endif
namespace WebCore {
@@ -52,7 +45,8 @@ namespace WebCore {
using namespace HTMLNames;
HTMLPlugInElement::HTMLPlugInElement(const QualifiedName& tagName, Document* doc)
- : HTMLFrameOwnerElement(tagName, doc)
+ // FIXME: Always passing false as createdByParser is odd (see bug22851).
+ : HTMLFrameOwnerElement(tagName, doc, false)
#if ENABLE(NETSCAPE_PLUGIN_API)
, m_NPObject(0)
#endif
@@ -61,9 +55,7 @@ HTMLPlugInElement::HTMLPlugInElement(const QualifiedName& tagName, Document* doc
HTMLPlugInElement::~HTMLPlugInElement()
{
-#if USE(JSC)
ASSERT(!m_instance); // cleared in detach()
-#endif
#if ENABLE(NETSCAPE_PLUGIN_API)
if (m_NPObject) {
@@ -73,14 +65,13 @@ HTMLPlugInElement::~HTMLPlugInElement()
#endif
}
-#if USE(JSC)
void HTMLPlugInElement::detach()
{
m_instance.clear();
HTMLFrameOwnerElement::detach();
}
-JSC::Bindings::Instance* HTMLPlugInElement::getInstance() const
+PassScriptInstance HTMLPlugInElement::getInstance() const
{
Frame* frame = document()->frame();
if (!frame)
@@ -89,15 +80,14 @@ JSC::Bindings::Instance* HTMLPlugInElement::getInstance() const
// If the host dynamically turns off JavaScript (or Java) we will still return
// the cached allocated Bindings::Instance. Not supporting this edge-case is OK.
if (m_instance)
- return m_instance.get();
+ return m_instance;
RenderWidget* renderWidget = renderWidgetForJSBindings();
if (renderWidget && renderWidget->widget())
m_instance = frame->script()->createScriptInstanceForWidget(renderWidget->widget());
- return m_instance.get();
+ return m_instance;
}
-#endif
String HTMLPlugInElement::align() const
{