Index: Source/web/WebPluginContainerImpl.cpp |
diff --git a/Source/web/WebPluginContainerImpl.cpp b/Source/web/WebPluginContainerImpl.cpp |
index 9c4b46251b5752f8d3c15b0d8179526976f0f12f..ab3a47e8f97dd029fd461b7cd06905dc06dd83b7 100644 |
--- a/Source/web/WebPluginContainerImpl.cpp |
+++ b/Source/web/WebPluginContainerImpl.cpp |
@@ -597,14 +597,19 @@ v8::Local<v8::Object> WebPluginContainerImpl::scriptableObject(v8::Isolate* isol |
{ |
// The plugin may be destroyed due to re-entrancy when calling |
// v8ScriptableObject below. crbug.com/458776. Hold a reference to the |
- // plugin container to prevent this from happening. |
+ // plugin container to prevent this from happening. For Oilpan, 'this' |
+ // is already stack reachable, so redundant. |
RefPtrWillBeRawPtr<WebPluginContainerImpl> protector(this); |
v8::Local<v8::Object> object = m_webPlugin->v8ScriptableObject(isolate); |
// If the plugin has been destroyed and the reference on the stack is the |
// only one left, then don't return the scriptable object. |
+#if ENABLE(OILPAN) |
+ if (!m_webPlugin) |
raymes
2015/02/24 23:55:26
Hmm I don't really understand what the problem was
raymes
2015/02/24 23:59:29
Actually I think this seems reasonable as it looks
sof
2015/02/25 07:04:49
If it ends up being disposed of, m_webPlugin will
|
+#else |
if (hasOneRef()) |
+#endif |
return v8::Local<v8::Object>(); |
if (!object.IsEmpty()) { |