Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(865)

Unified Diff: Source/core/html/HTMLPlugInElement.cpp

Issue 146523002: Limit the usage of SharedPersistent to ScriptValue only (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLPlugInElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLPlugInElement.cpp
diff --git a/Source/core/html/HTMLPlugInElement.cpp b/Source/core/html/HTMLPlugInElement.cpp
index 0b2df23c31693eb216d32f4f308cd4248aba55c8..883ccb6b6fcd5e789b739d48cae7be35a3d826be 100644
--- a/Source/core/html/HTMLPlugInElement.cpp
+++ b/Source/core/html/HTMLPlugInElement.cpp
@@ -74,7 +74,7 @@ HTMLPlugInElement::HTMLPlugInElement(const QualifiedName& tagName, Document& doc
HTMLPlugInElement::~HTMLPlugInElement()
{
- ASSERT(!m_pluginWrapper); // cleared in detach()
+ ASSERT(m_pluginWrapper.hasNoValue()); // cleared in detach()
ASSERT(!m_isDelayingLoadEvent);
if (m_NPObject) {
@@ -209,20 +209,20 @@ void HTMLPlugInElement::resetInstance()
m_pluginWrapper.clear();
}
-SharedPersistent<v8::Object>* HTMLPlugInElement::pluginWrapper()
+ScriptValue HTMLPlugInElement::pluginWrapper()
{
Frame* frame = document().frame();
if (!frame)
- return 0;
+ return ScriptValue();
// 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_pluginWrapper) {
+ if (m_pluginWrapper.hasNoValue()) {
if (Widget* widget = pluginWidget())
m_pluginWrapper = frame->script().createPluginWrapper(widget);
}
- return m_pluginWrapper.get();
+ return m_pluginWrapper;
}
bool HTMLPlugInElement::dispatchBeforeLoadEvent(const String& sourceURL)
« no previous file with comments | « Source/core/html/HTMLPlugInElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698