// Size of the instructions.
size_t code_len;
// Script info for CODE_ADDED event.
- Handle<Script> script;
+ Handle<UnboundScript> script;
// User-defined data for *_LINE_INFO_* event. It's used to hold the source
// code line information which is returned from the
// CODE_START_LINE_INFO_RECORDING event. And it's passed to subsequent
event.type = JitCodeEvent::CODE_ADDED;
event.code_start = code->instruction_start();
event.code_len = code->instruction_size();
- Handle<Script> script_handle;
+ Handle<SharedFunctionInfo> shared_function_handle;
if (shared && shared->script()->IsScript()) {
- script_handle = Handle<Script>(Script::cast(shared->script()));
+ shared_function_handle = Handle<SharedFunctionInfo>(shared);
}
- event.script = ToApiHandle<v8::Script>(script_handle);
+ event.script = ToApiHandle<v8::UnboundScript>(shared_function_handle);
event.name.str = name;
event.name.len = length;
code_event_handler_(&event);
jmethod.method_size = static_cast<unsigned int>(event->code_len);
jmethod.method_name = temp_method_name;
- Handle<Script> script = event->script;
+ Handle<UnboundScript> script = event->script;
if (*script != NULL) {
// Get the source file name and set it to jmethod.source_file_name
- if ((*script->GetUnboundScript()->GetScriptName())->IsString()) {
- Handle<String> script_name =
- script->GetUnboundScript()->GetScriptName()->ToString();
+ if ((*script->GetScriptName())->IsString()) {
+ Handle<String> script_name = script->GetScriptName()->ToString();
temp_file_name = new char[script_name->Utf8Length() + 1];
script_name->WriteUtf8(temp_file_name);
jmethod.source_file_name = temp_file_name;
jmethod.line_number_table[index].Offset =
static_cast<unsigned int>(Iter->pc_);
jmethod.line_number_table[index++].LineNumber =
- script->GetUnboundScript()->GetLineNumber(Iter->pos_)+1;
+ script->GetLineNumber(Iter->pos_) + 1;
}
GetEntries()->erase(event->code_start);
}