| Index: Source/bindings/core/v8/V8BindingMacros.h
|
| diff --git a/Source/bindings/core/v8/V8BindingMacros.h b/Source/bindings/core/v8/V8BindingMacros.h
|
| index 320cff6709bc0214451db6363bb4e03dfc294f1f..9c96cfa0dcc0db05b35c45d8b321a9dc3eaad97d 100644
|
| --- a/Source/bindings/core/v8/V8BindingMacros.h
|
| +++ b/Source/bindings/core/v8/V8BindingMacros.h
|
| @@ -37,26 +37,14 @@ namespace blink {
|
| // TO*_RETURNTYPE[_ARGTYPE]...
|
| // ...using _DEFAULT instead of _ANY..._ANY when returing a default value.
|
|
|
| -#define TONATIVE_EXCEPTION(type, var, value) \
|
| - type var; \
|
| - { \
|
| - v8::TryCatch block; \
|
| - var = (value); \
|
| - if (UNLIKELY(block.HasCaught())) \
|
| - return block.ReThrow(); \
|
| - }
|
| -
|
| -#define TONATIVE_VOID_INTERNAL(var, value) \
|
| - var = (value); \
|
| - if (UNLIKELY(block.HasCaught())) \
|
| - return;
|
| -
|
| #define TONATIVE_VOID(type, var, value) \
|
| type var; \
|
| { \
|
| v8::TryCatch block; \
|
| V8RethrowTryCatchScope rethrow(block); \
|
| - TONATIVE_VOID_INTERNAL(var, value); \
|
| + var = (value); \
|
| + if (UNLIKELY(block.HasCaught())) \
|
| + return; \
|
| }
|
|
|
| #define TONATIVE_DEFAULT(type, var, value, retVal) \
|
| @@ -70,58 +58,11 @@ namespace blink {
|
| } \
|
| }
|
|
|
| -// We need to cancel the exception propergation when we return a rejected
|
| -// Promise.
|
| -#define TONATIVE_VOID_PROMISE_INTERNAL(var, value, info) \
|
| - var = (value); \
|
| - if (UNLIKELY(block.HasCaught())) { \
|
| - v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), block.Exception())); \
|
| - block.Reset(); \
|
| - return; \
|
| - }
|
| -
|
| -#define TONATIVE_VOID_PROMISE(type, var, value, info) \
|
| - type var; \
|
| - { \
|
| - v8::TryCatch block; \
|
| - TONATIVE_VOID_PROMISE_INTERNAL(var, value, info); \
|
| - }
|
| -
|
| -
|
| -#define TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(var, value, exceptionState) \
|
| - var = (value); \
|
| - if (UNLIKELY(exceptionState.throwIfNeeded())) \
|
| - return; \
|
| -
|
| #define TONATIVE_VOID_EXCEPTIONSTATE(type, var, value, exceptionState) \
|
| - type var; \
|
| - var = (value); \
|
| - if (UNLIKELY(exceptionState.throwIfNeeded())) \
|
| - return;
|
| -
|
| -#define TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(value, exceptionState) \
|
| - (value); \
|
| + type var(value); \
|
| if (UNLIKELY(exceptionState.throwIfNeeded())) \
|
| return;
|
|
|
| -#define TONATIVE_DEFAULT_EXCEPTIONSTATE(type, var, value, exceptionState, retVal) \
|
| - type var = (value); \
|
| - if (UNLIKELY(exceptionState.throwIfNeeded())) \
|
| - return retVal;
|
| -
|
| -// We need to cancel the exception propergation when we return a rejected
|
| -// Promise.
|
| -#define TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState, info, scriptState) \
|
| - var = (value); \
|
| - if (UNLIKELY(exceptionState.hadException())) { \
|
| - v8SetReturnValue(info, exceptionState.reject(scriptState).v8Value()); \
|
| - return; \
|
| - }
|
| -
|
| -#define TONATIVE_VOID_EXCEPTIONSTATE_PROMISE(type, var, value, exceptionState, info, scriptState) \
|
| - type var; \
|
| - TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState, info, scriptState);
|
| -
|
| // type is an instance of class template V8StringResource<>,
|
| // but Mode argument varies; using type (not Mode) for consistency
|
| // with other macros and ease of code generation
|
| @@ -130,30 +71,11 @@ namespace blink {
|
| if (UNLIKELY(!var.prepare())) \
|
| return;
|
|
|
| -#define TOSTRING_VOID_INTERNAL(var, value) \
|
| - var = (value); \
|
| - if (UNLIKELY(!var.prepare())) \
|
| - return;
|
| -
|
| -#define TOSTRING_VOID_EXCEPTIONSTATE(type, var, value, exceptionState) \
|
| - type var(value); \
|
| - if (UNLIKELY(!var.prepare(exceptionState))) \
|
| - return;
|
| -
|
| #define TOSTRING_DEFAULT(type, var, value, retVal) \
|
| type var(value); \
|
| if (UNLIKELY(!var.prepare())) \
|
| return retVal;
|
|
|
| -// We need to cancel the exception propagation when we return a rejected
|
| -// Promise.
|
| -#define TOSTRING_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState, info, scriptState) \
|
| - var = (value); \
|
| - if (UNLIKELY(!var.prepare(exceptionState))) { \
|
| - v8SetReturnValue(info, exceptionState.reject(scriptState).v8Value()); \
|
| - return; \
|
| - }
|
| -
|
| } // namespace blink
|
|
|
| #endif // V8BindingMacros_h
|
|
|