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

Side by Side Diff: include/v8.h

Issue 282783004: Reland of "v8::TryCatch now works correctly with ASAN's UseAfterReturn mode enabled." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remake Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/api.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 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 5057 matching lines...) Expand 10 before | Expand all | Expand 10 after
5068 */ 5068 */
5069 void SetVerbose(bool value); 5069 void SetVerbose(bool value);
5070 5070
5071 /** 5071 /**
5072 * Set whether or not this TryCatch should capture a Message object 5072 * Set whether or not this TryCatch should capture a Message object
5073 * which holds source information about where the exception 5073 * which holds source information about where the exception
5074 * occurred. True by default. 5074 * occurred. True by default.
5075 */ 5075 */
5076 void SetCaptureMessage(bool value); 5076 void SetCaptureMessage(bool value);
5077 5077
5078 /**
5079 * There are cases when the raw address of C++ TryCatch object cannot be
5080 * used for comparisons with addresses into the JS stack. The cases are:
5081 * 1) ARM, ARM64 and MIPS simulators which have separate JS stack.
5082 * 2) Address sanitizer allocates local C++ object in the heap when
5083 * UseAfterReturn mode is enabled.
5084 * This method returns address that can be used for comparisons with
5085 * addresses into the JS stack. When neither simulator nor ASAN's
5086 * UseAfterReturn is enabled, then the address returned will be the address
5087 * of the C++ try catch handler itself.
5088 */
5089 static void* JSStackComparableAddress(v8::TryCatch* handler) {
5090 if (handler == NULL) return NULL;
5091 return handler->js_stack_comparable_address_;
5092 }
5093
5078 private: 5094 private:
5079 // Make it hard to create heap-allocated TryCatch blocks. 5095 // Make it hard to create heap-allocated TryCatch blocks.
5080 TryCatch(const TryCatch&); 5096 TryCatch(const TryCatch&);
5081 void operator=(const TryCatch&); 5097 void operator=(const TryCatch&);
5082 void* operator new(size_t size); 5098 void* operator new(size_t size);
5083 void operator delete(void*, size_t); 5099 void operator delete(void*, size_t);
5084 5100
5085 v8::internal::Isolate* isolate_; 5101 v8::internal::Isolate* isolate_;
5086 void* next_; 5102 v8::TryCatch* next_;
5087 void* exception_; 5103 void* exception_;
5088 void* message_obj_; 5104 void* message_obj_;
5089 void* message_script_; 5105 void* message_script_;
5106 void* js_stack_comparable_address_;
5090 int message_start_pos_; 5107 int message_start_pos_;
5091 int message_end_pos_; 5108 int message_end_pos_;
5092 bool is_verbose_ : 1; 5109 bool is_verbose_ : 1;
5093 bool can_continue_ : 1; 5110 bool can_continue_ : 1;
5094 bool capture_message_ : 1; 5111 bool capture_message_ : 1;
5095 bool rethrow_ : 1; 5112 bool rethrow_ : 1;
5096 bool has_terminated_ : 1; 5113 bool has_terminated_ : 1;
5097 5114
5098 friend class v8::internal::Isolate; 5115 friend class v8::internal::Isolate;
5099 }; 5116 };
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after
6618 */ 6635 */
6619 6636
6620 6637
6621 } // namespace v8 6638 } // namespace v8
6622 6639
6623 6640
6624 #undef TYPE_CHECK 6641 #undef TYPE_CHECK
6625 6642
6626 6643
6627 #endif // V8_H_ 6644 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698