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 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 ~V8RethrowTryCatchScope() | 955 ~V8RethrowTryCatchScope() |
956 { | 956 { |
957 // ReThrow() is a no-op if no exception has been caught, so always call. | 957 // ReThrow() is a no-op if no exception has been caught, so always call. |
958 m_block.ReThrow(); | 958 m_block.ReThrow(); |
959 } | 959 } |
960 | 960 |
961 private: | 961 private: |
962 v8::TryCatch& m_block; | 962 v8::TryCatch& m_block; |
963 }; | 963 }; |
964 | 964 |
965 class V8ResetTryCatchScope FINAL { | |
966 public: | |
967 explicit V8ResetTryCatchScope(v8::TryCatch& block) : m_block(block) { } | |
968 ~V8ResetTryCatchScope() | |
969 { | |
970 m_block.Reset(); | |
971 } | |
972 | |
973 private: | |
974 v8::TryCatch& m_block; | |
975 }; | |
976 | |
977 } // namespace blink | 965 } // namespace blink |
978 | 966 |
979 #endif // V8Binding_h | 967 #endif // V8Binding_h |
OLD | NEW |