// Copyright 2015 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/pending-compilation-error-handler.h" #include "src/ast/ast-value-factory.h" #include "src/debug/debug.h" #include "src/handles.h" #include "src/isolate.h" #include "src/messages.h" #include "src/objects-inl.h" namespace v8 { namespace internal { Handle PendingCompilationErrorHandler::MessageDetails::ArgumentString( Isolate* isolate) const { if (arg_ != nullptr) return arg_->string(); if (char_arg_ != nullptr) { return isolate->factory() ->NewStringFromUtf8(CStrVector(char_arg_)) .ToHandleChecked(); } return isolate->factory()->undefined_string(); } MessageLocation PendingCompilationErrorHandler::MessageDetails::GetLocation( Handle