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

Side by Side Diff: content/renderer/pepper/pepper_try_catch.h

Issue 562763005: Hold a handle to the v8 context in PepperTryCatchVar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | content/renderer/pepper/pepper_try_catch.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_try_catch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698