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

Side by Side Diff: gin/try_catch.h

Issue 1106393002: gin: Use V8 Maybe APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@maybe-gin-converter
Patch Set: Created 5 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 | « gin/test/file.cc ('k') | gin/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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 GIN_TRY_CATCH_H_ 5 #ifndef GIN_TRY_CATCH_H_
6 #define GIN_TRY_CATCH_H_ 6 #define GIN_TRY_CATCH_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "gin/gin_export.h" 11 #include "gin/gin_export.h"
12 #include "v8/include/v8.h" 12 #include "v8/include/v8.h"
13 13
14 namespace gin { 14 namespace gin {
15 15
16 // TryCatch is a convenient wrapper around v8::TryCatch. 16 // TryCatch is a convenient wrapper around v8::TryCatch.
17 class GIN_EXPORT TryCatch { 17 class GIN_EXPORT TryCatch {
18 public: 18 public:
19 TryCatch(); 19 explicit TryCatch(v8::Isolate* isolate);
20 ~TryCatch(); 20 ~TryCatch();
21 21
22 bool HasCaught(); 22 bool HasCaught();
23 std::string GetStackTrace(); 23 std::string GetStackTrace();
24 24
25 private: 25 private:
26 v8::Isolate* isolate_;
26 v8::TryCatch try_catch_; 27 v8::TryCatch try_catch_;
27 28
28 DISALLOW_COPY_AND_ASSIGN(TryCatch); 29 DISALLOW_COPY_AND_ASSIGN(TryCatch);
29 }; 30 };
30 31
31 } // namespace gin 32 } // namespace gin
32 33
33 #endif // GIN_TRY_CATCH_H_ 34 #endif // GIN_TRY_CATCH_H_
OLDNEW
« no previous file with comments | « gin/test/file.cc ('k') | gin/try_catch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698