| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 #define TOSTRING_VOID(type, var, value) \ | 128 #define TOSTRING_VOID(type, var, value) \ |
| 129 type var(value); \ | 129 type var(value); \ |
| 130 if (UNLIKELY(!var.prepare())) \ | 130 if (UNLIKELY(!var.prepare())) \ |
| 131 return; | 131 return; |
| 132 | 132 |
| 133 #define TOSTRING_VOID_INTERNAL(var, value) \ | 133 #define TOSTRING_VOID_INTERNAL(var, value) \ |
| 134 var = (value); \ | 134 var = (value); \ |
| 135 if (UNLIKELY(!var.prepare())) \ | 135 if (UNLIKELY(!var.prepare())) \ |
| 136 return; | 136 return; |
| 137 | 137 |
| 138 #define TOSTRING_VOID_EXCEPTIONSTATE(type, var, value, exceptionState) \ |
| 139 type var(value); \ |
| 140 if (UNLIKELY(!var.prepare(exceptionState))) \ |
| 141 return; |
| 142 |
| 138 #define TOSTRING_DEFAULT(type, var, value, retVal) \ | 143 #define TOSTRING_DEFAULT(type, var, value, retVal) \ |
| 139 type var(value); \ | 144 type var(value); \ |
| 140 if (UNLIKELY(!var.prepare())) \ | 145 if (UNLIKELY(!var.prepare())) \ |
| 141 return retVal; | 146 return retVal; |
| 142 | 147 |
| 143 // We need to cancel the exception propagation when we return a rejected | 148 // We need to cancel the exception propagation when we return a rejected |
| 144 // Promise. | 149 // Promise. |
| 145 #define TOSTRING_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState
, info, scriptState) \ | 150 #define TOSTRING_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState
, info, scriptState) \ |
| 146 var = (value);
\ | 151 var = (value);
\ |
| 147 if (UNLIKELY(!var.prepare(exceptionState))) {
\ | 152 if (UNLIKELY(!var.prepare(exceptionState))) {
\ |
| 148 v8SetReturnValue(info, exceptionState.reject(scriptState).v8Value());
\ | 153 v8SetReturnValue(info, exceptionState.reject(scriptState).v8Value());
\ |
| 149 return;
\ | 154 return;
\ |
| 150 } | 155 } |
| 151 | 156 |
| 152 } // namespace blink | 157 } // namespace blink |
| 153 | 158 |
| 154 #endif // V8BindingMacros_h | 159 #endif // V8BindingMacros_h |
| OLD | NEW |