OLD | NEW |
---|---|
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 Loading... | |
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 |
OLD | NEW |