V8 Project
v8::internal::AllocationTracker::UnresolvedLocation Class Reference
+ Collaboration diagram for v8::internal::AllocationTracker::UnresolvedLocation:

Public Member Functions

 UnresolvedLocation (Script *script, int start, FunctionInfo *info)
 
 ~UnresolvedLocation ()
 
void Resolve ()
 

Static Private Member Functions

static void HandleWeakScript (const v8::WeakCallbackData< v8::Value, void > &data)
 

Private Attributes

Handle< Scriptscript_
 
int start_position_
 
FunctionInfoinfo_
 

Detailed Description

Definition at line 116 of file allocation-tracker.h.

Constructor & Destructor Documentation

◆ UnresolvedLocation()

v8::internal::AllocationTracker::UnresolvedLocation::UnresolvedLocation ( Script script,
int  start,
FunctionInfo info 
)

Definition at line 306 of file allocation-tracker.cc.

308  : start_position_(start),
309  info_(info) {
311  script->GetIsolate()->global_handles()->Create(script));
312  GlobalHandles::MakeWeak(reinterpret_cast<Object**>(script_.location()),
313  this,
315 }
static void HandleWeakScript(const v8::WeakCallbackData< v8::Value, void > &data)
static void MakeWeak(Object **location, void *parameter, WeakCallback weak_callback)
static Handle< T > cast(Handle< S > that)
Definition: handles.h:116
kSerializedDataOffset Object
Definition: objects-inl.h:5322

References v8::internal::Handle< T >::cast(), v8::internal::GlobalHandles::Create(), v8::internal::HeapObject::GetIsolate(), v8::internal::Isolate::global_handles(), HandleWeakScript(), v8::internal::GlobalHandles::MakeWeak(), and script_.

+ Here is the call graph for this function:

◆ ~UnresolvedLocation()

v8::internal::AllocationTracker::UnresolvedLocation::~UnresolvedLocation ( )

Definition at line 318 of file allocation-tracker.cc.

318  {
319  if (!script_.is_null()) {
320  GlobalHandles::Destroy(reinterpret_cast<Object**>(script_.location()));
321  }
322 }
static void Destroy(Object **location)

References v8::internal::GlobalHandles::Destroy().

+ Here is the call graph for this function:

Member Function Documentation

◆ HandleWeakScript()

void v8::internal::AllocationTracker::UnresolvedLocation::HandleWeakScript ( const v8::WeakCallbackData< v8::Value, void > &  data)
staticprivate

Definition at line 333 of file allocation-tracker.cc.

334  {
335  UnresolvedLocation* loc =
336  reinterpret_cast<UnresolvedLocation*>(data.GetParameter());
337  GlobalHandles::Destroy(reinterpret_cast<Object**>(loc->script_.location()));
338  loc->script_ = Handle<Script>::null();
339 }
P * GetParameter() const
Definition: v8.h:423
UnresolvedLocation(Script *script, int start, FunctionInfo *info)
static Handle< T > null()
Definition: handles.h:123

References v8::internal::GlobalHandles::Destroy(), v8::WeakCallbackData< T, P >::GetParameter(), v8::internal::Handle< T >::null(), and script_.

Referenced by UnresolvedLocation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Resolve()

void v8::internal::AllocationTracker::UnresolvedLocation::Resolve ( )

Definition at line 325 of file allocation-tracker.cc.

325  {
326  if (script_.is_null()) return;
327  HandleScope scope(script_->GetIsolate());
330 }
static int GetColumnNumber(Handle< Script > script, int code_pos)
Definition: objects.cc:9635
static int GetLineNumber(Handle< Script > script, int code_pos)
Definition: objects.cc:9673

References v8::internal::Script::GetColumnNumber(), and v8::internal::Script::GetLineNumber().

+ Here is the call graph for this function:

Member Data Documentation

◆ info_

FunctionInfo* v8::internal::AllocationTracker::UnresolvedLocation::info_
private

Definition at line 128 of file allocation-tracker.h.

◆ script_

Handle<Script> v8::internal::AllocationTracker::UnresolvedLocation::script_
private

Definition at line 126 of file allocation-tracker.h.

Referenced by HandleWeakScript(), and UnresolvedLocation().

◆ start_position_

int v8::internal::AllocationTracker::UnresolvedLocation::start_position_
private

Definition at line 127 of file allocation-tracker.h.


The documentation for this class was generated from the following files: