| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 } | 584 } |
| 585 | 585 |
| 586 WebLayer* WebPluginContainerImpl::platformLayer() const | 586 WebLayer* WebPluginContainerImpl::platformLayer() const |
| 587 { | 587 { |
| 588 return m_webLayer; | 588 return m_webLayer; |
| 589 } | 589 } |
| 590 | 590 |
| 591 v8::Local<v8::Object> WebPluginContainerImpl::scriptableObject(v8::Isolate* isol
ate) | 591 v8::Local<v8::Object> WebPluginContainerImpl::scriptableObject(v8::Isolate* isol
ate) |
| 592 { | 592 { |
| 593 v8::Local<v8::Object> object = m_webPlugin->v8ScriptableObject(isolate); | 593 v8::Local<v8::Object> object = m_webPlugin->v8ScriptableObject(isolate); |
| 594 // |m_webPlugin| may be destroyed during the above line due to re-entrancy |
| 595 // caused by sync messages to the plugin. If this is the case just return an |
| 596 // empty handle. crbug.com/423263. |
| 597 if (!m_webPlugin) |
| 598 return v8::Local<v8::Object>(); |
| 599 |
| 594 if (!object.IsEmpty()) { | 600 if (!object.IsEmpty()) { |
| 595 // WebPlugin implementation can't provide the obsolete NPObject at the s
ame time: | 601 // WebPlugin implementation can't provide the obsolete NPObject at the s
ame time: |
| 596 ASSERT(!m_webPlugin->scriptableObject()); | 602 ASSERT(!m_webPlugin->scriptableObject()); |
| 597 return object; | 603 return object; |
| 598 } | 604 } |
| 599 | 605 |
| 600 NPObject* npObject = m_webPlugin->scriptableObject(); | 606 NPObject* npObject = m_webPlugin->scriptableObject(); |
| 601 if (npObject) | 607 if (npObject) |
| 602 return createV8ObjectForNPObject(isolate, npObject, 0); | 608 return createV8ObjectForNPObject(isolate, npObject, 0); |
| 603 return v8::Local<v8::Object>(); | 609 return v8::Local<v8::Object>(); |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 | 979 |
| 974 return clipRect; | 980 return clipRect; |
| 975 } | 981 } |
| 976 | 982 |
| 977 bool WebPluginContainerImpl::pluginShouldPersist() const | 983 bool WebPluginContainerImpl::pluginShouldPersist() const |
| 978 { | 984 { |
| 979 return m_webPlugin->shouldPersist(); | 985 return m_webPlugin->shouldPersist(); |
| 980 } | 986 } |
| 981 | 987 |
| 982 } // namespace blink | 988 } // namespace blink |
| OLD | NEW |