v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 1122 | skipping to change at line 1122 | |||
*/ | */ | |||
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); | ||||
// Will be deprecated soon. | ||||
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 | |||
skipping to change at line 1176 | skipping to change at line 1178 | |||
Local<Array> AsArray(); | Local<Array> AsArray(); | |||
/** | /** | |||
* 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, | ||||
int frame_limit, | ||||
StackTraceOptions options = kOverview); | ||||
// Will be deprecated soon. | ||||
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: | |||
/** | /** | |||
skipping to change at line 1501 | skipping to change at line 1508 | |||
*/ | */ | |||
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); | ||||
// Will be deprecated soon. | ||||
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, | |||
skipping to change at line 1768 | skipping to change at line 1777 | |||
static Local<String> Concat(Handle<String> left, Handle<String> right); | static Local<String> Concat(Handle<String> left, Handle<String> right); | |||
/** | /** | |||
* 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, | ||||
ExternalStringResource* resource); | ||||
// Will be deprecated soon. | ||||
static Local<String> NewExternal(ExternalStringResource* resource); | static Local<String> NewExternal(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 1789 | skipping to change at line 1801 | |||
bool MakeExternal(ExternalStringResource* resource); | bool MakeExternal(ExternalStringResource* resource); | |||
/** | /** | |||
* 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, | ||||
ExternalAsciiStringResource* resource); | ||||
// Will be deprecated soon. | ||||
static Local<String> NewExternal(ExternalAsciiStringResource* resource); | static Local<String> NewExternal(ExternalAsciiStringResource* 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 1939 | skipping to change at line 1954 | |||
private: | private: | |||
Private(); | Private(); | |||
}; | }; | |||
/** | /** | |||
* A JavaScript number value (ECMA-262, 4.3.20) | * A JavaScript number value (ECMA-262, 4.3.20) | |||
*/ | */ | |||
class V8_EXPORT Number : public Primitive { | class V8_EXPORT Number : public Primitive { | |||
public: | public: | |||
double Value() const; | double Value() const; | |||
static Local<Number> New(double value); | ||||
static Local<Number> New(Isolate* isolate, double value); | static Local<Number> New(Isolate* isolate, double value); | |||
// Will be deprecated soon. | ||||
static Local<Number> New(double value); | ||||
V8_INLINE static Number* Cast(v8::Value* obj); | V8_INLINE static Number* Cast(v8::Value* obj); | |||
private: | private: | |||
Number(); | Number(); | |||
static void CheckCast(v8::Value* obj); | static void CheckCast(v8::Value* obj); | |||
}; | }; | |||
/** | /** | |||
* A JavaScript value representing a signed integer. | * A JavaScript value representing a signed integer. | |||
*/ | */ | |||
class V8_EXPORT Integer : public Number { | class V8_EXPORT Integer : public Number { | |||
public: | public: | |||
static Local<Integer> New(int32_t value); | static Local<Integer> New(Isolate* isolate, int32_t value); | |||
static Local<Integer> NewFromUnsigned(uint32_t value); | static Local<Integer> NewFromUnsigned(Isolate* isolate, uint32_t value); | |||
// Will be deprecated soon. | ||||
static Local<Integer> New(int32_t value, Isolate*); | static Local<Integer> New(int32_t value, Isolate*); | |||
static Local<Integer> NewFromUnsigned(uint32_t value, Isolate*); | static Local<Integer> NewFromUnsigned(uint32_t value, Isolate*); | |||
static Local<Integer> New(int32_t value); | ||||
static Local<Integer> NewFromUnsigned(uint32_t value); | ||||
int64_t Value() const; | int64_t Value() const; | |||
V8_INLINE static Integer* Cast(v8::Value* obj); | V8_INLINE static Integer* Cast(v8::Value* obj); | |||
private: | private: | |||
Integer(); | Integer(); | |||
static void CheckCast(v8::Value* obj); | static void CheckCast(v8::Value* obj); | |||
}; | }; | |||
/** | /** | |||
* A JavaScript value representing a 32-bit signed integer. | * A JavaScript value representing a 32-bit signed integer. | |||
*/ | */ | |||
skipping to change at line 2302 | skipping to change at line 2321 | |||
int argc, | int argc, | |||
Handle<Value> argv[]); | Handle<Value> argv[]); | |||
/** | /** | |||
* Call an Object as a constructor if a callback is set by the | * Call an Object as a constructor if a callback is set by the | |||
* ObjectTemplate::SetCallAsFunctionHandler method. | * ObjectTemplate::SetCallAsFunctionHandler method. | |||
* Note: This method behaves like the Function::NewInstance method. | * Note: This method behaves like the Function::NewInstance method. | |||
*/ | */ | |||
Local<Value> CallAsConstructor(int argc, Handle<Value> argv[]); | Local<Value> CallAsConstructor(int argc, Handle<Value> argv[]); | |||
static Local<Object> New(Isolate* isolate); | ||||
// Will be deprecated soon. | ||||
static Local<Object> New(); | static Local<Object> New(); | |||
V8_INLINE static Object* Cast(Value* obj); | V8_INLINE static Object* Cast(Value* obj); | |||
private: | private: | |||
Object(); | Object(); | |||
static void CheckCast(Value* obj); | static void CheckCast(Value* obj); | |||
Local<Value> SlowGetInternalField(int index); | Local<Value> SlowGetInternalField(int index); | |||
void* SlowGetAlignedPointerFromInternalField(int index); | void* SlowGetAlignedPointerFromInternalField(int index); | |||
}; | }; | |||
skipping to change at line 2329 | skipping to change at line 2350 | |||
/** | /** | |||
* 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); | ||||
// Will be deprecated soon. | ||||
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 { | |||
skipping to change at line 2586 | skipping to change at line 2609 | |||
* Data length in bytes. | * Data length in bytes. | |||
*/ | */ | |||
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); | ||||
// Will be deprecated soon. | ||||
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, | ||||
size_t byte_length); | ||||
// Will be deprecated soon. | ||||
static Local<ArrayBuffer> New(void* data, size_t byte_length); | static Local<ArrayBuffer> New(void* data, size_t byte_length); | |||
/** | /** | |||
* 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). | |||
skipping to change at line 2841 | skipping to change at line 2869 | |||
private: | private: | |||
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); | ||||
// Will be deprecated soon. | ||||
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. | |||
*/ | */ | |||
skipping to change at line 2867 | skipping to change at line 2897 | |||
* daylight savings time, or other date / time configuration | * daylight savings time, or other date / time configuration | |||
* 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); | ||||
// Will be deprecated soon. | ||||
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); | ||||
// Will be deprecated soon. | ||||
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 3032 | skipping to change at line 3066 | |||
// --- Templates --- | // --- Templates --- | |||
/** | /** | |||
* 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 | ||||
); | ||||
// Will be deprecated soon. | ||||
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); | |||
/** | /** | |||
skipping to change at line 3301 | skipping to change at line 3337 | |||
* \code | * \code | |||
* child_func.prototype.__proto__ == function.prototype; | * child_func.prototype.__proto__ == function.prototype; | |||
* child_instance.instance_accessor calls 'InstanceAccessorCallback' | * child_instance.instance_accessor calls 'InstanceAccessorCallback' | |||
* child_instance.instance_property == 3; | * child_instance.instance_property == 3; | |||
* \endcode | * \endcode | |||
*/ | */ | |||
class V8_EXPORT FunctionTemplate : public Template { | class V8_EXPORT FunctionTemplate : public Template { | |||
public: | public: | |||
/** Creates a function template.*/ | /** Creates a function template.*/ | |||
static Local<FunctionTemplate> New( | static Local<FunctionTemplate> New( | |||
Isolate* isolate, | ||||
FunctionCallback callback = 0, | ||||
Handle<Value> data = Handle<Value>(), | ||||
Handle<Signature> signature = Handle<Signature>(), | ||||
int length = 0); | ||||
// Will be deprecated soon. | ||||
static Local<FunctionTemplate> New( | ||||
FunctionCallback callback = 0, | FunctionCallback callback = 0, | |||
Handle<Value> data = Handle<Value>(), | Handle<Value> data = Handle<Value>(), | |||
Handle<Signature> signature = Handle<Signature>(), | Handle<Signature> signature = Handle<Signature>(), | |||
int length = 0); | int length = 0); | |||
/** Returns the unique function instance in the current execution context .*/ | /** Returns the unique function instance in the current execution context .*/ | |||
Local<Function> GetFunction(); | Local<Function> GetFunction(); | |||
/** | /** | |||
* Set the call-handler callback for a FunctionTemplate. This | * Set the call-handler callback for a FunctionTemplate. This | |||
skipping to change at line 3386 | skipping to change at line 3429 | |||
/** | /** | |||
* An ObjectTemplate is used to create objects at runtime. | * An ObjectTemplate is used to create objects at runtime. | |||
* | * | |||
* Properties added to an ObjectTemplate are added to each object | * Properties added to an ObjectTemplate are added to each object | |||
* created from the ObjectTemplate. | * created from the ObjectTemplate. | |||
*/ | */ | |||
class V8_EXPORT ObjectTemplate : public Template { | class V8_EXPORT ObjectTemplate : public Template { | |||
public: | public: | |||
/** Creates an ObjectTemplate. */ | /** Creates an ObjectTemplate. */ | |||
static Local<ObjectTemplate> New(Isolate* isolate); | ||||
// Will be deprecated soon. | ||||
static Local<ObjectTemplate> New(); | static Local<ObjectTemplate> New(); | |||
/** Creates a new instance of this template.*/ | /** Creates a new instance of this template.*/ | |||
Local<Object> NewInstance(); | Local<Object> NewInstance(); | |||
/** | /** | |||
* Sets an accessor on the object template. | * Sets an accessor on the object template. | |||
* | * | |||
* Whenever the property with the given name is accessed on objects | * Whenever the property with the given name is accessed on objects | |||
* created from this ObjectTemplate the getter and setter callbacks | * created from this ObjectTemplate the getter and setter callbacks | |||
skipping to change at line 3527 | skipping to change at line 3572 | |||
int InternalFieldCount(); | int InternalFieldCount(); | |||
/** | /** | |||
* Sets the number of internal fields for objects generated from | * Sets the number of internal fields for objects generated from | |||
* this template. | * this template. | |||
*/ | */ | |||
void SetInternalFieldCount(int value); | void SetInternalFieldCount(int value); | |||
private: | private: | |||
ObjectTemplate(); | ObjectTemplate(); | |||
static Local<ObjectTemplate> New(Handle<FunctionTemplate> constructor); | static Local<ObjectTemplate> New(internal::Isolate* isolate, | |||
Handle<FunctionTemplate> constructor); | ||||
friend class FunctionTemplate; | friend class FunctionTemplate; | |||
}; | }; | |||
/** | /** | |||
* 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, | ||||
Handle<FunctionTemplate> receiver = | ||||
Handle<FunctionTemplate>(), | ||||
int argc = 0, | ||||
Handle<FunctionTemplate> argv[] = 0); | ||||
// Will be deprecated soon. | ||||
static Local<Signature> New(Handle<FunctionTemplate> receiver = | static Local<Signature> New(Handle<FunctionTemplate> receiver = | |||
Handle<FunctionTemplate>(), | Handle<FunctionTemplate>(), | |||
int argc = 0, | int argc = 0, | |||
Handle<FunctionTemplate> argv[] = 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, | ||||
Handle<FunctionTemplate> receiver = | ||||
Handle<FunctionTemplate>()); | ||||
// Will be deprecated soon. | ||||
static Local<AccessorSignature> New(Handle<FunctionTemplate> receiver = | static Local<AccessorSignature> New(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(); | |||
}; | }; | |||
class V8_EXPORT ObjectOperationDescriptor : public Data { | class V8_EXPORT ObjectOperationDescriptor : public Data { | |||
skipping to change at line 3650 | skipping to change at line 3707 | |||
class V8_EXPORT Extension { // NOLINT | class V8_EXPORT Extension { // NOLINT | |||
public: | public: | |||
// 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( | ||||
v8::Isolate* isolate, v8::Handle<v8::String> name) { | ||||
return GetNativeFunction(name); | ||||
} | ||||
// Will be deprecated soon. | ||||
virtual v8::Handle<v8::FunctionTemplate> | virtual v8::Handle<v8::FunctionTemplate> | |||
GetNativeFunction(v8::Handle<v8::String> name) { | 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_; } | |||
skipping to change at line 3691 | skipping to change at line 3753 | |||
*/ | */ | |||
class V8_EXPORT DeclareExtension { | class V8_EXPORT DeclareExtension { | |||
public: | public: | |||
V8_INLINE DeclareExtension(Extension* extension) { | V8_INLINE DeclareExtension(Extension* extension) { | |||
RegisterExtension(extension); | RegisterExtension(extension); | |||
} | } | |||
}; | }; | |||
// --- Statics --- | // --- Statics --- | |||
Handle<Primitive> V8_EXPORT Undefined(); | ||||
Handle<Primitive> V8_EXPORT Null(); | ||||
Handle<Boolean> V8_EXPORT True(); | ||||
Handle<Boolean> V8_EXPORT False(); | ||||
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. | ||||
Handle<Primitive> V8_EXPORT Undefined(); | ||||
Handle<Primitive> V8_EXPORT Null(); | ||||
Handle<Boolean> V8_EXPORT True(); | ||||
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. | |||
*/ | */ | |||
class V8_EXPORT ResourceConstraints { | class V8_EXPORT ResourceConstraints { | |||
skipping to change at line 5874 | skipping to change at line 5937 | |||
} | } | |||
Handle<Integer> ScriptOrigin::ResourceColumnOffset() const { | Handle<Integer> ScriptOrigin::ResourceColumnOffset() const { | |||
return resource_column_offset_; | return resource_column_offset_; | |||
} | } | |||
Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const { | Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const { | |||
return resource_is_shared_cross_origin_; | return resource_is_shared_cross_origin_; | |||
} | } | |||
Handle<Boolean> Boolean::New(bool value) { | Handle<Boolean> Boolean::New(Isolate* isolate, bool value) { | |||
Isolate* isolate = Isolate::GetCurrent(); | ||||
return value ? True(isolate) : False(isolate); | return value ? True(isolate) : False(isolate); | |||
} | } | |||
Handle<Boolean> Boolean::New(bool value) { | ||||
return Boolean::New(Isolate::GetCurrent(), value); | ||||
} | ||||
void Template::Set(Isolate* isolate, const char* name, v8::Handle<Data> val | ||||
ue) { | ||||
Set(v8::String::NewFromUtf8(isolate, name), value); | ||||
} | ||||
void Template::Set(const char* name, v8::Handle<Data> value) { | void Template::Set(const char* name, v8::Handle<Data> value) { | |||
Set(v8::String::NewFromUtf8(Isolate::GetCurrent(), name), value); | Set(Isolate::GetCurrent(), name, value); | |||
} | } | |||
Local<Value> Object::GetInternalField(int index) { | Local<Value> Object::GetInternalField(int index) { | |||
#ifndef V8_ENABLE_CHECKS | #ifndef V8_ENABLE_CHECKS | |||
typedef internal::Object O; | typedef internal::Object O; | |||
typedef internal::HeapObject HO; | typedef internal::HeapObject HO; | |||
typedef internal::Internals I; | typedef internal::Internals I; | |||
O* obj = *reinterpret_cast<O**>(this); | O* obj = *reinterpret_cast<O**>(this); | |||
// Fast path: If the object is a plain JSObject, which is the common case , we | // Fast path: If the object is a plain JSObject, which is the common case , we | |||
// know where to find the internal fields and can return the value direct ly. | // know where to find the internal fields and can return the value direct ly. | |||
End of changes. 29 change blocks. | ||||
12 lines changed or deleted | 84 lines changed or added | |||