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

Unified Diff: src/execution.h

Issue 2636903002: Assert that context creation doesn't throw (Closed)
Patch Set: updates Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug/debug.cc ('k') | src/execution.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/execution.h
diff --git a/src/execution.h b/src/execution.h
index f26ea343082b93f68d1ac088971bef15880adc7b..ee5d3a6f738f2e8336c13ca18b0f4ba5565cc287 100644
--- a/src/execution.h
+++ b/src/execution.h
@@ -15,6 +15,9 @@ namespace internal {
class Execution final : public AllStatic {
public:
+ // Whether to report pending messages, or keep them pending on the isolate.
+ enum class MessageHandling { kReport, kKeepPending };
+
// Call a function, the caller supplies a receiver and an array
// of arguments.
//
@@ -36,16 +39,18 @@ class Execution final : public AllStatic {
int argc,
Handle<Object> argv[]);
- // Call a function, just like Call(), but make sure to silently catch
- // any thrown exceptions. The return value is either the result of
- // calling the function (if caught exception is false) or the exception
- // that occurred (if caught exception is true).
- // In the exception case, exception_out holds the caught exceptions, unless
- // it is a termination exception.
+ // Call a function, just like Call(), but handle don't report exceptions
+ // externally.
+ // The return value is either the result of calling the function (if no
+ // exception occurred), or an empty handle.
+ // If message_handling is MessageHandling::kReport, exceptions (except for
+ // termination exceptions) will be stored in exception_out (if not a
+ // nullptr).
static MaybeHandle<Object> TryCall(Isolate* isolate, Handle<Object> callable,
Handle<Object> receiver, int argc,
Handle<Object> argv[],
- MaybeHandle<Object>* exception_out = NULL);
+ MessageHandling message_handling,
+ MaybeHandle<Object>* exception_out);
};
« no previous file with comments | « src/debug/debug.cc ('k') | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698