OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_TRY_CATCH_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_TRY_CATCH_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_TRY_CATCH_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_TRY_CATCH_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/renderer/pepper/v8_var_converter.h" | 10 #include "content/renderer/pepper/v8_var_converter.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 // PepperTryCatch | 77 // PepperTryCatch |
78 virtual void SetException(const char* message) OVERRIDE; | 78 virtual void SetException(const char* message) OVERRIDE; |
79 virtual bool HasException() OVERRIDE; | 79 virtual bool HasException() OVERRIDE; |
80 | 80 |
81 private: | 81 private: |
82 // Code which uses PepperTryCatchVar doesn't typically have a HandleScope, | 82 // Code which uses PepperTryCatchVar doesn't typically have a HandleScope, |
83 // make one for them. Note that this class is always allocated on the stack. | 83 // make one for them. Note that this class is always allocated on the stack. |
84 v8::HandleScope handle_scope_; | 84 v8::HandleScope handle_scope_; |
85 | 85 |
| 86 v8::Handle<v8::Context> context_; |
| 87 |
86 v8::TryCatch try_catch_; | 88 v8::TryCatch try_catch_; |
87 | 89 |
88 PP_Var* exception_; | 90 PP_Var* exception_; |
89 bool exception_is_set_; | 91 bool exception_is_set_; |
90 | 92 |
91 DISALLOW_COPY_AND_ASSIGN(PepperTryCatchVar); | 93 DISALLOW_COPY_AND_ASSIGN(PepperTryCatchVar); |
92 }; | 94 }; |
93 | 95 |
94 } // namespace content | 96 } // namespace content |
95 | 97 |
96 #endif // CONTENT_RENDERER_PEPPER_PEPPER_TRY_CATCH_H_ | 98 #endif // CONTENT_RENDERER_PEPPER_PEPPER_TRY_CATCH_H_ |
OLD | NEW |