| Index: webkit/glue/plugins/test/plugin_npobject_lifetime_test.cc
|
| ===================================================================
|
| --- webkit/glue/plugins/test/plugin_npobject_lifetime_test.cc (revision 42644)
|
| +++ webkit/glue/plugins/test/plugin_npobject_lifetime_test.cc (working copy)
|
| @@ -21,6 +21,9 @@
|
| }
|
|
|
| NPError NPObjectLifetimeTest::SetWindow(NPWindow* pNPWindow) {
|
| + if (pNPWindow->window == NULL)
|
| + return NPERR_NO_ERROR;
|
| +
|
| HWND window_handle = reinterpret_cast<HWND>(pNPWindow->window);
|
| if (!::GetProp(window_handle, L"Plugin_Instance")) {
|
| ::SetProp(window_handle, L"Plugin_Instance", this);
|
| @@ -84,6 +87,9 @@
|
| }
|
|
|
| NPError NPObjectLifetimeTestInstance2::SetWindow(NPWindow* pNPWindow) {
|
| + if (pNPWindow->window == NULL)
|
| + return NPERR_NO_ERROR;
|
| +
|
| if (!plugin_instance_object_) {
|
| if (!HostFunctions()->getvalue(id(), NPNVWindowNPObject,
|
| &plugin_instance_object_)) {
|
| @@ -113,6 +119,9 @@
|
| }
|
|
|
| NPError NPObjectDeletePluginInNPN_Evaluate::SetWindow(NPWindow* np_window) {
|
| + if (np_window->window == NULL)
|
| + return NPERR_NO_ERROR;
|
| +
|
| HWND window_handle = reinterpret_cast<HWND>(np_window->window);
|
| // We setup a timerproc to invoke NPN_Evaluate to destroy this plugin
|
| // instance. This is to ensure that we don't destroy the plugin instance
|
|
|