Chromium Code Reviews| Index: Source/bindings/v8/V8BindingMacros.h |
| diff --git a/Source/bindings/v8/V8BindingMacros.h b/Source/bindings/v8/V8BindingMacros.h |
| index 1dc394acfe3ba66c63af186c05df988d07bff798..5fb8630d5d587eb53773566871185d4214f1e131 100644 |
| --- a/Source/bindings/v8/V8BindingMacros.h |
| +++ b/Source/bindings/v8/V8BindingMacros.h |
| @@ -71,28 +71,34 @@ namespace WebCore { |
| } |
| #define TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(var, value, exceptionState) \ |
| - var = (value); \ |
| - if (UNLIKELY(block.HasCaught())) \ |
| - exceptionState.rethrowV8Exception(block.Exception()); \ |
| - if (UNLIKELY(exceptionState.throwIfNeeded())) \ |
| + var = (value); \ |
| + if (UNLIKELY(block.HasCaught())) { \ |
| + exceptionState.rethrowV8Exception(block.Exception()); \ |
|
Jens Widell
2014/06/16 11:56:39
Given current usage of this macro and the one belo
yhirano
2014/06/17 11:10:02
Done.
|
| + return; \ |
| + } \ |
| + if (UNLIKELY(exceptionState.throwIfNeeded())) \ |
| return; |
| -#define TONATIVE_VOID_EXCEPTIONSTATE(type, var, value, exceptionState) \ |
| - type var; \ |
| - { \ |
| - v8::TryCatch block; \ |
| +#define TONATIVE_VOID_EXCEPTIONSTATE(type, var, value, exceptionState) \ |
| + type var; \ |
| + { \ |
| + v8::TryCatch block; \ |
| + V8RethrowTryCatchScope rethrow(block); \ |
| TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(var, value, exceptionState); \ |
| } |
| #define TONATIVE_DEFAULT_EXCEPTIONSTATE(type, var, value, exceptionState, retVal) \ |
| - type var; \ |
| - { \ |
| - v8::TryCatch block; \ |
| - var = (value); \ |
| - if (UNLIKELY(block.HasCaught())) \ |
| - exceptionState.rethrowV8Exception(block.Exception()); \ |
| - if (UNLIKELY(exceptionState.throwIfNeeded())) \ |
| - return retVal; \ |
| + type var; \ |
| + { \ |
| + v8::TryCatch block; \ |
| + V8RethrowTryCatchScope rethrow(block); \ |
| + var = (value); \ |
| + if (UNLIKELY(block.HasCaught())) { \ |
| + exceptionState.rethrowV8Exception(block.Exception()); \ |
| + return retVal; \ |
| + } \ |
| + if (UNLIKELY(exceptionState.throwIfNeeded())) \ |
| + return retVal; \ |
| } |
| // type is an instance of class template V8StringResource<>, |