Commit 6ea067a4 authored by kozyatinskiy's avatar kozyatinskiy Committed by Commit bot

[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}
parent b3c8b0ce
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment