Lines Matching refs:isolate

27   SealHandleScope shs(isolate);  in RUNTIME_FUNCTION()
29 CHECK(isolate->bootstrapper()->IsActive()); in RUNTIME_FUNCTION()
30 return ReadOnlyRoots(isolate).undefined_value(); in RUNTIME_FUNCTION()
34 HandleScope scope(isolate); in RUNTIME_FUNCTION()
37 CHECK(isolate->bootstrapper()->IsActive()); in RUNTIME_FUNCTION()
40 Bootstrapper::ExportFromRuntime(isolate, container); in RUNTIME_FUNCTION()
46 HandleScope scope(isolate); in RUNTIME_FUNCTION()
50 CHECK(isolate->bootstrapper()->IsActive()); in RUNTIME_FUNCTION()
51 Handle<Context> native_context = isolate->native_context(); in RUNTIME_FUNCTION()
52 Handle<FixedArray> fixed_array(FixedArray::cast(array->elements()), isolate); in RUNTIME_FUNCTION()
56 Handle<String> name(String::cast(fixed_array->get(i)), isolate); in RUNTIME_FUNCTION()
58 Handle<JSObject> object(JSObject::cast(fixed_array->get(i + 1)), isolate); in RUNTIME_FUNCTION()
66 return ReadOnlyRoots(isolate).undefined_value(); in RUNTIME_FUNCTION()
70 HandleScope scope(isolate); in RUNTIME_FUNCTION()
72 return isolate->Throw(args[0]); in RUNTIME_FUNCTION()
76 HandleScope scope(isolate); in RUNTIME_FUNCTION()
78 return isolate->ReThrow(args[0]); in RUNTIME_FUNCTION()
82 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
84 return isolate->StackOverflow(); in RUNTIME_FUNCTION()
88 HandleScope scope(isolate); in RUNTIME_FUNCTION()
91 isolate, NewTypeError(MessageTemplate::kSymbolAsyncIteratorInvalid)); in RUNTIME_FUNCTION()
94 #define THROW_ERROR(isolate, args, call) \ argument
95 HandleScope scope(isolate); \
99 Handle<Object> undefined = isolate->factory()->undefined_value(); \
107 THROW_NEW_ERROR_RETURN_FAILURE(isolate, call(message_id, arg0, arg1, arg2));
110 THROW_ERROR(isolate, args, NewRangeError); in RUNTIME_FUNCTION()
114 THROW_ERROR(isolate, args, NewTypeError); in RUNTIME_FUNCTION()
138 HandleScope scope(isolate); in RUNTIME_FUNCTION()
146 isolate->factory()->NewStringFromAsciiChecked(ElementsKindToType(kind)); in RUNTIME_FUNCTION()
152 handle(Smi::FromInt(static_cast<int>(size)), isolate); in RUNTIME_FUNCTION()
155 isolate, NewRangeError(MessageTemplate::kInvalidTypedArrayAlignment, in RUNTIME_FUNCTION()
160 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
162 return isolate->UnwindAndFindHandler(); in RUNTIME_FUNCTION()
166 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
168 return isolate->PromoteScheduledException(); in RUNTIME_FUNCTION()
172 HandleScope scope(isolate); in RUNTIME_FUNCTION()
176 isolate, NewReferenceError(MessageTemplate::kNotDefined, name)); in RUNTIME_FUNCTION()
180 HandleScope scope(isolate); in RUNTIME_FUNCTION()
186 return *isolate->factory()->NewTypeError(message_template, arg0); in RUNTIME_FUNCTION()
190 HandleScope scope(isolate); in RUNTIME_FUNCTION()
196 return *isolate->factory()->NewReferenceError(message_template, arg0); in RUNTIME_FUNCTION()
200 HandleScope scope(isolate); in RUNTIME_FUNCTION()
206 return *isolate->factory()->NewSyntaxError(message_template, arg0); in RUNTIME_FUNCTION()
210 HandleScope scope(isolate); in RUNTIME_FUNCTION()
211 THROW_NEW_ERROR_RETURN_FAILURE(isolate, NewInvalidStringLengthError()); in RUNTIME_FUNCTION()
215 HandleScope scope(isolate); in RUNTIME_FUNCTION()
219 isolate, in RUNTIME_FUNCTION()
224 HandleScope scope(isolate); in RUNTIME_FUNCTION()
227 isolate, NewTypeError(MessageTemplate::kThrowMethodMissing)); in RUNTIME_FUNCTION()
231 HandleScope scope(isolate); in RUNTIME_FUNCTION()
234 isolate, NewTypeError(MessageTemplate::kSymbolIteratorInvalid)); in RUNTIME_FUNCTION()
238 HandleScope scope(isolate); in RUNTIME_FUNCTION()
242 isolate, NewTypeError(MessageTemplate::kNotConstructor, object)); in RUNTIME_FUNCTION()
246 HandleScope scope(isolate); in RUNTIME_FUNCTION()
249 Handle<String> type = Object::TypeOf(isolate, object); in RUNTIME_FUNCTION()
251 isolate, NewTypeError(MessageTemplate::kApplyNonFunction, object, type)); in RUNTIME_FUNCTION()
255 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
259 StackLimitCheck check(isolate); in RUNTIME_FUNCTION()
261 return isolate->StackOverflow(); in RUNTIME_FUNCTION()
264 return isolate->stack_guard()->HandleInterrupts(); in RUNTIME_FUNCTION()
268 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
270 return isolate->stack_guard()->HandleInterrupts(); in RUNTIME_FUNCTION()
274 HandleScope scope(isolate); in RUNTIME_FUNCTION()
280 return *isolate->factory()->NewFillerObject(size, false, NEW_SPACE); in RUNTIME_FUNCTION()
284 HandleScope scope(isolate); in RUNTIME_FUNCTION()
293 return *isolate->factory()->NewFillerObject(size, double_align, space); in RUNTIME_FUNCTION()
297 HandleScope scope(isolate); in RUNTIME_FUNCTION()
300 if (length == 0) return ReadOnlyRoots(isolate).empty_string(); in RUNTIME_FUNCTION()
303 isolate, result, isolate->factory()->NewRawOneByteString(length)); in RUNTIME_FUNCTION()
308 HandleScope scope(isolate); in RUNTIME_FUNCTION()
311 if (length == 0) return ReadOnlyRoots(isolate).empty_string(); in RUNTIME_FUNCTION()
314 isolate, result, isolate->factory()->NewRawTwoByteString(length)); in RUNTIME_FUNCTION()
324 bool ComputeLocation(Isolate* isolate, MessageLocation* target) { in ComputeLocation() argument
325 JavaScriptFrameIterator it(isolate); in ComputeLocation()
333 Handle<SharedFunctionInfo> shared(summary.function()->shared(), isolate); in ComputeLocation()
334 Handle<Object> script(shared->script(), isolate); in ComputeLocation()
337 !(Handle<Script>::cast(script)->source()->IsUndefined(isolate))) { in ComputeLocation()
346 Handle<String> RenderCallSite(Isolate* isolate, Handle<Object> object, in RenderCallSite() argument
349 if (ComputeLocation(isolate, &location)) { in RenderCallSite()
350 ParseInfo info(isolate, location.shared()); in RenderCallSite()
351 if (parsing::ParseAny(&info, location.shared(), isolate)) { in RenderCallSite()
352 info.ast_value_factory()->Internalize(isolate); in RenderCallSite()
353 CallPrinter printer(isolate, location.shared()->IsUserJavaScript()); in RenderCallSite()
358 isolate->clear_pending_exception(); in RenderCallSite()
361 return Object::TypeOf(isolate, object); in RenderCallSite()
387 MaybeHandle<Object> Runtime::ThrowIteratorError(Isolate* isolate, in ThrowIteratorError() argument
390 Handle<String> callsite = RenderCallSite(isolate, object, &hint); in ThrowIteratorError()
394 Handle<Symbol> iterator_symbol = isolate->factory()->iterator_symbol(); in ThrowIteratorError()
395 THROW_NEW_ERROR(isolate, NewTypeError(id, iterator_symbol, callsite), in ThrowIteratorError()
400 THROW_NEW_ERROR(isolate, NewTypeError(id, callsite), Object); in ThrowIteratorError()
404 HandleScope scope(isolate); in RUNTIME_FUNCTION()
408 Handle<String> callsite = RenderCallSite(isolate, object, &hint); in RUNTIME_FUNCTION()
411 THROW_NEW_ERROR_RETURN_FAILURE(isolate, NewTypeError(id, callsite)); in RUNTIME_FUNCTION()
415 HandleScope scope(isolate); in RUNTIME_FUNCTION()
419 Handle<String> callsite = RenderCallSite(isolate, object, &hint); in RUNTIME_FUNCTION()
421 THROW_NEW_ERROR_RETURN_FAILURE(isolate, NewTypeError(id, callsite)); in RUNTIME_FUNCTION()
425 HandleScope scope(isolate); in RUNTIME_FUNCTION()
429 isolate, in RUNTIME_FUNCTION()
435 HandleScope scope(isolate); in RUNTIME_FUNCTION()
438 RETURN_RESULT_OR_FAILURE(isolate, Object::CreateListFromArrayLike( in RUNTIME_FUNCTION()
439 isolate, object, ElementTypes::kAll)); in RUNTIME_FUNCTION()
443 HandleScope scope(isolate); in RUNTIME_FUNCTION()
449 Handle<SharedFunctionInfo> shared(function->shared(), isolate); in RUNTIME_FUNCTION()
456 isolate->builtins()->builtin(builtin_id)->builtin_index()); in RUNTIME_FUNCTION()
463 Code* code = Snapshot::EnsureBuiltinIsDeserialized(isolate, shared); in RUNTIME_FUNCTION()
470 HandleScope scope(isolate); in RUNTIME_FUNCTION()
473 isolate->CountUsage(static_cast<v8::Isolate::UseCounterFeature>(counter)); in RUNTIME_FUNCTION()
474 return ReadOnlyRoots(isolate).undefined_value(); in RUNTIME_FUNCTION()
478 HandleScope scope(isolate); in RUNTIME_FUNCTION()
483 isolate->counters()->runtime_call_stats()->Print(stats_stream); in RUNTIME_FUNCTION()
484 Handle<String> result = isolate->factory()->NewStringFromAsciiChecked( in RUNTIME_FUNCTION()
486 isolate->counters()->runtime_call_stats()->Reset(); in RUNTIME_FUNCTION()
513 isolate->counters()->runtime_call_stats()->Print(stats_stream); in RUNTIME_FUNCTION()
514 isolate->counters()->runtime_call_stats()->Reset(); in RUNTIME_FUNCTION()
519 return ReadOnlyRoots(isolate).undefined_value(); in RUNTIME_FUNCTION()
524 HandleScope scope(isolate); in RUNTIME_FUNCTION()
529 isolate, Object::OrdinaryHasInstance(isolate, callable, object)); in RUNTIME_FUNCTION()
533 HandleScope scope(isolate); in RUNTIME_FUNCTION()
536 return *Object::TypeOf(isolate, object); in RUNTIME_FUNCTION()
540 HandleScope scope(isolate); in RUNTIME_FUNCTION()
543 Handle<JSObject> global_proxy(target->global_proxy(), isolate); in RUNTIME_FUNCTION()
544 return *isolate->factory()->ToBoolean( in RUNTIME_FUNCTION()
545 Builtins::AllowDynamicFunction(isolate, target, global_proxy)); in RUNTIME_FUNCTION()
549 HandleScope scope(isolate); in RUNTIME_FUNCTION()
556 isolate, NewTypeError(MessageTemplate::kSymbolIteratorInvalid)); in RUNTIME_FUNCTION()
561 isolate, next, in RUNTIME_FUNCTION()
562 Object::GetProperty(isolate, sync_iterator, in RUNTIME_FUNCTION()
563 isolate->factory()->next_string())); in RUNTIME_FUNCTION()
565 return *isolate->factory()->NewJSAsyncFromSyncIterator( in RUNTIME_FUNCTION()
570 HandleScope scope(isolate); in RUNTIME_FUNCTION()
574 return *TemplateObjectDescription::CreateTemplateObject(isolate, description); in RUNTIME_FUNCTION()
582 HandleScope scope(isolate); in RUNTIME_FUNCTION()
587 DCHECK(!isolate->has_pending_exception()); in RUNTIME_FUNCTION()
588 isolate->set_pending_exception(*message_obj); in RUNTIME_FUNCTION()
589 isolate->ReportPendingMessagesFromJavaScript(); in RUNTIME_FUNCTION()
590 isolate->clear_pending_exception(); in RUNTIME_FUNCTION()
591 return ReadOnlyRoots(isolate).undefined_value(); in RUNTIME_FUNCTION()