Make vtune-jit stop using deprecated APIs

BUG=v8:4134
R=yangguo@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1244433003

Cr-Commit-Position: refs/heads/master@{#29740}
This commit is contained in:
jochen 2015-07-19 23:53:46 -07:00 committed by Commit bot
parent 002faf794e
commit a84c788bb0
2 changed files with 7 additions and 2 deletions

View File

@ -37,6 +37,10 @@
'dependencies': [
'../../../tools/gyp/v8.gyp:v8',
],
'defines': [
# TODO(jochen): Remove again after this is globally turned on.
'V8_IMMINENT_DEPRECATION_WARNINGS',
],
'sources': [
'ittnotify_config.h',
'ittnotify_types.h',

View File

@ -192,12 +192,13 @@ void VTUNEJITInterface::event_handler(const v8::JitCodeEvent* event) {
jmethod.method_size = static_cast<unsigned int>(event->code_len);
jmethod.method_name = temp_method_name;
Handle<UnboundScript> script = event->script;
Local<UnboundScript> script = event->script;
if (*script != NULL) {
// Get the source file name and set it to jmethod.source_file_name
if ((*script->GetScriptName())->IsString()) {
Handle<String> script_name = script->GetScriptName()->ToString();
Local<String> script_name =
Local<String>::Cast(script->GetScriptName());
temp_file_name = new char[script_name->Utf8Length() + 1];
script_name->WriteUtf8(temp_file_name);
jmethod.source_file_name = temp_file_name;