Chromium Code Reviews| 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_INTERNAL(var, value) \ | 128 #define TOSTRING_VOID_INTERNAL(var, value) \ |
| 129 var = (value); \ | 129 var = (value); \ |
| 130 if (UNLIKELY(!var.prepare())) \ | 130 if (UNLIKELY(!var.prepare())) \ |
| 131 return; | 131 return; |
| 132 | 132 |
| 133 #define TOSTRING_DEFAULT(type, var, value, retVal) \ | 133 #define TOSTRING_DEFAULT(type, var, value, retVal) \ |
| 134 type var(value); \ | 134 type var(value); \ |
| 135 if (UNLIKELY(!var.prepare())) \ | 135 if (UNLIKELY(!var.prepare())) \ |
| 136 return retVal; | 136 return retVal; |
| 137 | 137 |
| 138 // We need to cancel the exception propergation when we return a rejected | 138 // We need to cancel the exception propagation when we return a rejected |
| 139 // Promise. | 139 // Promise. |
| 140 #define TOSTRING_VOID_PROMISE_INTERNAL(var, value, info) \ | 140 #define TOSTRING_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(var, value, exceptionState , info, scriptState) \ |
| 141 var = (value); \ | 141 var = (value); \ |
| 142 if (UNLIKELY(!var.prepare())) { \ | 142 if (UNLIKELY(!var.prepare(exceptionState))) { \ |
| 143 info.GetReturnValue().Set(ScriptPromise::rejectRaw(info.GetIsolate(), bl ock.Exception())); \ | 143 v8SetReturnValue(info, exceptionState.reject(scriptState).v8Value()); \ |
| 144 block.Reset(); \ | 144 return; \ |
| 145 return; \ | |
| 146 } | |
| 147 | |
| 148 #define TOSTRING_VOID_PROMISE(type, var, value, info) \ | |
|
Jens Widell
2014/09/25 13:51:14
This macro was never used, BTW. The corresponding
| |
| 149 type var; \ | |
| 150 { \ | |
| 151 v8::TryCatch block; \ | |
| 152 TOSTRING_VOID_PROMISE_INTERNAL(type, var, value, info); \ | |
| 153 } | 145 } |
| 154 | 146 |
| 155 } // namespace blink | 147 } // namespace blink |
| 156 | 148 |
| 157 #endif // V8BindingMacros_h | 149 #endif // V8BindingMacros_h |
| OLD | NEW |