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

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: make constructors explicit 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 class V8RethrowTryCatchScope FINAL {
944 public:
945 explicit V8RethrowTryCatchScope(v8::TryCatch& block) : m_block(block) { }
946 ~V8RethrowTryCatchScope()
947 {
948 // ReThrow() is a no-op if no exception has been caught, so always call.
949 m_block.ReThrow();
950 }
951
952 private:
953 v8::TryCatch& m_block;
954 };
955
956 class V8ResetTryCatchScope FINAL {
957 public:
958 explicit V8ResetTryCatchScope(v8::TryCatch& block) : m_block(block) { }
959 ~V8ResetTryCatchScope()
960 {
961 m_block.Reset();
962 }
963
964 private:
965 v8::TryCatch& m_block;
966 };
943 967
944 } // namespace WebCore 968 } // namespace WebCore
945 969
946 #endif // V8Binding_h 970 #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