diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-25 20:05:45 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-25 20:05:45 +0000 |
commit | eab113f82537b904c52912663d625cb6afefa3b0 (patch) | |
tree | 28a488f33fb0f162aa1c1e6b99f20cfc54424bce /webkit | |
parent | 5fe90ea611c57e45d82b1982e600f9d6ca142a98 (diff) | |
download | chromium_src-eab113f82537b904c52912663d625cb6afefa3b0.zip chromium_src-eab113f82537b904c52912663d625cb6afefa3b0.tar.gz chromium_src-eab113f82537b904c52912663d625cb6afefa3b0.tar.bz2 |
Revert 24266 - This CL ensures that plugins always peek in the context of outgoing sync calls.
I will be watching the reliability test runs closely for any crashes which creep in due to reentrancies into plugins caused by this CL.
This fixes bug http://code.google.com/p/chromium/issues/detail?id=15985
It is a touch tricky to implement a test case for this. Will add one hopefully in a subsequent CL
Bug=15985
Test=Covered by UI test
Review URL: http://codereview.chromium.org/173211
TBR=ananta@chromium.org
Review URL: http://codereview.chromium.org/173384
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24296 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/test/plugin_client.cc | 3 | ||||
-rw-r--r-- | webkit/glue/plugins/test/plugin_windowed_test.cc | 9 | ||||
-rw-r--r-- | webkit/tools/npapi_layout_test_plugin/PluginObject.cpp | 15 |
3 files changed, 5 insertions, 22 deletions
diff --git a/webkit/glue/plugins/test/plugin_client.cc b/webkit/glue/plugins/test/plugin_client.cc index dfa151d..bcad2a8 100644 --- a/webkit/glue/plugins/test/plugin_client.cc +++ b/webkit/glue/plugins/test/plugin_client.cc @@ -155,8 +155,7 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, // TODO(port): plugin_windowed_test.*. } else if (test_name == "hidden_plugin" || test_name == "create_instance_in_paint" || - test_name == "alert_in_window_message" || - test_name == "src_plugin_for_outgoing_sync_call") { + test_name == "alert_in_window_message") { new_test = new NPAPIClient::WindowedPluginTest(instance, NPAPIClient::PluginClient::HostFunctions()); #endif diff --git a/webkit/glue/plugins/test/plugin_windowed_test.cc b/webkit/glue/plugins/test/plugin_windowed_test.cc index ace8a4a..3a15ae0 100644 --- a/webkit/glue/plugins/test/plugin_windowed_test.cc +++ b/webkit/glue/plugins/test/plugin_windowed_test.cc @@ -33,8 +33,7 @@ NPError WindowedPluginTest::SetWindow(NPWindow* pNPWindow) { } if ((test_name() == "create_instance_in_paint" && test_id() == "1") || - test_name() == "alert_in_window_message" || - test_name() == "src_plugin_for_outgoing_sync_call") { + test_name() == "alert_in_window_message") { static ATOM window_class = 0; if (!window_class) { WNDCLASSEX wcex; @@ -97,12 +96,6 @@ LRESULT CALLBACK WindowedPluginTest::WindowProc( // and verify that we don't hang the browser. CallJSFunction(this_ptr, "CallAlert"); CallJSFunction(this_ptr, "CallAlert"); - } else if (this_ptr->test_name() == "src_plugin_for_outgoing_sync_call" && - message == WM_PAINT) { - this_ptr->done_ = true; - SetFocus(window); - CallJSFunction(this_ptr, "SetFocusToPlugin2"); - this_ptr->SignalTestCompleted(); } } diff --git a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp index 26abd8d..2bfab8f 100644 --- a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp +++ b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp @@ -72,8 +72,7 @@ static bool identifiersInitialized = false; #define ID_PROPERTY_LOG_DESTROY 4 #define ID_PROPERTY_RETURN_ERROR_FROM_NEWSTREAM 5 #define ID_PROPERTY_TEST_OBJECT_COUNT 6 -#define ID_PROPERTY_RESET_FOCUS 7 -#define NUM_PROPERTY_IDENTIFIERS 8 +#define NUM_PROPERTY_IDENTIFIERS 7 static NPIdentifier pluginPropertyIdentifiers[NUM_PROPERTY_IDENTIFIERS]; static const NPUTF8 *pluginPropertyIdentifierNames[NUM_PROPERTY_IDENTIFIERS] = { @@ -84,7 +83,6 @@ static const NPUTF8 *pluginPropertyIdentifierNames[NUM_PROPERTY_IDENTIFIERS] = { "logDestroy", "returnErrorFromNewStream", "testObjectCount", - "resetFocus" }; #define ID_TEST_CALLBACK_METHOD 0 @@ -213,13 +211,6 @@ static bool pluginSetProperty(NPObject* obj, NPIdentifier name, const NPVariant* } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_RETURN_ERROR_FROM_NEWSTREAM]) { plugin->returnErrorFromNewStream = NPVARIANT_TO_BOOLEAN(*variant); return true; - } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_RESET_FOCUS]) { -#ifdef OS_WIN - if (NPVARIANT_TO_BOOLEAN(*variant)) { - SetFocus(NULL); - } - return true; -#endif // OS_WIN } return false; @@ -757,9 +748,9 @@ static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* a return testCallbackAndGetValue(plugin, args, argCount, result); } else if (name == pluginMethodIdentifiers[ID_TEST_CONSTRUCT]) { return testConstruct(plugin, args, argCount, result); - } else if (name == pluginMethodIdentifiers[ID_DESTROY_NULL_STREAM]) + } else if (name == pluginMethodIdentifiers[ID_DESTROY_NULL_STREAM]) return destroyNullStream(plugin, args, argCount, result); - + return false; } |