[inspector] fix integer conversion

v8::Integer::Value() method returns int64 but all scriptIds are 32 bit based. We can safely cast int64 into int here to make compilers happy.

R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2394973002
Cr-Commit-Position: refs/heads/master@{#40016}
This commit is contained in:
kozyatinskiy 2016-10-05 15:56:41 -07:00 committed by Commit bot
parent b3c8b0ce2c
commit 6ea067a40c

View File

@ -55,7 +55,8 @@ void MessageHandler(v8::Local<v8::Message> message,
InspectorClientImpl::InspectorFromContext(context);
v8::Local<v8::StackTrace> stack = message->GetStackTrace();
int script_id = message->GetScriptOrigin().ScriptID()->Value();
int script_id =
static_cast<int>(message->GetScriptOrigin().ScriptID()->Value());
if (!stack.IsEmpty() && stack->GetFrameCount() > 0) {
int top_script_id = stack->GetFrame(0)->GetScriptId();
if (top_script_id == script_id) script_id = 0;