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

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

Issue 147333004: Revert of 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 883ccb6b6fcd5e789b739d48cae7be35a3d826be..0b2df23c31693eb216d32f4f308cd4248aba55c8 100644
--- a/Source/core/html/HTMLPlugInElement.cpp
+++ b/Source/core/html/HTMLPlugInElement.cpp
@@ -74,7 +74,7 @@
HTMLPlugInElement::~HTMLPlugInElement()
{
- ASSERT(m_pluginWrapper.hasNoValue()); // cleared in detach()
+ ASSERT(!m_pluginWrapper); // cleared in detach()
ASSERT(!m_isDelayingLoadEvent);
if (m_NPObject) {
@@ -209,20 +209,20 @@
m_pluginWrapper.clear();
}
-ScriptValue HTMLPlugInElement::pluginWrapper()
+SharedPersistent<v8::Object>* HTMLPlugInElement::pluginWrapper()
{
Frame* frame = document().frame();
if (!frame)
- return ScriptValue();
+ return 0;
// 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.hasNoValue()) {
+ if (!m_pluginWrapper) {
if (Widget* widget = pluginWidget())
m_pluginWrapper = frame->script().createPluginWrapper(widget);
}
- return m_pluginWrapper;
+ return m_pluginWrapper.get();
}
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