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_ARGINTERNAL(value, exceptionState) \ |
| 103 (value); \ |
| 104 if (UNLIKELY(exceptionState.throwIfNeeded())) \ |
| 105 return; |
| 106 |
102 #define TONATIVE_DEFAULT_EXCEPTIONSTATE(type, var, value, exceptionState, retVal
) \ | 107 #define TONATIVE_DEFAULT_EXCEPTIONSTATE(type, var, value, exceptionState, retVal
) \ |
103 type var = (value);
\ | 108 type var = (value);
\ |
104 if (UNLIKELY(exceptionState.throwIfNeeded()))
\ | 109 if (UNLIKELY(exceptionState.throwIfNeeded()))
\ |
105 return retVal; | 110 return retVal; |
106 | 111 |
107 // We need to cancel the exception propergation when we return a rejected | 112 // We need to cancel the exception propergation when we return a rejected |
108 // Promise. | 113 // Promise. |
109 #define TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState
, info, scriptState) \ | 114 #define TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState
, info, scriptState) \ |
110 var = (value);
\ | 115 var = (value);
\ |
111 if (UNLIKELY(exceptionState.hadException())) {
\ | 116 if (UNLIKELY(exceptionState.hadException())) {
\ |
(...skipping 28 matching lines...) Expand all Loading... |
140 #define TOSTRING_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState
, info, scriptState) \ | 145 #define TOSTRING_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState
, info, scriptState) \ |
141 var = (value);
\ | 146 var = (value);
\ |
142 if (UNLIKELY(!var.prepare(exceptionState))) {
\ | 147 if (UNLIKELY(!var.prepare(exceptionState))) {
\ |
143 v8SetReturnValue(info, exceptionState.reject(scriptState).v8Value());
\ | 148 v8SetReturnValue(info, exceptionState.reject(scriptState).v8Value());
\ |
144 return;
\ | 149 return;
\ |
145 } | 150 } |
146 | 151 |
147 } // namespace blink | 152 } // namespace blink |
148 | 153 |
149 #endif // V8BindingMacros_h | 154 #endif // V8BindingMacros_h |
OLD | NEW |