| OLD | NEW |
| 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 4146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4157 * constructor with the message. | 4157 * constructor with the message. |
| 4158 */ | 4158 */ |
| 4159 class V8_EXPORT Exception { | 4159 class V8_EXPORT Exception { |
| 4160 public: | 4160 public: |
| 4161 static Local<Value> RangeError(Handle<String> message); | 4161 static Local<Value> RangeError(Handle<String> message); |
| 4162 static Local<Value> ReferenceError(Handle<String> message); | 4162 static Local<Value> ReferenceError(Handle<String> message); |
| 4163 static Local<Value> SyntaxError(Handle<String> message); | 4163 static Local<Value> SyntaxError(Handle<String> message); |
| 4164 static Local<Value> TypeError(Handle<String> message); | 4164 static Local<Value> TypeError(Handle<String> message); |
| 4165 static Local<Value> Error(Handle<String> message); | 4165 static Local<Value> Error(Handle<String> message); |
| 4166 | 4166 |
| 4167 static Local<StackTrace> GetStackTrace(Handle<Value> exception); | 4167 static Local<Message> GetMessage(Handle<Value> exception); |
| 4168 |
| 4169 V8_DEPRECATED( |
| 4170 "Use GetMessage()->GetStackTrace()", |
| 4171 static Local<StackTrace> GetStackTrace(Handle<Value> exception)); |
| 4168 }; | 4172 }; |
| 4169 | 4173 |
| 4170 | 4174 |
| 4171 // --- Counters Callbacks --- | 4175 // --- Counters Callbacks --- |
| 4172 | 4176 |
| 4173 typedef int* (*CounterLookupCallback)(const char* name); | 4177 typedef int* (*CounterLookupCallback)(const char* name); |
| 4174 | 4178 |
| 4175 typedef void* (*CreateHistogramCallback)(const char* name, | 4179 typedef void* (*CreateHistogramCallback)(const char* name, |
| 4176 int min, | 4180 int min, |
| 4177 int max, | 4181 int max, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4217 PromiseRejectMessage(Handle<Promise> promise, PromiseRejectEvent event, | 4221 PromiseRejectMessage(Handle<Promise> promise, PromiseRejectEvent event, |
| 4218 Handle<Value> value, Handle<StackTrace> stack_trace) | 4222 Handle<Value> value, Handle<StackTrace> stack_trace) |
| 4219 : promise_(promise), | 4223 : promise_(promise), |
| 4220 event_(event), | 4224 event_(event), |
| 4221 value_(value), | 4225 value_(value), |
| 4222 stack_trace_(stack_trace) {} | 4226 stack_trace_(stack_trace) {} |
| 4223 | 4227 |
| 4224 V8_INLINE Handle<Promise> GetPromise() const { return promise_; } | 4228 V8_INLINE Handle<Promise> GetPromise() const { return promise_; } |
| 4225 V8_INLINE PromiseRejectEvent GetEvent() const { return event_; } | 4229 V8_INLINE PromiseRejectEvent GetEvent() const { return event_; } |
| 4226 V8_INLINE Handle<Value> GetValue() const { return value_; } | 4230 V8_INLINE Handle<Value> GetValue() const { return value_; } |
| 4227 V8_INLINE Handle<StackTrace> GetStackTrace() const { return stack_trace_; } | 4231 |
| 4232 V8_DEPRECATED("Use v8::Exception::GetMessage(GetValue())->GetStackTrace()", |
| 4233 V8_INLINE Handle<StackTrace> GetStackTrace() const) { |
| 4234 return stack_trace_; |
| 4235 } |
| 4228 | 4236 |
| 4229 private: | 4237 private: |
| 4230 Handle<Promise> promise_; | 4238 Handle<Promise> promise_; |
| 4231 PromiseRejectEvent event_; | 4239 PromiseRejectEvent event_; |
| 4232 Handle<Value> value_; | 4240 Handle<Value> value_; |
| 4233 Handle<StackTrace> stack_trace_; | 4241 Handle<StackTrace> stack_trace_; |
| 4234 }; | 4242 }; |
| 4235 | 4243 |
| 4236 typedef void (*PromiseRejectCallback)(PromiseRejectMessage message); | 4244 typedef void (*PromiseRejectCallback)(PromiseRejectMessage message); |
| 4237 | 4245 |
| (...skipping 3105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7343 */ | 7351 */ |
| 7344 | 7352 |
| 7345 | 7353 |
| 7346 } // namespace v8 | 7354 } // namespace v8 |
| 7347 | 7355 |
| 7348 | 7356 |
| 7349 #undef TYPE_CHECK | 7357 #undef TYPE_CHECK |
| 7350 | 7358 |
| 7351 | 7359 |
| 7352 #endif // V8_H_ | 7360 #endif // V8_H_ |
| OLD | NEW |