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 4170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4181 * constructor with the message. | 4181 * constructor with the message. |
4182 */ | 4182 */ |
4183 class V8_EXPORT Exception { | 4183 class V8_EXPORT Exception { |
4184 public: | 4184 public: |
4185 static Local<Value> RangeError(Handle<String> message); | 4185 static Local<Value> RangeError(Handle<String> message); |
4186 static Local<Value> ReferenceError(Handle<String> message); | 4186 static Local<Value> ReferenceError(Handle<String> message); |
4187 static Local<Value> SyntaxError(Handle<String> message); | 4187 static Local<Value> SyntaxError(Handle<String> message); |
4188 static Local<Value> TypeError(Handle<String> message); | 4188 static Local<Value> TypeError(Handle<String> message); |
4189 static Local<Value> Error(Handle<String> message); | 4189 static Local<Value> Error(Handle<String> message); |
4190 | 4190 |
4191 static Local<Message> GetMessage(Handle<Value> exception); | 4191 static Local<Message> CreateMessage(Handle<Value> exception); |
4192 | |
4193 // DEPRECATED. Use GetMessage()->GetStackTrace() | |
4194 static Local<StackTrace> GetStackTrace(Handle<Value> exception); | 4192 static Local<StackTrace> GetStackTrace(Handle<Value> exception); |
aandrey
2014/11/11 10:54:07
This method will be used by inspector as it's not
Yang
2014/11/11 13:49:14
Can you elaborate why the inspector can't use Crea
| |
4195 }; | 4193 }; |
4196 | 4194 |
4197 | 4195 |
4198 // --- Counters Callbacks --- | 4196 // --- Counters Callbacks --- |
4199 | 4197 |
4200 typedef int* (*CounterLookupCallback)(const char* name); | 4198 typedef int* (*CounterLookupCallback)(const char* name); |
4201 | 4199 |
4202 typedef void* (*CreateHistogramCallback)(const char* name, | 4200 typedef void* (*CreateHistogramCallback)(const char* name, |
4203 int min, | 4201 int min, |
4204 int max, | 4202 int max, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4245 Handle<Value> value, Handle<StackTrace> stack_trace) | 4243 Handle<Value> value, Handle<StackTrace> stack_trace) |
4246 : promise_(promise), | 4244 : promise_(promise), |
4247 event_(event), | 4245 event_(event), |
4248 value_(value), | 4246 value_(value), |
4249 stack_trace_(stack_trace) {} | 4247 stack_trace_(stack_trace) {} |
4250 | 4248 |
4251 V8_INLINE Handle<Promise> GetPromise() const { return promise_; } | 4249 V8_INLINE Handle<Promise> GetPromise() const { return promise_; } |
4252 V8_INLINE PromiseRejectEvent GetEvent() const { return event_; } | 4250 V8_INLINE PromiseRejectEvent GetEvent() const { return event_; } |
4253 V8_INLINE Handle<Value> GetValue() const { return value_; } | 4251 V8_INLINE Handle<Value> GetValue() const { return value_; } |
4254 | 4252 |
4255 // DEPRECATED. Use v8::Exception::GetMessage(GetValue())->GetStackTrace() | 4253 // DEPRECATED. Use v8::Exception::CreateMessage(GetValue())->GetStackTrace() |
4256 V8_INLINE Handle<StackTrace> GetStackTrace() const { return stack_trace_; } | 4254 V8_INLINE Handle<StackTrace> GetStackTrace() const { return stack_trace_; } |
4257 | 4255 |
4258 private: | 4256 private: |
4259 Handle<Promise> promise_; | 4257 Handle<Promise> promise_; |
4260 PromiseRejectEvent event_; | 4258 PromiseRejectEvent event_; |
4261 Handle<Value> value_; | 4259 Handle<Value> value_; |
4262 Handle<StackTrace> stack_trace_; | 4260 Handle<StackTrace> stack_trace_; |
4263 }; | 4261 }; |
4264 | 4262 |
4265 typedef void (*PromiseRejectCallback)(PromiseRejectMessage message); | 4263 typedef void (*PromiseRejectCallback)(PromiseRejectMessage message); |
(...skipping 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7399 */ | 7397 */ |
7400 | 7398 |
7401 | 7399 |
7402 } // namespace v8 | 7400 } // namespace v8 |
7403 | 7401 |
7404 | 7402 |
7405 #undef TYPE_CHECK | 7403 #undef TYPE_CHECK |
7406 | 7404 |
7407 | 7405 |
7408 #endif // V8_H_ | 7406 #endif // V8_H_ |
OLD | NEW |