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

Side by Side Diff: include/v8.h

Issue 607913002: Report promise reject with no handler (behind a flag). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: more comments Created 6 years, 2 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.h » ('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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 class Integer; 78 class Integer;
79 class Isolate; 79 class Isolate;
80 class Name; 80 class Name;
81 class Number; 81 class Number;
82 class NumberObject; 82 class NumberObject;
83 class Object; 83 class Object;
84 class ObjectOperationDescriptor; 84 class ObjectOperationDescriptor;
85 class ObjectTemplate; 85 class ObjectTemplate;
86 class Platform; 86 class Platform;
87 class Primitive; 87 class Primitive;
88 class Promise;
88 class RawOperationDescriptor; 89 class RawOperationDescriptor;
89 class Script; 90 class Script;
90 class Signature; 91 class Signature;
91 class StackFrame; 92 class StackFrame;
92 class StackTrace; 93 class StackTrace;
93 class String; 94 class String;
94 class StringObject; 95 class StringObject;
95 class Symbol; 96 class Symbol;
96 class SymbolObject; 97 class SymbolObject;
97 class Private; 98 class Private;
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 1230
1230 /** 1231 /**
1231 * An error message. 1232 * An error message.
1232 */ 1233 */
1233 class V8_EXPORT Message { 1234 class V8_EXPORT Message {
1234 public: 1235 public:
1235 Local<String> Get() const; 1236 Local<String> Get() const;
1236 Local<String> GetSourceLine() const; 1237 Local<String> GetSourceLine() const;
1237 1238
1238 /** 1239 /**
1240 * Returns the promise attached to this message. If this message has not
1241 * been triggered by a promise rejection, the empty handle is returned.
1242 */
1243 Handle<Promise> GetPromise() const;
1244
1245 /**
1239 * Returns the origin for the script from where the function causing the 1246 * Returns the origin for the script from where the function causing the
1240 * error originates. 1247 * error originates.
1241 */ 1248 */
1242 ScriptOrigin GetScriptOrigin() const; 1249 ScriptOrigin GetScriptOrigin() const;
1243 1250
1244 /** 1251 /**
1245 * Returns the resource name for the script from where the function causing 1252 * Returns the resource name for the script from where the function causing
1246 * the error originates. 1253 * the error originates.
1247 */ 1254 */
1248 Handle<Value> GetScriptResourceName() const; 1255 Handle<Value> GetScriptResourceName() const;
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
2810 2817
2811 /** 2818 /**
2812 * Register a resolution/rejection handler with a promise. 2819 * Register a resolution/rejection handler with a promise.
2813 * The handler is given the respective resolution/rejection value as 2820 * The handler is given the respective resolution/rejection value as
2814 * an argument. If the promise is already resolved/rejected, the handler is 2821 * an argument. If the promise is already resolved/rejected, the handler is
2815 * invoked at the end of turn. 2822 * invoked at the end of turn.
2816 */ 2823 */
2817 Local<Promise> Chain(Handle<Function> handler); 2824 Local<Promise> Chain(Handle<Function> handler);
2818 Local<Promise> Catch(Handle<Function> handler); 2825 Local<Promise> Catch(Handle<Function> handler);
2819 Local<Promise> Then(Handle<Function> handler); 2826 Local<Promise> Then(Handle<Function> handler);
2827 bool HasRejectHandler();
2820 2828
2821 V8_INLINE static Promise* Cast(Value* obj); 2829 V8_INLINE static Promise* Cast(Value* obj);
2822 2830
2823 private: 2831 private:
2824 Promise(); 2832 Promise();
2825 static void CheckCast(Value* obj); 2833 static void CheckCast(Value* obj);
2826 }; 2834 };
2827 2835
2828 2836
2829 #ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 2837 #ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT
(...skipping 2983 matching lines...) Expand 10 before | Expand all | Expand 10 after
5813 4 * kApiPointerSize; 5821 4 * kApiPointerSize;
5814 static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset = 5822 static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset =
5815 kAmountOfExternalAllocatedMemoryOffset + kApiInt64Size; 5823 kAmountOfExternalAllocatedMemoryOffset + kApiInt64Size;
5816 static const int kIsolateRootsOffset = 5824 static const int kIsolateRootsOffset =
5817 kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset + kApiInt64Size + 5825 kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset + kApiInt64Size +
5818 kApiPointerSize; 5826 kApiPointerSize;
5819 static const int kUndefinedValueRootIndex = 5; 5827 static const int kUndefinedValueRootIndex = 5;
5820 static const int kNullValueRootIndex = 7; 5828 static const int kNullValueRootIndex = 7;
5821 static const int kTrueValueRootIndex = 8; 5829 static const int kTrueValueRootIndex = 8;
5822 static const int kFalseValueRootIndex = 9; 5830 static const int kFalseValueRootIndex = 9;
5823 static const int kEmptyStringRootIndex = 164; 5831 static const int kEmptyStringRootIndex = 165;
5824 5832
5825 // The external allocation limit should be below 256 MB on all architectures 5833 // The external allocation limit should be below 256 MB on all architectures
5826 // to avoid that resource-constrained embedders run low on memory. 5834 // to avoid that resource-constrained embedders run low on memory.
5827 static const int kExternalAllocationLimit = 192 * 1024 * 1024; 5835 static const int kExternalAllocationLimit = 192 * 1024 * 1024;
5828 5836
5829 static const int kNodeClassIdOffset = 1 * kApiPointerSize; 5837 static const int kNodeClassIdOffset = 1 * kApiPointerSize;
5830 static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3; 5838 static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3;
5831 static const int kNodeStateMask = 0xf; 5839 static const int kNodeStateMask = 0xf;
5832 static const int kNodeStateIsWeakValue = 2; 5840 static const int kNodeStateIsWeakValue = 2;
5833 static const int kNodeStateIsPendingValue = 3; 5841 static const int kNodeStateIsPendingValue = 3;
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
6949 */ 6957 */
6950 6958
6951 6959
6952 } // namespace v8 6960 } // namespace v8
6953 6961
6954 6962
6955 #undef TYPE_CHECK 6963 #undef TYPE_CHECK
6956 6964
6957 6965
6958 #endif // V8_H_ 6966 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698