| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 } | 79 } |
| 80 | 80 |
| 81 void WebHelperPluginImpl::reallyDestroy(TimerBase*) { | 81 void WebHelperPluginImpl::reallyDestroy(TimerBase*) { |
| 82 if (m_pluginContainer) | 82 if (m_pluginContainer) |
| 83 m_pluginContainer->dispose(); | 83 m_pluginContainer->dispose(); |
| 84 delete this; | 84 delete this; |
| 85 } | 85 } |
| 86 | 86 |
| 87 void WebHelperPluginImpl::destroy() { | 87 void WebHelperPluginImpl::destroy() { |
| 88 // Defer deletion so we don't do too much work when called via | 88 // Defer deletion so we don't do too much work when called via |
| 89 // stopActiveDOMObjects(). | 89 // stopSuspendableObjects(). |
| 90 // FIXME: It's not clear why we still need this. The original code held a | 90 // FIXME: It's not clear why we still need this. The original code held a |
| 91 // Page and a WebFrame, and destroying it would cause JavaScript triggered by | 91 // Page and a WebFrame, and destroying it would cause JavaScript triggered by |
| 92 // frame detach to run, which isn't allowed inside stopActiveDOMObjects(). | 92 // frame detach to run, which isn't allowed inside stopSuspendableObjects(). |
| 93 // Removing this causes one Chrome test to fail with a timeout. | 93 // Removing this causes one Chrome test to fail with a timeout. |
| 94 m_destructionTimer.startOneShot(0, BLINK_FROM_HERE); | 94 m_destructionTimer.startOneShot(0, BLINK_FROM_HERE); |
| 95 } | 95 } |
| 96 | 96 |
| 97 WebPlugin* WebHelperPluginImpl::getPlugin() { | 97 WebPlugin* WebHelperPluginImpl::getPlugin() { |
| 98 DCHECK(m_pluginContainer); | 98 DCHECK(m_pluginContainer); |
| 99 DCHECK(m_pluginContainer->plugin()); | 99 DCHECK(m_pluginContainer->plugin()); |
| 100 return m_pluginContainer->plugin(); | 100 return m_pluginContainer->plugin(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace blink | 103 } // namespace blink |
| OLD | NEW |