| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 bool result; | 75 bool result; |
| 76 return V8Call(maybe, result) && result; | 76 return V8Call(maybe, result) && result; |
| 77 } | 77 } |
| 78 | 78 |
| 79 // DEPRECATED | 79 // DEPRECATED |
| 80 template <typename T> | 80 template <typename T> |
| 81 inline bool V8Call(v8::Maybe<T> maybe, | 81 inline bool V8Call(v8::Maybe<T> maybe, |
| 82 T& out_variable, | 82 T& out_variable, |
| 83 v8::TryCatch& try_catch) { | 83 v8::TryCatch& try_catch) { |
| 84 bool success = V8Call(maybe, out_variable); | 84 bool success = V8Call(maybe, out_variable); |
| 85 ASSERT(success || try_catch.HasCaught()); | 85 DCHECK(success || try_catch.HasCaught()); |
| 86 return success; | 86 return success; |
| 87 } | 87 } |
| 88 | 88 |
| 89 // DEPRECATED | 89 // DEPRECATED |
| 90 template <typename T> | 90 template <typename T> |
| 91 inline bool V8Call(v8::MaybeLocal<T> maybe_local, v8::Local<T>& out_variable) { | 91 inline bool V8Call(v8::MaybeLocal<T> maybe_local, v8::Local<T>& out_variable) { |
| 92 return maybe_local.ToLocal(&out_variable); | 92 return maybe_local.ToLocal(&out_variable); |
| 93 } | 93 } |
| 94 | 94 |
| 95 // DEPRECATED | 95 // DEPRECATED |
| 96 template <typename T> | 96 template <typename T> |
| 97 inline bool V8Call(v8::MaybeLocal<T> maybe_local, | 97 inline bool V8Call(v8::MaybeLocal<T> maybe_local, |
| 98 v8::Local<T>& out_variable, | 98 v8::Local<T>& out_variable, |
| 99 v8::TryCatch& try_catch) { | 99 v8::TryCatch& try_catch) { |
| 100 bool success = maybe_local.ToLocal(&out_variable); | 100 bool success = maybe_local.ToLocal(&out_variable); |
| 101 ASSERT(success || try_catch.HasCaught()); | 101 DCHECK(success || try_catch.HasCaught()); |
| 102 return success; | 102 return success; |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace blink | 105 } // namespace blink |
| 106 | 106 |
| 107 #endif // V8BindingMacros_h | 107 #endif // V8BindingMacros_h |
| OLD | NEW |