Index: Source/bindings/v8/V8BindingMacros.h |
diff --git a/Source/bindings/v8/V8BindingMacros.h b/Source/bindings/v8/V8BindingMacros.h |
index e5841c9beda84810daf9ed7ea80f01cb7aca48cd..1aa5ced3de2ff738a6a903469cdbd743f6d5dddb 100644 |
--- a/Source/bindings/v8/V8BindingMacros.h |
+++ b/Source/bindings/v8/V8BindingMacros.h |
@@ -46,15 +46,18 @@ namespace WebCore { |
return block.ReThrow(); \ |
} |
+#define TONATIVE_VOID_INTERNAL(var, value) \ |
+ var = (value); \ |
+ if (UNLIKELY(block.HasCaught())) { \ |
+ block.ReThrow(); \ |
+ return; \ |
+ } |
+ |
#define TONATIVE_VOID(type, var, value) \ |
type var; \ |
{ \ |
v8::TryCatch block; \ |
- var = (value); \ |
- if (UNLIKELY(block.HasCaught())) { \ |
- block.ReThrow(); \ |
- return; \ |
- } \ |
+ TONATIVE_VOID_INTERNAL(var, value); \ |
} |
#define TONATIVE_DEFAULT(type, var, value, retVal) \ |
@@ -68,15 +71,18 @@ namespace WebCore { |
} \ |
} |
-#define TONATIVE_VOID_EXCEPTIONSTATE(type, var, value, exceptionState) \ |
- type var; \ |
- { \ |
- v8::TryCatch block; \ |
- var = (value); \ |
- if (UNLIKELY(block.HasCaught())) \ |
- exceptionState.rethrowV8Exception(block.Exception()); \ |
- if (UNLIKELY(exceptionState.throwIfNeeded())) \ |
- return; \ |
+#define TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(var, value, exceptionState) \ |
+ var = (value); \ |
+ if (UNLIKELY(block.HasCaught())) \ |
+ exceptionState.rethrowV8Exception(block.Exception()); \ |
+ if (UNLIKELY(exceptionState.throwIfNeeded())) \ |
+ return; |
+ |
+#define TONATIVE_VOID_EXCEPTIONSTATE(type, var, value, exceptionState) \ |
+ type var; \ |
+ { \ |
+ v8::TryCatch block; \ |
+ TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(var, value, exceptionState); \ |
} |
#define TONATIVE_DEFAULT_EXCEPTIONSTATE(type, var, value, exceptionState, retVal) \ |
@@ -98,6 +104,18 @@ namespace WebCore { |
if (UNLIKELY(!var.prepare())) \ |
return; |
+#define TOSTRING_VOID_INTERNAL(var, value) \ |
+ var = (value); \ |
+ if (UNLIKELY(!var.prepare())) \ |
+ return; |
+ |
+#define TOSTRING_VOID_INTERNAL_RETHROW(var, value, block) \ |
+ var = (value); \ |
+ if (UNLIKELY(!var.prepare())) { \ |
+ block.ReThrow(); \ |
+ return; \ |
+ } |
+ |
#define TOSTRING_DEFAULT(type, var, value, retVal) \ |
type var(value); \ |
if (UNLIKELY(!var.prepare())) \ |