Skip to content
Snippets Groups Projects
Commit 7463a364 authored by cpu@chromium.org's avatar cpu@chromium.org
Browse files

Merge 75568 - Preload IME for the flash sandbox plugin

Before we lock down (call LowerToken()) we force the IME subsystem to load, so the
required resources are acquired.

Typical sites that show the issue are weathernews.jp and www.nicovideo.jp

BUG=66605
TEST=see bug


Review URL: http://codereview.chromium.org/6551002

TBR=cpu@chromium.org
Review URL: http://codereview.chromium.org/6541083

git-svn-id: svn://svn.chromium.org/chrome/branches/648/src@75639 0039d316-1c4b-4281-b951-d872f2087c98
parent 93d1ae72
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,18 @@ bool IsPluginBuiltInFlash(const CommandLine& cmd_line) {
return (path.BaseName() == FilePath(L"gcswf32.dll"));
}
// Before we lock down the flash sandbox, we need to activate
// the IME machinery. After lock down it seems it is unable
// to start. Note that we leak the IME context on purpose.
int PreloadIMEForFlash() {
HIMC imc = ::ImmCreateContext();
if (!imc)
return 0;
if (::ImmGetOpenStatus(imc))
return 1;
return 2;
}
#endif
// main() routine for running as the plugin process.
......@@ -133,6 +145,8 @@ int PluginMain(const MainFunctionParams& parameters) {
// start elevated and it will call DelayedLowerToken(0) when it's ready.
if (IsPluginBuiltInFlash(parsed_command_line)) {
DVLOG(1) << "Sandboxing flash";
if (!PreloadIMEForFlash())
DVLOG(1) << "IME preload failed";
DelayedLowerToken(target_services);
} else {
target_services->LowerToken();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment