v8.h   v8.h 
skipping to change at line 1391 skipping to change at line 1391
* Returns true if this value is a NativeError. * Returns true if this value is a NativeError.
*/ */
bool IsNativeError() const; bool IsNativeError() const;
/** /**
* Returns true if this value is a RegExp. * Returns true if this value is a RegExp.
*/ */
bool IsRegExp() const; bool IsRegExp() const;
/** /**
* Returns true if this value is a Promise.
* This is an experimental feature.
*/
bool IsPromise() const;
/**
* Returns true if this value is an ArrayBuffer. * Returns true if this value is an ArrayBuffer.
* This is an experimental feature. * This is an experimental feature.
*/ */
bool IsArrayBuffer() const; bool IsArrayBuffer() const;
/** /**
* Returns true if this value is an ArrayBufferView. * Returns true if this value is an ArrayBufferView.
* This is an experimental feature. * This is an experimental feature.
*/ */
bool IsArrayBufferView() const; bool IsArrayBufferView() const;
skipping to change at line 2494 skipping to change at line 2500
ScriptOrigin GetScriptOrigin() const; ScriptOrigin GetScriptOrigin() const;
V8_INLINE static Function* Cast(Value* obj); V8_INLINE static Function* Cast(Value* obj);
static const int kLineOffsetNotFound; static const int kLineOffsetNotFound;
private: private:
Function(); Function();
static void CheckCast(Value* obj); static void CheckCast(Value* obj);
}; };
/**
* An instance of the built-in Promise constructor (ES6 draft).
* This API is experimental. Only works with --harmony flag.
*/
class V8_EXPORT Promise : public Object {
public:
/**
* Create a new Promise in pending state.
*/
static Local<Promise> New(Isolate* isolate);
/**
* Resolve/reject a promise with a given value.
* Ignored if the promise is not unresolved.
*/
void Resolve(Handle<Value> value);
void Reject(Handle<Value> value);
/**
* Register a resolution/rejection handler with a promise.
* The handler is given the respective resolution/rejection value as
* an argument. If the promise is already resolved/rejected, the handler
is
* invoked at the end of turn.
*/
Local<Promise> Chain(Handle<Function> handler);
Local<Promise> Catch(Handle<Function> handler);
V8_INLINE static Promise* Cast(Value* obj);
private:
Promise();
static void CheckCast(Value* obj);
};
#ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT #ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT
// The number of required internal fields can be defined by embedder. // The number of required internal fields can be defined by embedder.
#define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 2 #define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 2
#endif #endif
/** /**
* An instance of the built-in ArrayBuffer constructor (ES6 draft 15.13.5). * An instance of the built-in ArrayBuffer constructor (ES6 draft 15.13.5).
* This API is experimental and may change significantly. * This API is experimental and may change significantly.
*/ */
class V8_EXPORT ArrayBuffer : public Object { class V8_EXPORT ArrayBuffer : public Object {
skipping to change at line 6013 skipping to change at line 6053
return static_cast<Object*>(value); return static_cast<Object*>(value);
} }
Array* Array::Cast(v8::Value* value) { Array* Array::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS #ifdef V8_ENABLE_CHECKS
CheckCast(value); CheckCast(value);
#endif #endif
return static_cast<Array*>(value); return static_cast<Array*>(value);
} }
Promise* Promise::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS
CheckCast(value);
#endif
return static_cast<Promise*>(value);
}
ArrayBuffer* ArrayBuffer::Cast(v8::Value* value) { ArrayBuffer* ArrayBuffer::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS #ifdef V8_ENABLE_CHECKS
CheckCast(value); CheckCast(value);
#endif #endif
return static_cast<ArrayBuffer*>(value); return static_cast<ArrayBuffer*>(value);
} }
ArrayBufferView* ArrayBufferView::Cast(v8::Value* value) { ArrayBufferView* ArrayBufferView::Cast(v8::Value* value) {
#ifdef V8_ENABLE_CHECKS #ifdef V8_ENABLE_CHECKS
CheckCast(value); CheckCast(value);
 End of changes. 3 change blocks. 
0 lines changed or deleted 48 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/