| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 /** | 894 /** |
| 895 * Associate an external string resource with this string by transforming it | 895 * Associate an external string resource with this string by transforming it |
| 896 * in place so that existing references to this string in the JavaScript heap | 896 * in place so that existing references to this string in the JavaScript heap |
| 897 * will use the external string resource. The external string resource's | 897 * will use the external string resource. The external string resource's |
| 898 * character contents needs to be equivalent to this string. | 898 * character contents needs to be equivalent to this string. |
| 899 * Returns true if the string has been changed to be an external string. | 899 * Returns true if the string has been changed to be an external string. |
| 900 * The string is not modified if the operation fails. | 900 * The string is not modified if the operation fails. |
| 901 */ | 901 */ |
| 902 bool MakeExternal(ExternalAsciiStringResource* resource); | 902 bool MakeExternal(ExternalAsciiStringResource* resource); |
| 903 | 903 |
| 904 /** |
| 905 * Returns true if this string can be made external. |
| 906 */ |
| 907 bool CanMakeExternal(); |
| 908 |
| 904 /** Creates an undetectable string from the supplied ascii or utf-8 data.*/ | 909 /** Creates an undetectable string from the supplied ascii or utf-8 data.*/ |
| 905 static Local<String> NewUndetectable(const char* data, int length = -1); | 910 static Local<String> NewUndetectable(const char* data, int length = -1); |
| 906 | 911 |
| 907 /** Creates an undetectable string from the supplied utf-16 data.*/ | 912 /** Creates an undetectable string from the supplied utf-16 data.*/ |
| 908 static Local<String> NewUndetectable(const uint16_t* data, int length = -1); | 913 static Local<String> NewUndetectable(const uint16_t* data, int length = -1); |
| 909 | 914 |
| 910 /** | 915 /** |
| 911 * Converts an object to a utf8-encoded character array. Useful if | 916 * Converts an object to a utf8-encoded character array. Useful if |
| 912 * you want to print the object. If conversion to a string fails | 917 * you want to print the object. If conversion to a string fails |
| 913 * (eg. due to an exception in the toString() method of the object) | 918 * (eg. due to an exception in the toString() method of the object) |
| (...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2675 | 2680 |
| 2676 } // namespace v8 | 2681 } // namespace v8 |
| 2677 | 2682 |
| 2678 | 2683 |
| 2679 #undef V8EXPORT | 2684 #undef V8EXPORT |
| 2680 #undef V8EXPORT_INLINE | 2685 #undef V8EXPORT_INLINE |
| 2681 #undef TYPE_CHECK | 2686 #undef TYPE_CHECK |
| 2682 | 2687 |
| 2683 | 2688 |
| 2684 #endif // V8_H_ | 2689 #endif // V8_H_ |
| OLD | NEW |