| Index: include/v8.h
|
| diff --git a/include/v8.h b/include/v8.h
|
| index c683fb91bdba59dd5ecdb825d23716dd9e52c401..d463393fd8a8dcff44452da7f769d992994fe255 100644
|
| --- a/include/v8.h
|
| +++ b/include/v8.h
|
| @@ -128,7 +128,7 @@ class Data;
|
| * \param object the weak global object to be reclaimed by the garbage collector
|
| * \param parameter the value passed in when making the weak global object
|
| */
|
| -typedef void (*WeakReferenceCallback)(Persistent<Object> object,
|
| +typedef void (*WeakReferenceCallback)(Persistent<Value> object,
|
| void* parameter);
|
|
|
|
|
| @@ -512,9 +512,9 @@ class EXPORT ScriptOrigin {
|
| : resource_name_(resource_name),
|
| resource_line_offset_(resource_line_offset),
|
| resource_column_offset_(resource_column_offset) { }
|
| - inline Handle<Value> ResourceName();
|
| - inline Handle<Integer> ResourceLineOffset();
|
| - inline Handle<Integer> ResourceColumnOffset();
|
| + inline Handle<Value> ResourceName() const;
|
| + inline Handle<Integer> ResourceLineOffset() const;
|
| + inline Handle<Integer> ResourceColumnOffset() const;
|
| private:
|
| Handle<Value> resource_name_;
|
| Handle<Integer> resource_line_offset_;
|
| @@ -559,16 +559,7 @@ class EXPORT Message {
|
| Local<String> Get();
|
| Local<String> GetSourceLine();
|
|
|
| - // TODO(1241256): Rewrite (or remove) this method. We don't want to
|
| - // deal with ownership of the returned string and we want to use
|
| - // JavaScript data structures exclusively.
|
| - char* GetUnderline(char* source_line, char underline_char);
|
| -
|
| - Handle<String> GetScriptResourceName();
|
| -
|
| - // TODO(1240903): Remove this when no longer used in WebKit V8
|
| - // bindings.
|
| - Handle<Value> GetSourceData();
|
| + Handle<Value> GetScriptResourceName();
|
|
|
| /**
|
| * Returns the number, 1-based, of the line where the error occurred.
|
| @@ -676,6 +667,11 @@ class EXPORT Value : public Data {
|
| */
|
| bool IsInt32();
|
|
|
| + /**
|
| + * Returns true if this value is a Date.
|
| + */
|
| + bool IsDate();
|
| +
|
| Local<Boolean> ToBoolean();
|
| Local<Number> ToNumber();
|
| Local<String> ToString();
|
| @@ -991,6 +987,14 @@ class EXPORT Uint32 : public Integer {
|
| class EXPORT Date : public Value {
|
| public:
|
| static Local<Value> New(double time);
|
| +
|
| + /**
|
| + * A specialization of Value::NumberValue that is more efficient
|
| + * because we know the structure of this object.
|
| + */
|
| + double NumberValue();
|
| +
|
| + static Date* Cast(v8::Value* obj);
|
| };
|
|
|
|
|
| @@ -1745,11 +1749,11 @@ Handle<Boolean> EXPORT False();
|
| class EXPORT ResourceConstraints {
|
| public:
|
| ResourceConstraints();
|
| - int max_young_space_size() { return max_young_space_size_; }
|
| + int max_young_space_size() const { return max_young_space_size_; }
|
| void set_max_young_space_size(int value) { max_young_space_size_ = value; }
|
| - int max_old_space_size() { return max_old_space_size_; }
|
| + int max_old_space_size() const { return max_old_space_size_; }
|
| void set_max_old_space_size(int value) { max_old_space_size_ = value; }
|
| - uint32_t* stack_limit() { return stack_limit_; }
|
| + uint32_t* stack_limit() const { return stack_limit_; }
|
| void set_stack_limit(uint32_t* value) { stack_limit_ = value; }
|
| private:
|
| int max_young_space_size_;
|
| @@ -1980,7 +1984,7 @@ class EXPORT TryCatch {
|
| /**
|
| * Returns true if an exception has been caught by this try/catch block.
|
| */
|
| - bool HasCaught();
|
| + bool HasCaught() const;
|
|
|
| /**
|
| * Returns the exception caught by this try/catch block. If no exception has
|
| @@ -1988,7 +1992,7 @@ class EXPORT TryCatch {
|
| *
|
| * The returned handle is valid until this TryCatch block has been destroyed.
|
| */
|
| - Local<Value> Exception();
|
| + Local<Value> Exception() const;
|
|
|
| /**
|
| * Returns the message associated with this exception. If there is
|
| @@ -1997,7 +2001,7 @@ class EXPORT TryCatch {
|
| * The returned handle is valid until this TryCatch block has been
|
| * destroyed.
|
| */
|
| - Local<v8::Message> Message();
|
| + Local<v8::Message> Message() const;
|
|
|
| /**
|
| * Clears any exceptions that may have been caught by this try/catch block.
|
| @@ -2373,17 +2377,17 @@ Local<T> HandleScope::Close(Handle<T> value) {
|
| return Local<T>(reinterpret_cast<T*>(after));
|
| }
|
|
|
| -Handle<Value> ScriptOrigin::ResourceName() {
|
| +Handle<Value> ScriptOrigin::ResourceName() const {
|
| return resource_name_;
|
| }
|
|
|
|
|
| -Handle<Integer> ScriptOrigin::ResourceLineOffset() {
|
| +Handle<Integer> ScriptOrigin::ResourceLineOffset() const {
|
| return resource_line_offset_;
|
| }
|
|
|
|
|
| -Handle<Integer> ScriptOrigin::ResourceColumnOffset() {
|
| +Handle<Integer> ScriptOrigin::ResourceColumnOffset() const {
|
| return resource_column_offset_;
|
| }
|
|
|
|
|