| 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 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 virtual size_t length() const = 0; | 820 virtual size_t length() const = 0; |
| 821 protected: | 821 protected: |
| 822 ExternalAsciiStringResource() {} | 822 ExternalAsciiStringResource() {} |
| 823 private: | 823 private: |
| 824 // Disallow copying and assigning. | 824 // Disallow copying and assigning. |
| 825 ExternalAsciiStringResource(const ExternalAsciiStringResource&); | 825 ExternalAsciiStringResource(const ExternalAsciiStringResource&); |
| 826 void operator=(const ExternalAsciiStringResource&); | 826 void operator=(const ExternalAsciiStringResource&); |
| 827 }; | 827 }; |
| 828 | 828 |
| 829 /** | 829 /** |
| 830 * Get the ExternalStringResource for an external string. Only | 830 * Get the ExternalStringResource for an external string. Returns |
| 831 * valid if IsExternal() returns true. | 831 * NULL if IsExternal() doesn't return true. |
| 832 */ | 832 */ |
| 833 ExternalStringResource* GetExternalStringResource() const; | 833 ExternalStringResource* GetExternalStringResource() const; |
| 834 | 834 |
| 835 /** | 835 /** |
| 836 * Get the ExternalAsciiStringResource for an external ascii string. | 836 * Get the ExternalAsciiStringResource for an external ascii string. |
| 837 * Only valid if IsExternalAscii() returns true. | 837 * Returns NULL if IsExternalAscii() doesn't return true. |
| 838 */ | 838 */ |
| 839 ExternalAsciiStringResource* GetExternalAsciiStringResource() const; | 839 ExternalAsciiStringResource* GetExternalAsciiStringResource() const; |
| 840 | 840 |
| 841 static String* Cast(v8::Value* obj); | 841 static String* Cast(v8::Value* obj); |
| 842 | 842 |
| 843 /** | 843 /** |
| 844 * Allocates a new string from either utf-8 encoded or ascii data. | 844 * Allocates a new string from either utf-8 encoded or ascii data. |
| 845 * The second parameter 'length' gives the buffer length. | 845 * The second parameter 'length' gives the buffer length. |
| 846 * If the data is utf-8 encoded, the caller must | 846 * If the data is utf-8 encoded, the caller must |
| 847 * be careful to supply the length parameter. | 847 * be careful to supply the length parameter. |
| (...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2592 | 2592 |
| 2593 } // namespace v8 | 2593 } // namespace v8 |
| 2594 | 2594 |
| 2595 | 2595 |
| 2596 #undef V8EXPORT | 2596 #undef V8EXPORT |
| 2597 #undef V8EXPORT_INLINE | 2597 #undef V8EXPORT_INLINE |
| 2598 #undef TYPE_CHECK | 2598 #undef TYPE_CHECK |
| 2599 | 2599 |
| 2600 | 2600 |
| 2601 #endif // V8_H_ | 2601 #endif // V8_H_ |
| OLD | NEW |