| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 var = (value); \ | 92 var = (value); \ |
| 93 if (UNLIKELY(exceptionState.throwIfNeeded())) \ | 93 if (UNLIKELY(exceptionState.throwIfNeeded())) \ |
| 94 return; \ | 94 return; \ |
| 95 | 95 |
| 96 #define TONATIVE_VOID_EXCEPTIONSTATE(type, var, value, exceptionState) \ | 96 #define TONATIVE_VOID_EXCEPTIONSTATE(type, var, value, exceptionState) \ |
| 97 type var; \ | 97 type var; \ |
| 98 var = (value); \ | 98 var = (value); \ |
| 99 if (UNLIKELY(exceptionState.throwIfNeeded())) \ | 99 if (UNLIKELY(exceptionState.throwIfNeeded())) \ |
| 100 return; | 100 return; |
| 101 | 101 |
| 102 #define TONATIVE_VOID_EXCEPTIONSTATE_NOTHROW(type, var, value, exceptionState) \ |
| 103 type var; \ |
| 104 var = (value); \ |
| 105 if (UNLIKELY(exceptionState.hadException())) \ |
| 106 return; |
| 107 |
| 102 #define TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(value, exceptionState) \ | 108 #define TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(value, exceptionState) \ |
| 103 (value); \ | 109 (value); \ |
| 104 if (UNLIKELY(exceptionState.throwIfNeeded())) \ | 110 if (UNLIKELY(exceptionState.throwIfNeeded())) \ |
| 105 return; | 111 return; |
| 106 | 112 |
| 113 #define TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL_NOTHROW(value, exceptionState)
\ |
| 114 (value);
\ |
| 115 if (UNLIKELY(exceptionState.hadException()))
\ |
| 116 return; |
| 117 |
| 107 #define TONATIVE_DEFAULT_EXCEPTIONSTATE(type, var, value, exceptionState, retVal
) \ | 118 #define TONATIVE_DEFAULT_EXCEPTIONSTATE(type, var, value, exceptionState, retVal
) \ |
| 108 type var = (value);
\ | 119 type var = (value);
\ |
| 109 if (UNLIKELY(exceptionState.throwIfNeeded()))
\ | 120 if (UNLIKELY(exceptionState.throwIfNeeded()))
\ |
| 110 return retVal; | 121 return retVal; |
| 111 | 122 |
| 112 // We need to cancel the exception propergation when we return a rejected | 123 // We need to cancel the exception propergation when we return a rejected |
| 113 // Promise. | 124 // Promise. |
| 114 #define TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState
, info, scriptState) \ | 125 #define TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState
, info, scriptState) \ |
| 115 var = (value);
\ | 126 var = (value);
\ |
| 116 if (UNLIKELY(exceptionState.hadException())) {
\ | 127 if (UNLIKELY(exceptionState.hadException())) {
\ |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 #define TOSTRING_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState
, info, scriptState) \ | 161 #define TOSTRING_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState
, info, scriptState) \ |
| 151 var = (value);
\ | 162 var = (value);
\ |
| 152 if (UNLIKELY(!var.prepare(exceptionState))) {
\ | 163 if (UNLIKELY(!var.prepare(exceptionState))) {
\ |
| 153 v8SetReturnValue(info, exceptionState.reject(scriptState).v8Value());
\ | 164 v8SetReturnValue(info, exceptionState.reject(scriptState).v8Value());
\ |
| 154 return;
\ | 165 return;
\ |
| 155 } | 166 } |
| 156 | 167 |
| 157 } // namespace blink | 168 } // namespace blink |
| 158 | 169 |
| 159 #endif // V8BindingMacros_h | 170 #endif // V8BindingMacros_h |
| OLD | NEW |