Chromium Code Reviews| Index: Source/bindings/v8/V8Binding.h |
| diff --git a/Source/bindings/v8/V8Binding.h b/Source/bindings/v8/V8Binding.h |
| index 4e093882fb9e78b7b13b8db4ca8340eb4a9426c6..71cde0e3fa3118ff2b41d374cc989a65dc1d244d 100644 |
| --- a/Source/bindings/v8/V8Binding.h |
| +++ b/Source/bindings/v8/V8Binding.h |
| @@ -940,6 +940,19 @@ private: |
| void GetDevToolsFunctionInfo(v8::Handle<v8::Function>, v8::Isolate*, int& scriptId, String& resourceName, int& lineNumber); |
| PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(ExecutionContext*, v8::Handle<v8::Function>, v8::Isolate*); |
| +// TryCatch variant that automatically rethrows caught exceptions. |
| +// Useful for cases where exceptions need to be detected, but not actually caught. |
| +class V8TryPropagate : public v8::TryCatch { |
|
yhirano
2014/05/30 08:08:43
How about classes https://codereview.chromium.org/
|
| +public: |
| + ~V8TryPropagate() |
| + { |
| + // ReThrow() is a no-op if no exception has been caught, so always call. |
| + v8::TryCatch::ReThrow(); |
| + } |
| + |
| +private: |
| + v8::Handle<v8::Value> ReThrow(); |
| +}; |
| } // namespace WebCore |