Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: include/v8.h

Issue 867373003: Throw on range error when creating a string via API. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 { 2133 enum NewStringType {
2134 kNormalString, kInternalizedString, kUndetectableString 2134 kNormalString, kInternalizedString, kUndetectableString
2135 }; 2135 };
2136 2136
2137 /** Allocates a new string from UTF-8 data.*/ 2137 /** Allocates a new string from UTF-8 data.*/
2138 static Local<String> NewFromUtf8(Isolate* isolate, 2138 static Local<String> NewFromUtf8(Isolate* isolate, const char* data,
2139 const char* data, 2139 NewStringType type = kNormalString,
2140 NewStringType type = kNormalString, 2140 int length = -1);
2141 int length = -1);
2142 2141
2143 /** Allocates a new string from Latin-1 data.*/ 2142 /** Allocates a new string from Latin-1 data.*/
2144 static Local<String> NewFromOneByte( 2143 static Local<String> NewFromOneByte(
2145 Isolate* isolate, 2144 Isolate* isolate,
2146 const uint8_t* data, 2145 const uint8_t* data,
2147 NewStringType type = kNormalString, 2146 NewStringType type = kNormalString,
2148 int length = -1); 2147 int length = -1);
2149 2148
2150 /** Allocates a new string from UTF-16 data.*/ 2149 /** Allocates a new string from UTF-16 data.*/
2151 static Local<String> NewFromTwoByte( 2150 static Local<String> NewFromTwoByte(
(...skipping 5391 matching lines...) Expand 10 before | Expand all | Expand 10 after
7543 */ 7542 */
7544 7543
7545 7544
7546 } // namespace v8 7545 } // namespace v8
7547 7546
7548 7547
7549 #undef TYPE_CHECK 7548 #undef TYPE_CHECK
7550 7549
7551 7550
7552 #endif // V8_H_ 7551 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698