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

Side by Side Diff: src/isolate.h

Issue 2191293002: Move FormatStackTrace to C++ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add formatting_stack_trace to ISOLATE_INIT_LIST Created 4 years, 4 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 | « src/contexts.h ('k') | src/isolate.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_ISOLATE_H_ 5 #ifndef V8_ISOLATE_H_
6 #define V8_ISOLATE_H_ 6 #define V8_ISOLATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 Isolate* __isolate__ = (isolate); \ 119 Isolate* __isolate__ = (isolate); \
120 if (__isolate__->has_scheduled_exception()) { \ 120 if (__isolate__->has_scheduled_exception()) { \
121 __isolate__->PromoteScheduledException(); \ 121 __isolate__->PromoteScheduledException(); \
122 return value; \ 122 return value; \
123 } \ 123 } \
124 } while (false) 124 } while (false)
125 125
126 #define RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, T) \ 126 #define RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, T) \
127 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, MaybeHandle<T>()) 127 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, MaybeHandle<T>())
128 128
129 #define RETURN_RESULT(isolate, call, T) \
130 do { \
131 Handle<T> __result__; \
132 if (!(call).ToHandle(&__result__)) { \
133 DCHECK((isolate)->has_pending_exception()); \
134 return MaybeHandle<T>(); \
135 } \
136 return __result__; \
137 } while (false)
138
129 #define RETURN_RESULT_OR_FAILURE(isolate, call) \ 139 #define RETURN_RESULT_OR_FAILURE(isolate, call) \
130 do { \ 140 do { \
131 Handle<Object> __result__; \ 141 Handle<Object> __result__; \
132 Isolate* __isolate__ = (isolate); \ 142 Isolate* __isolate__ = (isolate); \
133 if (!(call).ToHandle(&__result__)) { \ 143 if (!(call).ToHandle(&__result__)) { \
134 DCHECK(__isolate__->has_pending_exception()); \ 144 DCHECK(__isolate__->has_pending_exception()); \
135 return __isolate__->heap()->exception(); \ 145 return __isolate__->heap()->exception(); \
136 } \ 146 } \
137 return *__result__; \ 147 return *__result__; \
138 } while (false) 148 } while (false)
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 V(HTracer*, htracer, nullptr) \ 427 V(HTracer*, htracer, nullptr) \
418 V(CodeTracer*, code_tracer, nullptr) \ 428 V(CodeTracer*, code_tracer, nullptr) \
419 V(bool, fp_stubs_generated, false) \ 429 V(bool, fp_stubs_generated, false) \
420 V(uint32_t, per_isolate_assert_data, 0xFFFFFFFFu) \ 430 V(uint32_t, per_isolate_assert_data, 0xFFFFFFFFu) \
421 V(PromiseRejectCallback, promise_reject_callback, nullptr) \ 431 V(PromiseRejectCallback, promise_reject_callback, nullptr) \
422 V(const v8::StartupData*, snapshot_blob, nullptr) \ 432 V(const v8::StartupData*, snapshot_blob, nullptr) \
423 V(int, code_and_metadata_size, 0) \ 433 V(int, code_and_metadata_size, 0) \
424 V(int, bytecode_and_metadata_size, 0) \ 434 V(int, bytecode_and_metadata_size, 0) \
425 /* true if being profiled. Causes collection of extra compile info. */ \ 435 /* true if being profiled. Causes collection of extra compile info. */ \
426 V(bool, is_profiling, false) \ 436 V(bool, is_profiling, false) \
437 /* true if a trace is being formatted through Error.prepareStackTrace. */ \
438 V(bool, formatting_stack_trace, false) \
427 ISOLATE_INIT_SIMULATOR_LIST(V) 439 ISOLATE_INIT_SIMULATOR_LIST(V)
428 440
429 #define THREAD_LOCAL_TOP_ACCESSOR(type, name) \ 441 #define THREAD_LOCAL_TOP_ACCESSOR(type, name) \
430 inline void set_##name(type v) { thread_local_top_.name##_ = v; } \ 442 inline void set_##name(type v) { thread_local_top_.name##_ = v; } \
431 inline type name() const { return thread_local_top_.name##_; } 443 inline type name() const { return thread_local_top_.name##_; }
432 444
433 #define THREAD_LOCAL_TOP_ADDRESS(type, name) \ 445 #define THREAD_LOCAL_TOP_ADDRESS(type, name) \
434 type* name##_address() { return &thread_local_top_.name##_; } 446 type* name##_address() { return &thread_local_top_.name##_; }
435 447
436 448
(...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 1655
1644 EmbeddedVector<char, 128> filename_; 1656 EmbeddedVector<char, 128> filename_;
1645 FILE* file_; 1657 FILE* file_;
1646 int scope_depth_; 1658 int scope_depth_;
1647 }; 1659 };
1648 1660
1649 } // namespace internal 1661 } // namespace internal
1650 } // namespace v8 1662 } // namespace v8
1651 1663
1652 #endif // V8_ISOLATE_H_ 1664 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698