OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 2115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2126 * Get the ExternalOneByteStringResource for an external one-byte string. | 2126 * Get the ExternalOneByteStringResource for an external one-byte string. |
2127 * Returns NULL if IsExternalOneByte() doesn't return true. | 2127 * Returns NULL if IsExternalOneByte() doesn't return true. |
2128 */ | 2128 */ |
2129 const ExternalOneByteStringResource* GetExternalOneByteStringResource() const; | 2129 const ExternalOneByteStringResource* GetExternalOneByteStringResource() const; |
2130 | 2130 |
2131 V8_INLINE static String* Cast(v8::Value* obj); | 2131 V8_INLINE static String* Cast(v8::Value* obj); |
2132 | 2132 |
2133 enum NewStringType { kNormalString, kInternalizedString }; | 2133 enum NewStringType { kNormalString, kInternalizedString }; |
2134 | 2134 |
2135 /** Allocates a new string from UTF-8 data.*/ | 2135 /** Allocates a new string from UTF-8 data.*/ |
2136 static Local<String> NewFromUtf8(Isolate* isolate, | 2136 static Local<String> NewFromUtf8(Isolate* isolate, const char* data, |
2137 const char* data, | 2137 NewStringType type = kNormalString, |
2138 NewStringType type = kNormalString, | 2138 int length = -1); |
2139 int length = -1); | |
2140 | 2139 |
2141 /** Allocates a new string from Latin-1 data.*/ | 2140 /** Allocates a new string from Latin-1 data.*/ |
2142 static Local<String> NewFromOneByte( | 2141 static Local<String> NewFromOneByte( |
2143 Isolate* isolate, | 2142 Isolate* isolate, |
2144 const uint8_t* data, | 2143 const uint8_t* data, |
2145 NewStringType type = kNormalString, | 2144 NewStringType type = kNormalString, |
2146 int length = -1); | 2145 int length = -1); |
2147 | 2146 |
2148 /** Allocates a new string from UTF-16 data.*/ | 2147 /** Allocates a new string from UTF-16 data.*/ |
2149 static Local<String> NewFromTwoByte( | 2148 static Local<String> NewFromTwoByte( |
(...skipping 5391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7541 */ | 7540 */ |
7542 | 7541 |
7543 | 7542 |
7544 } // namespace v8 | 7543 } // namespace v8 |
7545 | 7544 |
7546 | 7545 |
7547 #undef TYPE_CHECK | 7546 #undef TYPE_CHECK |
7548 | 7547 |
7549 | 7548 |
7550 #endif // V8_H_ | 7549 #endif // V8_H_ |
OLD | NEW |