v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 1222 | skipping to change at line 1222 | |||
int GetEndColumn() const; | int GetEndColumn() const; | |||
/** | /** | |||
* Passes on the value set by the embedder when it fed the script from wh ich | * Passes on the value set by the embedder when it fed the script from wh ich | |||
* this Message was generated to V8. | * this Message was generated to V8. | |||
*/ | */ | |||
bool IsSharedCrossOrigin() const; | bool IsSharedCrossOrigin() const; | |||
// TODO(1245381): Print to a string instead of on a FILE. | // TODO(1245381): Print to a string instead of on a FILE. | |||
static void PrintCurrentStackTrace(Isolate* isolate, FILE* out); | static void PrintCurrentStackTrace(Isolate* isolate, FILE* out); | |||
// Will be deprecated soon. | V8_DEPRECATED("Will be removed", | |||
static void PrintCurrentStackTrace(FILE* out); | static void PrintCurrentStackTrace(FILE* out)); | |||
static const int kNoLineNumberInfo = 0; | static const int kNoLineNumberInfo = 0; | |||
static const int kNoColumnInfo = 0; | static const int kNoColumnInfo = 0; | |||
static const int kNoScriptIdInfo = 0; | static const int kNoScriptIdInfo = 0; | |||
}; | }; | |||
/** | /** | |||
* Representation of a JavaScript stack trace. The information collected is a | * Representation of a JavaScript stack trace. The information collected is a | |||
* snapshot of the execution stack and the information remains valid after | * snapshot of the execution stack and the information remains valid after | |||
* execution continues. | * execution continues. | |||
skipping to change at line 1280 | skipping to change at line 1280 | |||
* Grab a snapshot of the current JavaScript execution stack. | * Grab a snapshot of the current JavaScript execution stack. | |||
* | * | |||
* \param frame_limit The maximum number of stack frames we want to captu re. | * \param frame_limit The maximum number of stack frames we want to captu re. | |||
* \param options Enumerates the set of things we will capture for each | * \param options Enumerates the set of things we will capture for each | |||
* StackFrame. | * StackFrame. | |||
*/ | */ | |||
static Local<StackTrace> CurrentStackTrace( | static Local<StackTrace> CurrentStackTrace( | |||
Isolate* isolate, | Isolate* isolate, | |||
int frame_limit, | int frame_limit, | |||
StackTraceOptions options = kOverview); | StackTraceOptions options = kOverview); | |||
// Will be deprecated soon. | V8_DEPRECATED("Will be removed", | |||
static Local<StackTrace> CurrentStackTrace( | static Local<StackTrace> CurrentStackTrace( | |||
int frame_limit, | int frame_limit, StackTraceOptions options = kOverview) | |||
StackTraceOptions options = kOverview); | ); | |||
}; | }; | |||
/** | /** | |||
* A single JavaScript stack frame. | * A single JavaScript stack frame. | |||
*/ | */ | |||
class V8_EXPORT StackFrame { | class V8_EXPORT StackFrame { | |||
public: | public: | |||
/** | /** | |||
* Returns the number, 1-based, of the line for the associate function ca ll. | * Returns the number, 1-based, of the line for the associate function ca ll. | |||
* This method will return Message::kNoLineNumberInfo if it is unable to | * This method will return Message::kNoLineNumberInfo if it is unable to | |||
skipping to change at line 1608 | skipping to change at line 1607 | |||
class V8_EXPORT Primitive : public Value { }; | class V8_EXPORT Primitive : public Value { }; | |||
/** | /** | |||
* A primitive boolean value (ECMA-262, 4.3.14). Either the true | * A primitive boolean value (ECMA-262, 4.3.14). Either the true | |||
* or false value. | * or false value. | |||
*/ | */ | |||
class V8_EXPORT Boolean : public Primitive { | class V8_EXPORT Boolean : public Primitive { | |||
public: | public: | |||
bool Value() const; | bool Value() const; | |||
V8_INLINE static Handle<Boolean> New(Isolate* isolate, bool value); | V8_INLINE static Handle<Boolean> New(Isolate* isolate, bool value); | |||
// Will be deprecated soon. | V8_DEPRECATED("Will be removed", | |||
V8_INLINE static Handle<Boolean> New(bool value); | V8_INLINE static Handle<Boolean> New(bool value)); | |||
}; | }; | |||
/** | /** | |||
* A JavaScript string value (ECMA-262, 4.3.17). | * A JavaScript string value (ECMA-262, 4.3.17). | |||
*/ | */ | |||
class V8_EXPORT String : public Primitive { | class V8_EXPORT String : public Primitive { | |||
public: | public: | |||
enum Encoding { | enum Encoding { | |||
UNKNOWN_ENCODING = 0x1, | UNKNOWN_ENCODING = 0x1, | |||
TWO_BYTE_ENCODING = 0x0, | TWO_BYTE_ENCODING = 0x0, | |||
skipping to change at line 1878 | skipping to change at line 1877 | |||
/** | /** | |||
* Creates a new external string using the data defined in the given | * Creates a new external string using the data defined in the given | |||
* resource. When the external string is no longer live on V8's heap the | * resource. When the external string is no longer live on V8's heap the | |||
* resource will be disposed by calling its Dispose method. The caller of | * resource will be disposed by calling its Dispose method. The caller of | |||
* this function should not otherwise delete or modify the resource. Neit her | * this function should not otherwise delete or modify the resource. Neit her | |||
* should the underlying buffer be deallocated or modified except through the | * should the underlying buffer be deallocated or modified except through the | |||
* destructor of the external string resource. | * destructor of the external string resource. | |||
*/ | */ | |||
static Local<String> NewExternal(Isolate* isolate, | static Local<String> NewExternal(Isolate* isolate, | |||
ExternalStringResource* resource); | ExternalStringResource* resource); | |||
// Will be deprecated soon. | V8_DEPRECATED("Will be removed", static Local<String> NewExternal( | |||
static Local<String> NewExternal(ExternalStringResource* resource); | ExternalStringResource* resource)); | |||
/** | /** | |||
* Associate an external string resource with this string by transforming it | * Associate an external string resource with this string by transforming it | |||
* in place so that existing references to this string in the JavaScript heap | * in place so that existing references to this string in the JavaScript heap | |||
* will use the external string resource. The external string resource's | * will use the external string resource. The external string resource's | |||
* character contents need to be equivalent to this string. | * character contents need to be equivalent to this string. | |||
* Returns true if the string has been changed to be an external string. | * Returns true if the string has been changed to be an external string. | |||
* The string is not modified if the operation fails. See NewExternal for | * The string is not modified if the operation fails. See NewExternal for | |||
* information on the lifetime of the resource. | * information on the lifetime of the resource. | |||
*/ | */ | |||
skipping to change at line 1902 | skipping to change at line 1901 | |||
/** | /** | |||
* Creates a new external string using the ASCII data defined in the give n | * Creates a new external string using the ASCII data defined in the give n | |||
* resource. When the external string is no longer live on V8's heap the | * resource. When the external string is no longer live on V8's heap the | |||
* resource will be disposed by calling its Dispose method. The caller of | * resource will be disposed by calling its Dispose method. The caller of | |||
* this function should not otherwise delete or modify the resource. Neit her | * this function should not otherwise delete or modify the resource. Neit her | |||
* should the underlying buffer be deallocated or modified except through the | * should the underlying buffer be deallocated or modified except through the | |||
* destructor of the external string resource. | * destructor of the external string resource. | |||
*/ | */ | |||
static Local<String> NewExternal(Isolate* isolate, | static Local<String> NewExternal(Isolate* isolate, | |||
ExternalAsciiStringResource* resource); | ExternalAsciiStringResource* resource); | |||
// Will be deprecated soon. | V8_DEPRECATED("Will be removed", static Local<String> NewExternal( | |||
static Local<String> NewExternal(ExternalAsciiStringResource* resource); | ExternalAsciiStringResource* resour | |||
ce)); | ||||
/** | /** | |||
* Associate an external string resource with this string by transforming it | * Associate an external string resource with this string by transforming it | |||
* in place so that existing references to this string in the JavaScript heap | * in place so that existing references to this string in the JavaScript heap | |||
* will use the external string resource. The external string resource's | * will use the external string resource. The external string resource's | |||
* character contents need to be equivalent to this string. | * character contents need to be equivalent to this string. | |||
* Returns true if the string has been changed to be an external string. | * Returns true if the string has been changed to be an external string. | |||
* The string is not modified if the operation fails. See NewExternal for | * The string is not modified if the operation fails. See NewExternal for | |||
* information on the lifetime of the resource. | * information on the lifetime of the resource. | |||
*/ | */ | |||
skipping to change at line 2450 | skipping to change at line 2449 | |||
* Clones an element at index |index|. Returns an empty | * Clones an element at index |index|. Returns an empty | |||
* handle if cloning fails (for any reason). | * handle if cloning fails (for any reason). | |||
*/ | */ | |||
Local<Object> CloneElementAt(uint32_t index); | Local<Object> CloneElementAt(uint32_t index); | |||
/** | /** | |||
* Creates a JavaScript array with the given length. If the length | * Creates a JavaScript array with the given length. If the length | |||
* is negative the returned array will have length 0. | * is negative the returned array will have length 0. | |||
*/ | */ | |||
static Local<Array> New(Isolate* isolate, int length = 0); | static Local<Array> New(Isolate* isolate, int length = 0); | |||
// Will be deprecated soon. | V8_DEPRECATED("Will be removed", static Local<Array> New(int length = 0)) | |||
static Local<Array> New(int length = 0); | ; | |||
V8_INLINE static Array* Cast(Value* obj); | V8_INLINE static Array* Cast(Value* obj); | |||
private: | private: | |||
Array(); | Array(); | |||
static void CheckCast(Value* obj); | static void CheckCast(Value* obj); | |||
}; | }; | |||
template<typename T> | template<typename T> | |||
class ReturnValue { | class ReturnValue { | |||
public: | public: | |||
skipping to change at line 2709 | skipping to change at line 2707 | |||
*/ | */ | |||
size_t ByteLength() const; | size_t ByteLength() const; | |||
/** | /** | |||
* Create a new ArrayBuffer. Allocate |byte_length| bytes. | * Create a new ArrayBuffer. Allocate |byte_length| bytes. | |||
* Allocated memory will be owned by a created ArrayBuffer and | * Allocated memory will be owned by a created ArrayBuffer and | |||
* will be deallocated when it is garbage-collected, | * will be deallocated when it is garbage-collected, | |||
* unless the object is externalized. | * unless the object is externalized. | |||
*/ | */ | |||
static Local<ArrayBuffer> New(Isolate* isolate, size_t byte_length); | static Local<ArrayBuffer> New(Isolate* isolate, size_t byte_length); | |||
// Will be deprecated soon. | V8_DEPRECATED("Will be removed", | |||
static Local<ArrayBuffer> New(size_t byte_length); | static Local<ArrayBuffer> New(size_t byte_length)); | |||
/** | /** | |||
* Create a new ArrayBuffer over an existing memory block. | * Create a new ArrayBuffer over an existing memory block. | |||
* The created array buffer is immediately in externalized state. | * The created array buffer is immediately in externalized state. | |||
* The memory block will not be reclaimed when a created ArrayBuffer | * The memory block will not be reclaimed when a created ArrayBuffer | |||
* is garbage-collected. | * is garbage-collected. | |||
*/ | */ | |||
static Local<ArrayBuffer> New(Isolate* isolate, void* data, | static Local<ArrayBuffer> New(Isolate* isolate, void* data, | |||
size_t byte_length); | size_t byte_length); | |||
// Will be deprecated soon. | V8_DEPRECATED("Will be removed", | |||
static Local<ArrayBuffer> New(void* data, size_t byte_length); | static Local<ArrayBuffer> New(void* data, size_t byte_lengt | |||
h)); | ||||
/** | /** | |||
* Returns true if ArrayBuffer is extrenalized, that is, does not | * Returns true if ArrayBuffer is extrenalized, that is, does not | |||
* own its memory block. | * own its memory block. | |||
*/ | */ | |||
bool IsExternal() const; | bool IsExternal() const; | |||
/** | /** | |||
* Neuters this ArrayBuffer and all its views (typed arrays). | * Neuters this ArrayBuffer and all its views (typed arrays). | |||
* Neutering sets the byte length of the buffer and all typed arrays to z ero, | * Neutering sets the byte length of the buffer and all typed arrays to z ero, | |||
skipping to change at line 2969 | skipping to change at line 2967 | |||
DataView(); | DataView(); | |||
static void CheckCast(Value* obj); | static void CheckCast(Value* obj); | |||
}; | }; | |||
/** | /** | |||
* An instance of the built-in Date constructor (ECMA-262, 15.9). | * An instance of the built-in Date constructor (ECMA-262, 15.9). | |||
*/ | */ | |||
class V8_EXPORT Date : public Object { | class V8_EXPORT Date : public Object { | |||
public: | public: | |||
static Local<Value> New(Isolate* isolate, double time); | static Local<Value> New(Isolate* isolate, double time); | |||
// Will be deprecated soon. | V8_DEPRECATED("Will be removed", static Local<Value> New(double time)); | |||
static Local<Value> New(double time); | ||||
V8_DEPRECATED( | V8_DEPRECATED( | |||
"Use ValueOf instead", | "Use ValueOf instead", | |||
double NumberValue() const) { return ValueOf(); } | double NumberValue() const) { return ValueOf(); } | |||
/** | /** | |||
* A specialization of Value::NumberValue that is more efficient | * A specialization of Value::NumberValue that is more efficient | |||
* because we know the structure of this object. | * because we know the structure of this object. | |||
*/ | */ | |||
double ValueOf() const; | double ValueOf() const; | |||
skipping to change at line 2997 | skipping to change at line 2994 | |||
* parameters. V8 keeps a cache of various values used for | * parameters. V8 keeps a cache of various values used for | |||
* date / time computation. This notification will reset | * date / time computation. This notification will reset | |||
* those cached values for the current context so that date / | * those cached values for the current context so that date / | |||
* time configuration changes would be reflected in the Date | * time configuration changes would be reflected in the Date | |||
* object. | * object. | |||
* | * | |||
* This API should not be called more than needed as it will | * This API should not be called more than needed as it will | |||
* negatively impact the performance of date operations. | * negatively impact the performance of date operations. | |||
*/ | */ | |||
static void DateTimeConfigurationChangeNotification(Isolate* isolate); | static void DateTimeConfigurationChangeNotification(Isolate* isolate); | |||
// Will be deprecated soon. | V8_DEPRECATED("Will be removed", | |||
static void DateTimeConfigurationChangeNotification(); | static void DateTimeConfigurationChangeNotification()); | |||
private: | private: | |||
static void CheckCast(v8::Value* obj); | static void CheckCast(v8::Value* obj); | |||
}; | }; | |||
/** | /** | |||
* A Number object (ECMA-262, 4.3.21). | * A Number object (ECMA-262, 4.3.21). | |||
*/ | */ | |||
class V8_EXPORT NumberObject : public Object { | class V8_EXPORT NumberObject : public Object { | |||
public: | public: | |||
static Local<Value> New(Isolate* isolate, double value); | static Local<Value> New(Isolate* isolate, double value); | |||
// Will be deprecated soon. | V8_DEPRECATED("Will be removed", static Local<Value> New(double value)); | |||
static Local<Value> New(double value); | ||||
V8_DEPRECATED( | V8_DEPRECATED( | |||
"Use ValueOf instead", | "Use ValueOf instead", | |||
double NumberValue() const) { return ValueOf(); } | double NumberValue() const) { return ValueOf(); } | |||
/** | /** | |||
* Returns the Number held by the object. | * Returns the Number held by the object. | |||
*/ | */ | |||
double ValueOf() const; | double ValueOf() const; | |||
skipping to change at line 3166 | skipping to change at line 3162 | |||
/** | /** | |||
* The superclass of object and function templates. | * The superclass of object and function templates. | |||
*/ | */ | |||
class V8_EXPORT Template : public Data { | class V8_EXPORT Template : public Data { | |||
public: | public: | |||
/** Adds a property to each instance created by this template.*/ | /** Adds a property to each instance created by this template.*/ | |||
void Set(Handle<String> name, Handle<Data> value, | void Set(Handle<String> name, Handle<Data> value, | |||
PropertyAttribute attributes = None); | PropertyAttribute attributes = None); | |||
V8_INLINE void Set(Isolate* isolate, const char* name, Handle<Data> value ); | V8_INLINE void Set(Isolate* isolate, const char* name, Handle<Data> value ); | |||
// Will be deprecated soon. | V8_DEPRECATED("Will be removed", | |||
V8_INLINE void Set(const char* name, Handle<Data> value); | V8_INLINE void Set(const char* name, Handle<Data> value)); | |||
void SetAccessorProperty( | void SetAccessorProperty( | |||
Local<String> name, | Local<String> name, | |||
Local<FunctionTemplate> getter = Local<FunctionTemplate>(), | Local<FunctionTemplate> getter = Local<FunctionTemplate>(), | |||
Local<FunctionTemplate> setter = Local<FunctionTemplate>(), | Local<FunctionTemplate> setter = Local<FunctionTemplate>(), | |||
PropertyAttribute attribute = None, | PropertyAttribute attribute = None, | |||
AccessControl settings = DEFAULT); | AccessControl settings = DEFAULT); | |||
/** | /** | |||
* Whenever the property with the given name is accessed on objects | * Whenever the property with the given name is accessed on objects | |||
skipping to change at line 3687 | skipping to change at line 3683 | |||
* A Signature specifies which receivers and arguments are valid | * A Signature specifies which receivers and arguments are valid | |||
* parameters to a function. | * parameters to a function. | |||
*/ | */ | |||
class V8_EXPORT Signature : public Data { | class V8_EXPORT Signature : public Data { | |||
public: | public: | |||
static Local<Signature> New(Isolate* isolate, | static Local<Signature> New(Isolate* isolate, | |||
Handle<FunctionTemplate> receiver = | Handle<FunctionTemplate> receiver = | |||
Handle<FunctionTemplate>(), | Handle<FunctionTemplate>(), | |||
int argc = 0, | int argc = 0, | |||
Handle<FunctionTemplate> argv[] = 0); | Handle<FunctionTemplate> argv[] = 0); | |||
// Will be deprecated soon. | V8_DEPRECATED("Will be removed", | |||
static Local<Signature> New(Handle<FunctionTemplate> receiver = | static Local<Signature> New(Handle<FunctionTemplate> receiv | |||
Handle<FunctionTemplate>(), | er = | |||
int argc = 0, | Handle<FunctionTemplate>(), | |||
Handle<FunctionTemplate> argv[] = 0); | int argc = 0, | |||
Handle<FunctionTemplate> argv[] | ||||
= | ||||
0)); | ||||
private: | private: | |||
Signature(); | Signature(); | |||
}; | }; | |||
/** | /** | |||
* An AccessorSignature specifies which receivers are valid parameters | * An AccessorSignature specifies which receivers are valid parameters | |||
* to an accessor callback. | * to an accessor callback. | |||
*/ | */ | |||
class V8_EXPORT AccessorSignature : public Data { | class V8_EXPORT AccessorSignature : public Data { | |||
public: | public: | |||
static Local<AccessorSignature> New(Isolate* isolate, | static Local<AccessorSignature> New(Isolate* isolate, | |||
Handle<FunctionTemplate> receiver = | Handle<FunctionTemplate> receiver = | |||
Handle<FunctionTemplate>()); | Handle<FunctionTemplate>()); | |||
// Will be deprecated soon. | V8_DEPRECATED("Will be removed", static Local<AccessorSignature> New( | |||
static Local<AccessorSignature> New(Handle<FunctionTemplate> receiver = | Handle<FunctionTemplate> receiver = | |||
Handle<FunctionTemplate>()); | Handle<FunctionTemplate>())); | |||
private: | private: | |||
AccessorSignature(); | AccessorSignature(); | |||
}; | }; | |||
class V8_EXPORT DeclaredAccessorDescriptor : public Data { | class V8_EXPORT DeclaredAccessorDescriptor : public Data { | |||
private: | private: | |||
DeclaredAccessorDescriptor(); | DeclaredAccessorDescriptor(); | |||
}; | }; | |||
skipping to change at line 3808 | skipping to change at line 3806 | |||
// Note that the strings passed into this constructor must live as long | // Note that the strings passed into this constructor must live as long | |||
// as the Extension itself. | // as the Extension itself. | |||
Extension(const char* name, | Extension(const char* name, | |||
const char* source = 0, | const char* source = 0, | |||
int dep_count = 0, | int dep_count = 0, | |||
const char** deps = 0, | const char** deps = 0, | |||
int source_length = -1); | int source_length = -1); | |||
virtual ~Extension() { } | virtual ~Extension() { } | |||
virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate( | virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate( | |||
v8::Isolate* isolate, v8::Handle<v8::String> name) { | v8::Isolate* isolate, v8::Handle<v8::String> name) { | |||
#if defined(V8_DEPRECATION_WARNINGS) | ||||
return v8::Handle<v8::FunctionTemplate>(); | ||||
#else | ||||
return GetNativeFunction(name); | return GetNativeFunction(name); | |||
#endif | ||||
} | } | |||
// Will be deprecated soon. | ||||
virtual v8::Handle<v8::FunctionTemplate> | V8_DEPRECATED("Will be removed", | |||
GetNativeFunction(v8::Handle<v8::String> name) { | virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( | |||
v8::Handle<v8::String> name)) { | ||||
return v8::Handle<v8::FunctionTemplate>(); | return v8::Handle<v8::FunctionTemplate>(); | |||
} | } | |||
const char* name() const { return name_; } | const char* name() const { return name_; } | |||
size_t source_length() const { return source_length_; } | size_t source_length() const { return source_length_; } | |||
const String::ExternalAsciiStringResource* source() const { | const String::ExternalAsciiStringResource* source() const { | |||
return &source_; } | return &source_; } | |||
int dependency_count() { return dep_count_; } | int dependency_count() { return dep_count_; } | |||
const char** dependencies() { return deps_; } | const char** dependencies() { return deps_; } | |||
void set_auto_enable(bool value) { auto_enable_ = value; } | void set_auto_enable(bool value) { auto_enable_ = value; } | |||
skipping to change at line 3857 | skipping to change at line 3860 | |||
} | } | |||
}; | }; | |||
// --- Statics --- | // --- Statics --- | |||
V8_INLINE Handle<Primitive> Undefined(Isolate* isolate); | V8_INLINE Handle<Primitive> Undefined(Isolate* isolate); | |||
V8_INLINE Handle<Primitive> Null(Isolate* isolate); | V8_INLINE Handle<Primitive> Null(Isolate* isolate); | |||
V8_INLINE Handle<Boolean> True(Isolate* isolate); | V8_INLINE Handle<Boolean> True(Isolate* isolate); | |||
V8_INLINE Handle<Boolean> False(Isolate* isolate); | V8_INLINE Handle<Boolean> False(Isolate* isolate); | |||
// Will be removed soon. | V8_DEPRECATED("Will be removed", Handle<Primitive> V8_EXPORT Undefined()); | |||
Handle<Primitive> V8_EXPORT Undefined(); | V8_DEPRECATED("Will be removed", Handle<Primitive> V8_EXPORT Null()); | |||
Handle<Primitive> V8_EXPORT Null(); | V8_DEPRECATED("Will be removed", Handle<Boolean> V8_EXPORT True()); | |||
Handle<Boolean> V8_EXPORT True(); | V8_DEPRECATED("Will be removed", Handle<Boolean> V8_EXPORT False()); | |||
Handle<Boolean> V8_EXPORT False(); | ||||
/** | /** | |||
* A set of constraints that specifies the limits of the runtime's memory u se. | * A set of constraints that specifies the limits of the runtime's memory u se. | |||
* You must set the heap size before initializing the VM - the size cannot be | * You must set the heap size before initializing the VM - the size cannot be | |||
* adjusted after the VM is initialized. | * adjusted after the VM is initialized. | |||
* | * | |||
* If you are using threads then you should hold the V8::Locker lock while | * If you are using threads then you should hold the V8::Locker lock while | |||
* setting the stack limit and you must set a non-default stack limit separ ately | * setting the stack limit and you must set a non-default stack limit separ ately | |||
* for each thread. | * for each thread. | |||
*/ | */ | |||
End of changes. 18 change blocks. | ||||
42 lines changed or deleted | 50 lines changed or added | |||