Lines Matching refs:isolate

26 bool IsValidCodePoint(Isolate* isolate, Handle<Object> value) {
28 !Object::ToNumber(isolate, value).ToHandle(&value)) {
32 if (Object::ToInteger(isolate, value).ToHandleChecked()->Number() !=
46 base::uc32 NextCodePoint(Isolate* isolate, BuiltinArguments args, int index) {
49 isolate, value, Object::ToNumber(isolate, value), kInvalidCodePoint);
50 if (!IsValidCodePoint(isolate, value)) {
51 isolate->Throw(*isolate->factory()->NewRangeError(
62 HandleScope scope(isolate);
64 if (length == 0) return ReadOnlyRoots(isolate).empty_string();
74 code = NextCodePoint(isolate, args, index);
76 return ReadOnlyRoots(isolate).exception();
86 isolate, isolate->factory()->NewStringFromOneByte(base::Vector<uint8_t>(
105 code = NextCodePoint(isolate, args, index);
107 return ReadOnlyRoots(isolate).exception();
113 isolate, result,
114 isolate->factory()->NewRawTwoByteString(
129 HandleScope handle_scope(isolate);
130 return String::LastIndexOf(isolate, args.receiver(),
131 args.atOrUndefined(isolate, 1),
132 args.atOrUndefined(isolate, 2));
140 HandleScope handle_scope(isolate);
142 isolate->CountUsage(v8::Isolate::UseCounterFeature::kStringLocaleCompare);
149 isolate, str2, Object::ToString(isolate, args.atOrUndefined(isolate, 1)));
151 isolate, str1, str2, args.atOrUndefined(isolate, 2),
152 args.atOrUndefined(isolate, 3), kMethod);
154 DCHECK(isolate->has_pending_exception());
155 return ReadOnlyRoots(isolate).exception();
163 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, str2,
164 Object::ToString(isolate, args.at(1)));
186 str1 = String::Flatten(isolate, str1);
187 str2 = String::Flatten(isolate, str2);
210 HandleScope handle_scope(isolate);
213 Handle<Object> form_input = args.atOrUndefined(isolate, 1);
214 if (form_input->IsUndefined(isolate)) return *string;
217 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, form,
218 Object::ToString(isolate, form_input));
220 if (!(String::Equals(isolate, form, isolate->factory()->NFC_string()) ||
221 String::Equals(isolate, form, isolate->factory()->NFD_string()) ||
222 String::Equals(isolate, form, isolate->factory()->NFKC_string()) ||
223 String::Equals(isolate, form, isolate->factory()->NFKD_string()))) {
225 isolate->factory()->NewStringFromStaticChars("NFC, NFD, NFKC, NFKD");
227 isolate,
249 Isolate* isolate, String string, SeqString result, int result_length,
316 THROW_NEW_ERROR_RETURN_FAILURE(isolate,
346 Handle<String> s, Isolate* isolate,
348 s = String::Flatten(isolate, s);
362 isolate->factory()->NewRawOneByteString(length).ToHandleChecked();
378 result = isolate->factory()->NewRawOneByteString(length).ToHandleChecked();
380 result = isolate->factory()->NewRawTwoByteString(length).ToHandleChecked();
383 Object answer = ConvertCaseHelper(isolate, *s, *result, length, mapping);
384 if (answer.IsException(isolate) || answer.IsString()) return answer;
390 isolate, result, isolate->factory()->NewRawOneByteString(length));
394 isolate, result, isolate->factory()->NewRawTwoByteString(length));
396 return ConvertCaseHelper(isolate, *s, *result, length, mapping);
402 HandleScope scope(isolate);
404 return ConvertCase(string, isolate,
405 isolate->runtime_state()->to_lower_mapping());
409 HandleScope scope(isolate);
411 return ConvertCase(string, isolate,
412 isolate->runtime_state()->to_upper_mapping());
416 HandleScope scope(isolate);
418 return ConvertCase(string, isolate,
419 isolate->runtime_state()->to_lower_mapping());
423 HandleScope scope(isolate);
425 return ConvertCase(string, isolate,
426 isolate->runtime_state()->to_upper_mapping());
432 HandleScope scope(isolate);
433 Handle<Object> templ = args.atOrUndefined(isolate, 1);
436 isolate->factory()->NewStringFromAsciiChecked("raw");
439 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, cooked,
440 Object::ToObject(isolate, templ));
444 isolate, raw, Object::GetProperty(isolate, cooked, raw_string));
445 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, raw,
446 Object::ToObject(isolate, raw));
449 isolate, raw_len,
450 Object::GetProperty(isolate, raw, isolate->factory()->length_string()));
452 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, raw_len,
453 Object::ToLength(isolate, raw_len));
455 IncrementalStringBuilder result_builder(isolate);
464 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, first_element,
465 Object::GetElement(isolate, raw, 0));
469 isolate, first_string, Object::ToString(isolate, first_element));
476 isolate, argument_string,
477 Object::ToString(isolate, args.at(arg_i)));
482 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, element,
483 Object::GetElement(isolate, raw, i));
486 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, element_string,
487 Object::ToString(isolate, element));
492 RETURN_RESULT_OR_FAILURE(isolate, result_builder.Finish());