| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1233 int GetEndColumn() const; | 1233 int GetEndColumn() const; |
| 1234 | 1234 |
| 1235 /** | 1235 /** |
| 1236 * Passes on the value set by the embedder when it fed the script from which | 1236 * Passes on the value set by the embedder when it fed the script from which |
| 1237 * this Message was generated to V8. | 1237 * this Message was generated to V8. |
| 1238 */ | 1238 */ |
| 1239 bool IsSharedCrossOrigin() const; | 1239 bool IsSharedCrossOrigin() const; |
| 1240 | 1240 |
| 1241 // TODO(1245381): Print to a string instead of on a FILE. | 1241 // TODO(1245381): Print to a string instead of on a FILE. |
| 1242 static void PrintCurrentStackTrace(Isolate* isolate, FILE* out); | 1242 static void PrintCurrentStackTrace(Isolate* isolate, FILE* out); |
| 1243 // Will be deprecated soon. | 1243 V8_DEPRECATED("Will be removed", |
| 1244 static void PrintCurrentStackTrace(FILE* out); | 1244 static void PrintCurrentStackTrace(FILE* out)); |
| 1245 | 1245 |
| 1246 static const int kNoLineNumberInfo = 0; | 1246 static const int kNoLineNumberInfo = 0; |
| 1247 static const int kNoColumnInfo = 0; | 1247 static const int kNoColumnInfo = 0; |
| 1248 static const int kNoScriptIdInfo = 0; | 1248 static const int kNoScriptIdInfo = 0; |
| 1249 }; | 1249 }; |
| 1250 | 1250 |
| 1251 | 1251 |
| 1252 /** | 1252 /** |
| 1253 * Representation of a JavaScript stack trace. The information collected is a | 1253 * Representation of a JavaScript stack trace. The information collected is a |
| 1254 * snapshot of the execution stack and the information remains valid after | 1254 * snapshot of the execution stack and the information remains valid after |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 * Grab a snapshot of the current JavaScript execution stack. | 1292 * Grab a snapshot of the current JavaScript execution stack. |
| 1293 * | 1293 * |
| 1294 * \param frame_limit The maximum number of stack frames we want to capture. | 1294 * \param frame_limit The maximum number of stack frames we want to capture. |
| 1295 * \param options Enumerates the set of things we will capture for each | 1295 * \param options Enumerates the set of things we will capture for each |
| 1296 * StackFrame. | 1296 * StackFrame. |
| 1297 */ | 1297 */ |
| 1298 static Local<StackTrace> CurrentStackTrace( | 1298 static Local<StackTrace> CurrentStackTrace( |
| 1299 Isolate* isolate, | 1299 Isolate* isolate, |
| 1300 int frame_limit, | 1300 int frame_limit, |
| 1301 StackTraceOptions options = kOverview); | 1301 StackTraceOptions options = kOverview); |
| 1302 // Will be deprecated soon. | 1302 V8_DEPRECATED("Will be removed", |
| 1303 static Local<StackTrace> CurrentStackTrace( | 1303 static Local<StackTrace> CurrentStackTrace( |
| 1304 int frame_limit, | 1304 int frame_limit, StackTraceOptions options = kOverview)); |
| 1305 StackTraceOptions options = kOverview); | |
| 1306 }; | 1305 }; |
| 1307 | 1306 |
| 1308 | 1307 |
| 1309 /** | 1308 /** |
| 1310 * A single JavaScript stack frame. | 1309 * A single JavaScript stack frame. |
| 1311 */ | 1310 */ |
| 1312 class V8_EXPORT StackFrame { | 1311 class V8_EXPORT StackFrame { |
| 1313 public: | 1312 public: |
| 1314 /** | 1313 /** |
| 1315 * Returns the number, 1-based, of the line for the associate function call. | 1314 * Returns the number, 1-based, of the line for the associate function call. |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1627 | 1626 |
| 1628 | 1627 |
| 1629 /** | 1628 /** |
| 1630 * A primitive boolean value (ECMA-262, 4.3.14). Either the true | 1629 * A primitive boolean value (ECMA-262, 4.3.14). Either the true |
| 1631 * or false value. | 1630 * or false value. |
| 1632 */ | 1631 */ |
| 1633 class V8_EXPORT Boolean : public Primitive { | 1632 class V8_EXPORT Boolean : public Primitive { |
| 1634 public: | 1633 public: |
| 1635 bool Value() const; | 1634 bool Value() const; |
| 1636 V8_INLINE static Handle<Boolean> New(Isolate* isolate, bool value); | 1635 V8_INLINE static Handle<Boolean> New(Isolate* isolate, bool value); |
| 1637 // Will be deprecated soon. | 1636 V8_DEPRECATED("Will be removed", |
| 1638 V8_INLINE static Handle<Boolean> New(bool value); | 1637 V8_INLINE static Handle<Boolean> New(bool value)); |
| 1639 }; | 1638 }; |
| 1640 | 1639 |
| 1641 | 1640 |
| 1642 /** | 1641 /** |
| 1643 * A JavaScript string value (ECMA-262, 4.3.17). | 1642 * A JavaScript string value (ECMA-262, 4.3.17). |
| 1644 */ | 1643 */ |
| 1645 class V8_EXPORT String : public Primitive { | 1644 class V8_EXPORT String : public Primitive { |
| 1646 public: | 1645 public: |
| 1647 enum Encoding { | 1646 enum Encoding { |
| 1648 UNKNOWN_ENCODING = 0x1, | 1647 UNKNOWN_ENCODING = 0x1, |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1898 /** | 1897 /** |
| 1899 * Creates a new external string using the data defined in the given | 1898 * Creates a new external string using the data defined in the given |
| 1900 * resource. When the external string is no longer live on V8's heap the | 1899 * resource. When the external string is no longer live on V8's heap the |
| 1901 * resource will be disposed by calling its Dispose method. The caller of | 1900 * resource will be disposed by calling its Dispose method. The caller of |
| 1902 * this function should not otherwise delete or modify the resource. Neither | 1901 * this function should not otherwise delete or modify the resource. Neither |
| 1903 * should the underlying buffer be deallocated or modified except through the | 1902 * should the underlying buffer be deallocated or modified except through the |
| 1904 * destructor of the external string resource. | 1903 * destructor of the external string resource. |
| 1905 */ | 1904 */ |
| 1906 static Local<String> NewExternal(Isolate* isolate, | 1905 static Local<String> NewExternal(Isolate* isolate, |
| 1907 ExternalStringResource* resource); | 1906 ExternalStringResource* resource); |
| 1908 // Will be deprecated soon. | 1907 V8_DEPRECATED("Will be removed", static Local<String> NewExternal( |
| 1909 static Local<String> NewExternal(ExternalStringResource* resource); | 1908 ExternalStringResource* resource)); |
| 1910 | 1909 |
| 1911 /** | 1910 /** |
| 1912 * Associate an external string resource with this string by transforming it | 1911 * Associate an external string resource with this string by transforming it |
| 1913 * in place so that existing references to this string in the JavaScript heap | 1912 * in place so that existing references to this string in the JavaScript heap |
| 1914 * will use the external string resource. The external string resource's | 1913 * will use the external string resource. The external string resource's |
| 1915 * character contents need to be equivalent to this string. | 1914 * character contents need to be equivalent to this string. |
| 1916 * Returns true if the string has been changed to be an external string. | 1915 * Returns true if the string has been changed to be an external string. |
| 1917 * The string is not modified if the operation fails. See NewExternal for | 1916 * The string is not modified if the operation fails. See NewExternal for |
| 1918 * information on the lifetime of the resource. | 1917 * information on the lifetime of the resource. |
| 1919 */ | 1918 */ |
| 1920 bool MakeExternal(ExternalStringResource* resource); | 1919 bool MakeExternal(ExternalStringResource* resource); |
| 1921 | 1920 |
| 1922 /** | 1921 /** |
| 1923 * Creates a new external string using the ASCII data defined in the given | 1922 * Creates a new external string using the ASCII data defined in the given |
| 1924 * resource. When the external string is no longer live on V8's heap the | 1923 * resource. When the external string is no longer live on V8's heap the |
| 1925 * resource will be disposed by calling its Dispose method. The caller of | 1924 * resource will be disposed by calling its Dispose method. The caller of |
| 1926 * this function should not otherwise delete or modify the resource. Neither | 1925 * this function should not otherwise delete or modify the resource. Neither |
| 1927 * should the underlying buffer be deallocated or modified except through the | 1926 * should the underlying buffer be deallocated or modified except through the |
| 1928 * destructor of the external string resource. | 1927 * destructor of the external string resource. |
| 1929 */ | 1928 */ |
| 1930 static Local<String> NewExternal(Isolate* isolate, | 1929 static Local<String> NewExternal(Isolate* isolate, |
| 1931 ExternalAsciiStringResource* resource); | 1930 ExternalAsciiStringResource* resource); |
| 1932 // Will be deprecated soon. | 1931 V8_DEPRECATED("Will be removed", static Local<String> NewExternal( |
| 1933 static Local<String> NewExternal(ExternalAsciiStringResource* resource); | 1932 ExternalAsciiStringResource* resource)); |
| 1934 | 1933 |
| 1935 /** | 1934 /** |
| 1936 * Associate an external string resource with this string by transforming it | 1935 * Associate an external string resource with this string by transforming it |
| 1937 * in place so that existing references to this string in the JavaScript heap | 1936 * in place so that existing references to this string in the JavaScript heap |
| 1938 * will use the external string resource. The external string resource's | 1937 * will use the external string resource. The external string resource's |
| 1939 * character contents need to be equivalent to this string. | 1938 * character contents need to be equivalent to this string. |
| 1940 * Returns true if the string has been changed to be an external string. | 1939 * Returns true if the string has been changed to be an external string. |
| 1941 * The string is not modified if the operation fails. See NewExternal for | 1940 * The string is not modified if the operation fails. See NewExternal for |
| 1942 * information on the lifetime of the resource. | 1941 * information on the lifetime of the resource. |
| 1943 */ | 1942 */ |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2481 * Clones an element at index |index|. Returns an empty | 2480 * Clones an element at index |index|. Returns an empty |
| 2482 * handle if cloning fails (for any reason). | 2481 * handle if cloning fails (for any reason). |
| 2483 */ | 2482 */ |
| 2484 Local<Object> CloneElementAt(uint32_t index); | 2483 Local<Object> CloneElementAt(uint32_t index); |
| 2485 | 2484 |
| 2486 /** | 2485 /** |
| 2487 * Creates a JavaScript array with the given length. If the length | 2486 * Creates a JavaScript array with the given length. If the length |
| 2488 * is negative the returned array will have length 0. | 2487 * is negative the returned array will have length 0. |
| 2489 */ | 2488 */ |
| 2490 static Local<Array> New(Isolate* isolate, int length = 0); | 2489 static Local<Array> New(Isolate* isolate, int length = 0); |
| 2491 // Will be deprecated soon. | 2490 V8_DEPRECATED("Will be removed", static Local<Array> New(int length = 0)); |
| 2492 static Local<Array> New(int length = 0); | |
| 2493 | 2491 |
| 2494 V8_INLINE static Array* Cast(Value* obj); | 2492 V8_INLINE static Array* Cast(Value* obj); |
| 2495 private: | 2493 private: |
| 2496 Array(); | 2494 Array(); |
| 2497 static void CheckCast(Value* obj); | 2495 static void CheckCast(Value* obj); |
| 2498 }; | 2496 }; |
| 2499 | 2497 |
| 2500 | 2498 |
| 2501 template<typename T> | 2499 template<typename T> |
| 2502 class ReturnValue { | 2500 class ReturnValue { |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2746 */ | 2744 */ |
| 2747 size_t ByteLength() const; | 2745 size_t ByteLength() const; |
| 2748 | 2746 |
| 2749 /** | 2747 /** |
| 2750 * Create a new ArrayBuffer. Allocate |byte_length| bytes. | 2748 * Create a new ArrayBuffer. Allocate |byte_length| bytes. |
| 2751 * Allocated memory will be owned by a created ArrayBuffer and | 2749 * Allocated memory will be owned by a created ArrayBuffer and |
| 2752 * will be deallocated when it is garbage-collected, | 2750 * will be deallocated when it is garbage-collected, |
| 2753 * unless the object is externalized. | 2751 * unless the object is externalized. |
| 2754 */ | 2752 */ |
| 2755 static Local<ArrayBuffer> New(Isolate* isolate, size_t byte_length); | 2753 static Local<ArrayBuffer> New(Isolate* isolate, size_t byte_length); |
| 2756 // Will be deprecated soon. | 2754 V8_DEPRECATED("Will be removed", |
| 2757 static Local<ArrayBuffer> New(size_t byte_length); | 2755 static Local<ArrayBuffer> New(size_t byte_length)); |
| 2758 | 2756 |
| 2759 /** | 2757 /** |
| 2760 * Create a new ArrayBuffer over an existing memory block. | 2758 * Create a new ArrayBuffer over an existing memory block. |
| 2761 * The created array buffer is immediately in externalized state. | 2759 * The created array buffer is immediately in externalized state. |
| 2762 * The memory block will not be reclaimed when a created ArrayBuffer | 2760 * The memory block will not be reclaimed when a created ArrayBuffer |
| 2763 * is garbage-collected. | 2761 * is garbage-collected. |
| 2764 */ | 2762 */ |
| 2765 static Local<ArrayBuffer> New(Isolate* isolate, void* data, | 2763 static Local<ArrayBuffer> New(Isolate* isolate, void* data, |
| 2766 size_t byte_length); | 2764 size_t byte_length); |
| 2767 // Will be deprecated soon. | 2765 V8_DEPRECATED("Will be removed", |
| 2768 static Local<ArrayBuffer> New(void* data, size_t byte_length); | 2766 static Local<ArrayBuffer> New(void* data, size_t byte_length)); |
| 2769 | 2767 |
| 2770 /** | 2768 /** |
| 2771 * Returns true if ArrayBuffer is extrenalized, that is, does not | 2769 * Returns true if ArrayBuffer is extrenalized, that is, does not |
| 2772 * own its memory block. | 2770 * own its memory block. |
| 2773 */ | 2771 */ |
| 2774 bool IsExternal() const; | 2772 bool IsExternal() const; |
| 2775 | 2773 |
| 2776 /** | 2774 /** |
| 2777 * Neuters this ArrayBuffer and all its views (typed arrays). | 2775 * Neuters this ArrayBuffer and all its views (typed arrays). |
| 2778 * Neutering sets the byte length of the buffer and all typed arrays to zero, | 2776 * Neutering sets the byte length of the buffer and all typed arrays to zero, |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3019 static void CheckCast(Value* obj); | 3017 static void CheckCast(Value* obj); |
| 3020 }; | 3018 }; |
| 3021 | 3019 |
| 3022 | 3020 |
| 3023 /** | 3021 /** |
| 3024 * An instance of the built-in Date constructor (ECMA-262, 15.9). | 3022 * An instance of the built-in Date constructor (ECMA-262, 15.9). |
| 3025 */ | 3023 */ |
| 3026 class V8_EXPORT Date : public Object { | 3024 class V8_EXPORT Date : public Object { |
| 3027 public: | 3025 public: |
| 3028 static Local<Value> New(Isolate* isolate, double time); | 3026 static Local<Value> New(Isolate* isolate, double time); |
| 3029 // Will be deprecated soon. | 3027 V8_DEPRECATED("Will be removed", static Local<Value> New(double time)); |
| 3030 static Local<Value> New(double time); | |
| 3031 | 3028 |
| 3032 V8_DEPRECATED( | 3029 V8_DEPRECATED( |
| 3033 "Use ValueOf instead", | 3030 "Use ValueOf instead", |
| 3034 double NumberValue() const) { return ValueOf(); } | 3031 double NumberValue() const) { return ValueOf(); } |
| 3035 | 3032 |
| 3036 /** | 3033 /** |
| 3037 * A specialization of Value::NumberValue that is more efficient | 3034 * A specialization of Value::NumberValue that is more efficient |
| 3038 * because we know the structure of this object. | 3035 * because we know the structure of this object. |
| 3039 */ | 3036 */ |
| 3040 double ValueOf() const; | 3037 double ValueOf() const; |
| 3041 | 3038 |
| 3042 V8_INLINE static Date* Cast(v8::Value* obj); | 3039 V8_INLINE static Date* Cast(v8::Value* obj); |
| 3043 | 3040 |
| 3044 /** | 3041 /** |
| 3045 * Notification that the embedder has changed the time zone, | 3042 * Notification that the embedder has changed the time zone, |
| 3046 * daylight savings time, or other date / time configuration | 3043 * daylight savings time, or other date / time configuration |
| 3047 * parameters. V8 keeps a cache of various values used for | 3044 * parameters. V8 keeps a cache of various values used for |
| 3048 * date / time computation. This notification will reset | 3045 * date / time computation. This notification will reset |
| 3049 * those cached values for the current context so that date / | 3046 * those cached values for the current context so that date / |
| 3050 * time configuration changes would be reflected in the Date | 3047 * time configuration changes would be reflected in the Date |
| 3051 * object. | 3048 * object. |
| 3052 * | 3049 * |
| 3053 * This API should not be called more than needed as it will | 3050 * This API should not be called more than needed as it will |
| 3054 * negatively impact the performance of date operations. | 3051 * negatively impact the performance of date operations. |
| 3055 */ | 3052 */ |
| 3056 static void DateTimeConfigurationChangeNotification(Isolate* isolate); | 3053 static void DateTimeConfigurationChangeNotification(Isolate* isolate); |
| 3057 // Will be deprecated soon. | 3054 V8_DEPRECATED("Will be removed", |
| 3058 static void DateTimeConfigurationChangeNotification(); | 3055 static void DateTimeConfigurationChangeNotification()); |
| 3059 | 3056 |
| 3060 private: | 3057 private: |
| 3061 static void CheckCast(v8::Value* obj); | 3058 static void CheckCast(v8::Value* obj); |
| 3062 }; | 3059 }; |
| 3063 | 3060 |
| 3064 | 3061 |
| 3065 /** | 3062 /** |
| 3066 * A Number object (ECMA-262, 4.3.21). | 3063 * A Number object (ECMA-262, 4.3.21). |
| 3067 */ | 3064 */ |
| 3068 class V8_EXPORT NumberObject : public Object { | 3065 class V8_EXPORT NumberObject : public Object { |
| 3069 public: | 3066 public: |
| 3070 static Local<Value> New(Isolate* isolate, double value); | 3067 static Local<Value> New(Isolate* isolate, double value); |
| 3071 // Will be deprecated soon. | 3068 V8_DEPRECATED("Will be removed", static Local<Value> New(double value)); |
| 3072 static Local<Value> New(double value); | |
| 3073 | 3069 |
| 3074 V8_DEPRECATED( | 3070 V8_DEPRECATED( |
| 3075 "Use ValueOf instead", | 3071 "Use ValueOf instead", |
| 3076 double NumberValue() const) { return ValueOf(); } | 3072 double NumberValue() const) { return ValueOf(); } |
| 3077 | 3073 |
| 3078 /** | 3074 /** |
| 3079 * Returns the Number held by the object. | 3075 * Returns the Number held by the object. |
| 3080 */ | 3076 */ |
| 3081 double ValueOf() const; | 3077 double ValueOf() const; |
| 3082 | 3078 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3224 | 3220 |
| 3225 /** | 3221 /** |
| 3226 * The superclass of object and function templates. | 3222 * The superclass of object and function templates. |
| 3227 */ | 3223 */ |
| 3228 class V8_EXPORT Template : public Data { | 3224 class V8_EXPORT Template : public Data { |
| 3229 public: | 3225 public: |
| 3230 /** Adds a property to each instance created by this template.*/ | 3226 /** Adds a property to each instance created by this template.*/ |
| 3231 void Set(Handle<String> name, Handle<Data> value, | 3227 void Set(Handle<String> name, Handle<Data> value, |
| 3232 PropertyAttribute attributes = None); | 3228 PropertyAttribute attributes = None); |
| 3233 V8_INLINE void Set(Isolate* isolate, const char* name, Handle<Data> value); | 3229 V8_INLINE void Set(Isolate* isolate, const char* name, Handle<Data> value); |
| 3234 // Will be deprecated soon. | 3230 V8_DEPRECATED("Will be removed", |
| 3235 V8_INLINE void Set(const char* name, Handle<Data> value); | 3231 V8_INLINE void Set(const char* name, Handle<Data> value)); |
| 3236 | 3232 |
| 3237 void SetAccessorProperty( | 3233 void SetAccessorProperty( |
| 3238 Local<String> name, | 3234 Local<String> name, |
| 3239 Local<FunctionTemplate> getter = Local<FunctionTemplate>(), | 3235 Local<FunctionTemplate> getter = Local<FunctionTemplate>(), |
| 3240 Local<FunctionTemplate> setter = Local<FunctionTemplate>(), | 3236 Local<FunctionTemplate> setter = Local<FunctionTemplate>(), |
| 3241 PropertyAttribute attribute = None, | 3237 PropertyAttribute attribute = None, |
| 3242 AccessControl settings = DEFAULT); | 3238 AccessControl settings = DEFAULT); |
| 3243 | 3239 |
| 3244 /** | 3240 /** |
| 3245 * Whenever the property with the given name is accessed on objects | 3241 * Whenever the property with the given name is accessed on objects |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3761 * A Signature specifies which receivers and arguments are valid | 3757 * A Signature specifies which receivers and arguments are valid |
| 3762 * parameters to a function. | 3758 * parameters to a function. |
| 3763 */ | 3759 */ |
| 3764 class V8_EXPORT Signature : public Data { | 3760 class V8_EXPORT Signature : public Data { |
| 3765 public: | 3761 public: |
| 3766 static Local<Signature> New(Isolate* isolate, | 3762 static Local<Signature> New(Isolate* isolate, |
| 3767 Handle<FunctionTemplate> receiver = | 3763 Handle<FunctionTemplate> receiver = |
| 3768 Handle<FunctionTemplate>(), | 3764 Handle<FunctionTemplate>(), |
| 3769 int argc = 0, | 3765 int argc = 0, |
| 3770 Handle<FunctionTemplate> argv[] = 0); | 3766 Handle<FunctionTemplate> argv[] = 0); |
| 3771 // Will be deprecated soon. | 3767 V8_DEPRECATED("Will be removed", |
| 3772 static Local<Signature> New(Handle<FunctionTemplate> receiver = | 3768 static Local<Signature> New(Handle<FunctionTemplate> receiver = |
| 3773 Handle<FunctionTemplate>(), | 3769 Handle<FunctionTemplate>(), |
| 3774 int argc = 0, | 3770 int argc = 0, |
| 3775 Handle<FunctionTemplate> argv[] = 0); | 3771 Handle<FunctionTemplate> argv[] = |
| 3772 0)); |
| 3773 |
| 3776 private: | 3774 private: |
| 3777 Signature(); | 3775 Signature(); |
| 3778 }; | 3776 }; |
| 3779 | 3777 |
| 3780 | 3778 |
| 3781 /** | 3779 /** |
| 3782 * An AccessorSignature specifies which receivers are valid parameters | 3780 * An AccessorSignature specifies which receivers are valid parameters |
| 3783 * to an accessor callback. | 3781 * to an accessor callback. |
| 3784 */ | 3782 */ |
| 3785 class V8_EXPORT AccessorSignature : public Data { | 3783 class V8_EXPORT AccessorSignature : public Data { |
| 3786 public: | 3784 public: |
| 3787 static Local<AccessorSignature> New(Isolate* isolate, | 3785 static Local<AccessorSignature> New(Isolate* isolate, |
| 3788 Handle<FunctionTemplate> receiver = | 3786 Handle<FunctionTemplate> receiver = |
| 3789 Handle<FunctionTemplate>()); | 3787 Handle<FunctionTemplate>()); |
| 3790 // Will be deprecated soon. | 3788 V8_DEPRECATED("Will be removed", static Local<AccessorSignature> New( |
| 3791 static Local<AccessorSignature> New(Handle<FunctionTemplate> receiver = | 3789 Handle<FunctionTemplate> receiver = |
| 3792 Handle<FunctionTemplate>()); | 3790 Handle<FunctionTemplate>())); |
| 3793 | 3791 |
| 3794 private: | 3792 private: |
| 3795 AccessorSignature(); | 3793 AccessorSignature(); |
| 3796 }; | 3794 }; |
| 3797 | 3795 |
| 3798 | 3796 |
| 3799 class V8_EXPORT DeclaredAccessorDescriptor : public Data { | 3797 class V8_EXPORT DeclaredAccessorDescriptor : public Data { |
| 3800 private: | 3798 private: |
| 3801 DeclaredAccessorDescriptor(); | 3799 DeclaredAccessorDescriptor(); |
| 3802 }; | 3800 }; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3889 // Note that the strings passed into this constructor must live as long | 3887 // Note that the strings passed into this constructor must live as long |
| 3890 // as the Extension itself. | 3888 // as the Extension itself. |
| 3891 Extension(const char* name, | 3889 Extension(const char* name, |
| 3892 const char* source = 0, | 3890 const char* source = 0, |
| 3893 int dep_count = 0, | 3891 int dep_count = 0, |
| 3894 const char** deps = 0, | 3892 const char** deps = 0, |
| 3895 int source_length = -1); | 3893 int source_length = -1); |
| 3896 virtual ~Extension() { } | 3894 virtual ~Extension() { } |
| 3897 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate( | 3895 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate( |
| 3898 v8::Isolate* isolate, v8::Handle<v8::String> name) { | 3896 v8::Isolate* isolate, v8::Handle<v8::String> name) { |
| 3897 #if defined(V8_DEPRECATION_WARNINGS) |
| 3898 return v8::Handle<v8::FunctionTemplate>(); |
| 3899 #else |
| 3899 return GetNativeFunction(name); | 3900 return GetNativeFunction(name); |
| 3901 #endif |
| 3900 } | 3902 } |
| 3901 // Will be deprecated soon. | 3903 |
| 3902 virtual v8::Handle<v8::FunctionTemplate> | 3904 V8_DEPRECATED("Will be removed", |
| 3903 GetNativeFunction(v8::Handle<v8::String> name) { | 3905 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( |
| 3906 v8::Handle<v8::String> name)) { |
| 3904 return v8::Handle<v8::FunctionTemplate>(); | 3907 return v8::Handle<v8::FunctionTemplate>(); |
| 3905 } | 3908 } |
| 3906 | 3909 |
| 3907 const char* name() const { return name_; } | 3910 const char* name() const { return name_; } |
| 3908 size_t source_length() const { return source_length_; } | 3911 size_t source_length() const { return source_length_; } |
| 3909 const String::ExternalAsciiStringResource* source() const { | 3912 const String::ExternalAsciiStringResource* source() const { |
| 3910 return &source_; } | 3913 return &source_; } |
| 3911 int dependency_count() { return dep_count_; } | 3914 int dependency_count() { return dep_count_; } |
| 3912 const char** dependencies() { return deps_; } | 3915 const char** dependencies() { return deps_; } |
| 3913 void set_auto_enable(bool value) { auto_enable_ = value; } | 3916 void set_auto_enable(bool value) { auto_enable_ = value; } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 3941 }; | 3944 }; |
| 3942 | 3945 |
| 3943 | 3946 |
| 3944 // --- Statics --- | 3947 // --- Statics --- |
| 3945 | 3948 |
| 3946 V8_INLINE Handle<Primitive> Undefined(Isolate* isolate); | 3949 V8_INLINE Handle<Primitive> Undefined(Isolate* isolate); |
| 3947 V8_INLINE Handle<Primitive> Null(Isolate* isolate); | 3950 V8_INLINE Handle<Primitive> Null(Isolate* isolate); |
| 3948 V8_INLINE Handle<Boolean> True(Isolate* isolate); | 3951 V8_INLINE Handle<Boolean> True(Isolate* isolate); |
| 3949 V8_INLINE Handle<Boolean> False(Isolate* isolate); | 3952 V8_INLINE Handle<Boolean> False(Isolate* isolate); |
| 3950 | 3953 |
| 3951 // Will be removed soon. | 3954 V8_DEPRECATED("Will be removed", Handle<Primitive> V8_EXPORT Undefined()); |
| 3952 Handle<Primitive> V8_EXPORT Undefined(); | 3955 V8_DEPRECATED("Will be removed", Handle<Primitive> V8_EXPORT Null()); |
| 3953 Handle<Primitive> V8_EXPORT Null(); | 3956 V8_DEPRECATED("Will be removed", Handle<Boolean> V8_EXPORT True()); |
| 3954 Handle<Boolean> V8_EXPORT True(); | 3957 V8_DEPRECATED("Will be removed", Handle<Boolean> V8_EXPORT False()); |
| 3955 Handle<Boolean> V8_EXPORT False(); | |
| 3956 | 3958 |
| 3957 | 3959 |
| 3958 /** | 3960 /** |
| 3959 * A set of constraints that specifies the limits of the runtime's memory use. | 3961 * A set of constraints that specifies the limits of the runtime's memory use. |
| 3960 * You must set the heap size before initializing the VM - the size cannot be | 3962 * You must set the heap size before initializing the VM - the size cannot be |
| 3961 * adjusted after the VM is initialized. | 3963 * adjusted after the VM is initialized. |
| 3962 * | 3964 * |
| 3963 * If you are using threads then you should hold the V8::Locker lock while | 3965 * If you are using threads then you should hold the V8::Locker lock while |
| 3964 * setting the stack limit and you must set a non-default stack limit separately | 3966 * setting the stack limit and you must set a non-default stack limit separately |
| 3965 * for each thread. | 3967 * for each thread. |
| (...skipping 2791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6757 */ | 6759 */ |
| 6758 | 6760 |
| 6759 | 6761 |
| 6760 } // namespace v8 | 6762 } // namespace v8 |
| 6761 | 6763 |
| 6762 | 6764 |
| 6763 #undef TYPE_CHECK | 6765 #undef TYPE_CHECK |
| 6764 | 6766 |
| 6765 | 6767 |
| 6766 #endif // V8_H_ | 6768 #endif // V8_H_ |
| OLD | NEW |