Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(733)

Side by Side Diff: Source/bindings/v8/V8Binding.h

Issue 304223007: Use auto-rethrowing v8::TryCatch variant (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/bindings/tests/results/V8TestTypedefs.cpp ('k') | Source/bindings/v8/V8BindingMacros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Ericsson AB. All rights reserved. 3 * Copyright (C) 2012 Ericsson AB. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 933
934 private: 934 private:
935 v8::HandleScope m_handleScope; 935 v8::HandleScope m_handleScope;
936 v8::Context::Scope m_contextScope; 936 v8::Context::Scope m_contextScope;
937 RefPtr<ScriptState> m_scriptState; 937 RefPtr<ScriptState> m_scriptState;
938 }; 938 };
939 939
940 void GetDevToolsFunctionInfo(v8::Handle<v8::Function>, v8::Isolate*, int& script Id, String& resourceName, int& lineNumber); 940 void GetDevToolsFunctionInfo(v8::Handle<v8::Function>, v8::Isolate*, int& script Id, String& resourceName, int& lineNumber);
941 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(Executio nContext*, v8::Handle<v8::Function>, v8::Isolate*); 941 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(Executio nContext*, v8::Handle<v8::Function>, v8::Isolate*);
942 942
943 // TryCatch variant that automatically rethrows caught exceptions.
944 // Useful for cases where exceptions need to be detected, but not actually caugh t.
945 class V8TryPropagate : public v8::TryCatch {
yhirano 2014/05/30 08:08:43 How about classes https://codereview.chromium.org/
946 public:
947 ~V8TryPropagate()
948 {
949 // ReThrow() is a no-op if no exception has been caught, so always call.
950 v8::TryCatch::ReThrow();
951 }
952
953 private:
954 v8::Handle<v8::Value> ReThrow();
955 };
943 956
944 } // namespace WebCore 957 } // namespace WebCore
945 958
946 #endif // V8Binding_h 959 #endif // V8Binding_h
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestTypedefs.cpp ('k') | Source/bindings/v8/V8BindingMacros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698