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

Side by Side Diff: src/execution.h

Issue 2636903002: Assert that context creation doesn't throw (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project 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 V8_EXECUTION_H_ 5 #ifndef V8_EXECUTION_H_
6 #define V8_EXECUTION_H_ 6 #define V8_EXECUTION_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/handles.h" 10 #include "src/handles.h"
(...skipping 18 matching lines...) Expand all
29 // arguments. 29 // arguments.
30 MUST_USE_RESULT static MaybeHandle<Object> New(Handle<JSFunction> constructor, 30 MUST_USE_RESULT static MaybeHandle<Object> New(Handle<JSFunction> constructor,
31 int argc, 31 int argc,
32 Handle<Object> argv[]); 32 Handle<Object> argv[]);
33 MUST_USE_RESULT static MaybeHandle<Object> New(Isolate* isolate, 33 MUST_USE_RESULT static MaybeHandle<Object> New(Isolate* isolate,
34 Handle<Object> constructor, 34 Handle<Object> constructor,
35 Handle<Object> new_target, 35 Handle<Object> new_target,
36 int argc, 36 int argc,
37 Handle<Object> argv[]); 37 Handle<Object> argv[]);
38 38
39 // Call a function, just like Call(), but make sure to silently catch 39 // Call a function, just like Call(), but handle don't report exceptions
40 // any thrown exceptions. The return value is either the result of 40 // externally.
41 // calling the function (if caught exception is false) or the exception 41 // The return value is either the result of
42 // that occurred (if caught exception is true). 42 // calling the function (if no exception occurred), or an empty handle.
43 // In the exception case, exception_out holds the caught exceptions, unless 43 // If an exception was raised and exception_out is non-nullptr, holds the
44 // it is a termination exception. 44 // caught exceptions, unless it is a termination exception. Otherwise, the
45 // exception is kept pending on the isolate.
Yang 2017/01/17 09:54:23 Wait... if exception_out is nullptr, TryCall behav
jochen (gone - plz use gerrit) 2017/01/17 10:24:01 no, Call() schedules the exception, TryCall leaves
45 static MaybeHandle<Object> TryCall(Isolate* isolate, Handle<Object> callable, 46 static MaybeHandle<Object> TryCall(Isolate* isolate, Handle<Object> callable,
46 Handle<Object> receiver, int argc, 47 Handle<Object> receiver, int argc,
47 Handle<Object> argv[], 48 Handle<Object> argv[],
48 MaybeHandle<Object>* exception_out = NULL); 49 MaybeHandle<Object>* exception_out);
49 }; 50 };
50 51
51 52
52 class ExecutionAccess; 53 class ExecutionAccess;
53 class PostponeInterruptsScope; 54 class PostponeInterruptsScope;
54 55
55 56
56 // StackGuard contains the handling of the limits that are used to limit the 57 // StackGuard contains the handling of the limits that are used to limit the
57 // number of nested invocations of JavaScript and the stack size used in each 58 // number of nested invocations of JavaScript and the stack size used in each
58 // invocation. 59 // invocation.
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 friend class StackLimitCheck; 219 friend class StackLimitCheck;
219 friend class PostponeInterruptsScope; 220 friend class PostponeInterruptsScope;
220 221
221 DISALLOW_COPY_AND_ASSIGN(StackGuard); 222 DISALLOW_COPY_AND_ASSIGN(StackGuard);
222 }; 223 };
223 224
224 } // namespace internal 225 } // namespace internal
225 } // namespace v8 226 } // namespace v8
226 227
227 #endif // V8_EXECUTION_H_ 228 #endif // V8_EXECUTION_H_
OLDNEW
« src/api.cc ('K') | « src/debug/debug.cc ('k') | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698