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

Side by Side Diff: include/v8.h

Issue 443853002: v8::TryCatch should cancel the scheduled exception on Reset. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 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 | « 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 5096 matching lines...) Expand 10 before | Expand all | Expand 10 after
5107 * Returns the message associated with this exception. If there is 5107 * Returns the message associated with this exception. If there is
5108 * no message associated an empty handle is returned. 5108 * no message associated an empty handle is returned.
5109 * 5109 *
5110 * The returned handle is valid until this TryCatch block has been 5110 * The returned handle is valid until this TryCatch block has been
5111 * destroyed. 5111 * destroyed.
5112 */ 5112 */
5113 Local<v8::Message> Message() const; 5113 Local<v8::Message> Message() const;
5114 5114
5115 /** 5115 /**
5116 * Clears any exceptions that may have been caught by this try/catch block. 5116 * Clears any exceptions that may have been caught by this try/catch block.
5117 * After this method has been called, HasCaught() will return false. 5117 * After this method has been called, HasCaught() will return false. Cancels
5118 * the scheduled exception if it is caught and ReThrow() is not called before.
5118 * 5119 *
5119 * It is not necessary to clear a try/catch block before using it again; if 5120 * It is not necessary to clear a try/catch block before using it again; if
5120 * another exception is thrown the previously caught exception will just be 5121 * another exception is thrown the previously caught exception will just be
5121 * overwritten. However, it is often a good idea since it makes it easier 5122 * overwritten. However, it is often a good idea since it makes it easier
5122 * to determine which operation threw a given exception. 5123 * to determine which operation threw a given exception.
5123 */ 5124 */
5124 void Reset(); 5125 void Reset();
5125 5126
5126 /** 5127 /**
5127 * Set verbosity of the external exception handler. 5128 * Set verbosity of the external exception handler.
(...skipping 28 matching lines...) Expand all
5156 return handler->js_stack_comparable_address_; 5157 return handler->js_stack_comparable_address_;
5157 } 5158 }
5158 5159
5159 private: 5160 private:
5160 // Make it hard to create heap-allocated TryCatch blocks. 5161 // Make it hard to create heap-allocated TryCatch blocks.
5161 TryCatch(const TryCatch&); 5162 TryCatch(const TryCatch&);
5162 void operator=(const TryCatch&); 5163 void operator=(const TryCatch&);
5163 void* operator new(size_t size); 5164 void* operator new(size_t size);
5164 void operator delete(void*, size_t); 5165 void operator delete(void*, size_t);
5165 5166
5167 void ResetInternal();
Michael Starzinger 2014/08/07 08:40:36 nit: Can we move this up a few lines to before con
yhirano 2014/08/07 08:50:54 For readability? Then it is OK to do so.
Michael Starzinger 2014/08/07 08:53:53 Yes, for readability and consistency with the rest
5168
5166 v8::internal::Isolate* isolate_; 5169 v8::internal::Isolate* isolate_;
5167 v8::TryCatch* next_; 5170 v8::TryCatch* next_;
5168 void* exception_; 5171 void* exception_;
5169 void* message_obj_; 5172 void* message_obj_;
5170 void* message_script_; 5173 void* message_script_;
5171 void* js_stack_comparable_address_; 5174 void* js_stack_comparable_address_;
5172 int message_start_pos_; 5175 int message_start_pos_;
5173 int message_end_pos_; 5176 int message_end_pos_;
5174 bool is_verbose_ : 1; 5177 bool is_verbose_ : 1;
5175 bool can_continue_ : 1; 5178 bool can_continue_ : 1;
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
6729 */ 6732 */
6730 6733
6731 6734
6732 } // namespace v8 6735 } // namespace v8
6733 6736
6734 6737
6735 #undef TYPE_CHECK 6738 #undef TYPE_CHECK
6736 6739
6737 6740
6738 #endif // V8_H_ 6741 #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