From d568c25e23bec568b4e0dfe7c966d8d0a32fe986 Mon Sep 17 00:00:00 2001 From: anthony taranto Date: Wed, 4 Apr 2012 00:26:38 -0700 Subject: [PATCH] ScriptCore::Evaluate(): always call WaitForSingleObject() --- CefSharp/ScriptCore.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CefSharp/ScriptCore.cpp b/CefSharp/ScriptCore.cpp index d191326be..2ad9ea694 100644 --- a/CefSharp/ScriptCore.cpp +++ b/CefSharp/ScriptCore.cpp @@ -80,15 +80,15 @@ namespace CefSharp { CefPostTask(TID_UI, NewCefRunnableMethod(this, &ScriptCore::UIT_Evaluate, browser, script)); + } - switch (WaitForSingleObject(_event, timeout)) - { - case WAIT_TIMEOUT: - throw gcnew ScriptException("Script timed out"); - case WAIT_ABANDONED: - case WAIT_FAILED: - throw gcnew ScriptException("Script error"); - } + switch (WaitForSingleObject(_event, timeout)) + { + case WAIT_TIMEOUT: + throw gcnew ScriptException("Script timed out"); + case WAIT_ABANDONED: + case WAIT_FAILED: + throw gcnew ScriptException("Script error"); } if (_exception)