Skip to content

Commit ad7d46b

Browse files
danbevtargos
authored andcommitted
deps: cherry-pick f5fad6d from upstream v8
Original commit message: This commit adds a getter for the private is_verbose_ member. The use case for this comes from Node.js where the ability to avoid calling FatalException if the TryCatch is verbose would be nice to have. BUG= Review-Url: https://codereview.chromium.org/2840803002 Cr-Commit-Position: refs/heads/master@{nodejs#45018} PR-URL: nodejs#12826 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 60afd95 commit ad7d46b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

deps/v8/include/v8.h

+5
Original file line numberDiff line numberDiff line change
@@ -8168,6 +8168,11 @@ class V8_EXPORT TryCatch {
81688168
*/
81698169
void SetVerbose(bool value);
81708170

8171+
/**
8172+
* Returns true if verbosity is enabled.
8173+
*/
8174+
bool IsVerbose() const;
8175+
81718176
/**
81728177
* Set whether or not this TryCatch should capture a Message object
81738178
* which holds source information about where the exception

deps/v8/src/api.cc

+4
Original file line numberDiff line numberDiff line change
@@ -2710,6 +2710,10 @@ void v8::TryCatch::SetVerbose(bool value) {
27102710
is_verbose_ = value;
27112711
}
27122712

2713+
bool v8::TryCatch::IsVerbose() const {
2714+
return is_verbose_;
2715+
}
2716+
27132717

27142718
void v8::TryCatch::SetCaptureMessage(bool value) {
27152719
capture_message_ = value;

0 commit comments

Comments
 (0)