Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: ppapi/tests/test_message_handler.cc

Issue 589213003: PPAPI: Never re-enter JavaScript for PostMessage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make MessageChannel observer clean up more reliably, guarantee HungPluginFilter stays alive long en… Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_message_handler.cc
diff --git a/ppapi/tests/test_message_handler.cc b/ppapi/tests/test_message_handler.cc
index c6259584f4e0f024040bb900b6e48ec4beb9ee11..7dc933dde74ff2c134ccfb3a79092a3968e2fa10 100644
--- a/ppapi/tests/test_message_handler.cc
+++ b/ppapi/tests/test_message_handler.cc
@@ -279,13 +279,8 @@ std::string TestMessageHandler::TestPostMessageAndAwaitResponse() {
js_code += values_to_test[i];
js_code += " result: \" + result);\n";
}
- // TODO(dmichael): Setting a property uses GetInstanceObject, which sends sync
- // message, which can get interrupted with message to eval script, etc.
- // FINISHED_WAITING message can therefore jump ahead. This test is
- // currently carefully crafted to avoid races by doing all the JS in one call.
- // That should be fixed before this API goes to stable. See crbug.com/384528
- js_code += "plugin.postMessage('FINISHED_TEST');\n";
instance_->EvalScript(js_code);
+ instance_->EvalScript("plugin.postMessage('FINISHED_TEST');\n");
handler.WaitForTestFinishedMessage();
handler.Unregister();
ASSERT_SUBTEST_SUCCESS(handler.WaitForDestroy());
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698