| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 ReleaseSafariBrowserWindow(mac_cocoa_window_); | 208 ReleaseSafariBrowserWindow(mac_cocoa_window_); |
| 209 #endif | 209 #endif |
| 210 UnmapAll(); | 210 UnmapAll(); |
| 211 | 211 |
| 212 // Delete the StreamManager to cleanup any streams that are in midflight. | 212 // Delete the StreamManager to cleanup any streams that are in midflight. |
| 213 // This needs to happen here, before the client is deleted as the streams | 213 // This needs to happen here, before the client is deleted as the streams |
| 214 // could be holding references to FileRequest objects. | 214 // could be holding references to FileRequest objects. |
| 215 stream_manager_.reset(NULL); | 215 stream_manager_.reset(NULL); |
| 216 | 216 |
| 217 delete client_; | 217 delete client_; |
| 218 client_ = NULL; |
| 219 |
| 218 // Release the graphics context before deletion. | 220 // Release the graphics context before deletion. |
| 219 DeleteRenderer(); | 221 DeleteRenderer(); |
| 220 | 222 |
| 221 delete features_; | 223 delete features_; |
| 224 features_ = NULL; |
| 222 | 225 |
| 223 // There is a reference cycle between the V8 bridge and the plugin. | 226 // There is a reference cycle between the V8 bridge and the plugin. |
| 224 // Explicitly remove all V8 references during tear-down, so that the cycle is | 227 // Explicitly remove all V8 references during tear-down, so that the cycle is |
| 225 // broken, and the reference counting system will successfully delete the | 228 // broken, and the reference counting system will successfully delete the |
| 226 // plugin. | 229 // plugin. |
| 227 np_v8_bridge_.ReleaseNPObjects(); | 230 np_v8_bridge_.ReleaseNPObjects(); |
| 228 } | 231 } |
| 229 | 232 |
| 230 void PluginObject::CreateRenderer(const o3d::DisplayWindow& display_window) { | 233 void PluginObject::CreateRenderer(const o3d::DisplayWindow& display_window) { |
| 231 renderer_ = o3d::Renderer::CreateDefaultRenderer(&service_locator_); | 234 renderer_ = o3d::Renderer::CreateDefaultRenderer(&service_locator_); |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 PluginObject *plugin_object = static_cast<PluginObject *>(npp->pdata); | 878 PluginObject *plugin_object = static_cast<PluginObject *>(npp->pdata); |
| 876 if (plugin_object) { // May not be initialized yet. | 879 if (plugin_object) { // May not be initialized yet. |
| 877 return plugin_object->client()->ProfileToString(); | 880 return plugin_object->client()->ProfileToString(); |
| 878 } else { | 881 } else { |
| 879 return ""; | 882 return ""; |
| 880 } | 883 } |
| 881 } | 884 } |
| 882 | 885 |
| 883 } // namespace globals | 886 } // namespace globals |
| 884 } // namespace glue | 887 } // namespace glue |
| OLD | NEW |