Index: Source/bindings/v8/V8BindingMacros.h |
diff --git a/Source/bindings/v8/V8BindingMacros.h b/Source/bindings/v8/V8BindingMacros.h |
index 1dc394acfe3ba66c63af186c05df988d07bff798..1abb3233b80b58d42a3e03bee83d8533635d9449 100644 |
--- a/Source/bindings/v8/V8BindingMacros.h |
+++ b/Source/bindings/v8/V8BindingMacros.h |
@@ -71,28 +71,26 @@ namespace WebCore { |
} |
#define TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(var, value, exceptionState) \ |
- var = (value); \ |
- if (UNLIKELY(block.HasCaught())) \ |
- exceptionState.rethrowV8Exception(block.Exception()); \ |
- if (UNLIKELY(exceptionState.throwIfNeeded())) \ |
- return; |
+ var = (value); \ |
+ if (UNLIKELY(block.HasCaught() || 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.throwIfNeeded())) \ |
+ return retVal; \ |
} |
// type is an instance of class template V8StringResource<>, |