From ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Thu, 8 Jul 2010 12:51:48 +0100 Subject: Merge WebKit at r62496: Initial merge by git Change-Id: Ie3da0770eca22a70a632e3571f31cfabc80facb2 --- WebCore/bindings/v8/custom/V8BindingMacros.h | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'WebCore/bindings/v8/custom/V8BindingMacros.h') diff --git a/WebCore/bindings/v8/custom/V8BindingMacros.h b/WebCore/bindings/v8/custom/V8BindingMacros.h index 16c3651..4c8ecd3 100644 --- a/WebCore/bindings/v8/custom/V8BindingMacros.h +++ b/WebCore/bindings/v8/custom/V8BindingMacros.h @@ -28,11 +28,21 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define EXCEPTION_BLOCK(type, var, value) \ - type var; \ - { \ - v8::TryCatch block; \ - var = value; \ - if (block.HasCaught()) \ - return throwError(block.Exception()); \ +#define EXCEPTION_BLOCK(type, var, value) \ + type var; \ + { \ + v8::TryCatch block; \ + var = (value); \ + if (block.HasCaught()) \ + return block.ReThrow(); \ + } + +#define TO_WEBCORE_STRING_EXCEPTION_BLOCK(var, value) \ + String var; \ + { \ + v8::TryCatch block; \ + v8::Handle v8String = (value)->ToString(); \ + if (block.HasCaught()) \ + return block.ReThrow(); \ + var = v8StringToWebCoreString(v8String, DoNotExternalize); \ } -- cgit v1.1