Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: src/inspector/V8DebuggerScript.cpp

Issue 2332163002: [inspector] fixed all shorten-64-to-32 warnings (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/inspector/V8DebuggerScript.cpp
diff --git a/src/inspector/V8DebuggerScript.cpp b/src/inspector/V8DebuggerScript.cpp
index a7d018a5533898edc6f230e4c17ffd296bab1a13..bae008af0944e5878bea21ac654555722086a8a8 100644
--- a/src/inspector/V8DebuggerScript.cpp
+++ b/src/inspector/V8DebuggerScript.cpp
@@ -11,7 +11,7 @@ namespace v8_inspector {
static const char hexDigits[17] = "0123456789ABCDEF";
-static void appendUnsignedAsHex(unsigned number, String16Builder* destination) {
+static void appendUnsignedAsHex(uint64_t number, String16Builder* destination) {
for (size_t i = 0; i < 8; ++i) {
UChar c = hexDigits[number & 0xF];
destination->append(c);
@@ -81,24 +81,28 @@ V8DebuggerScript::V8DebuggerScript(v8::Isolate* isolate,
object->Get(toV8StringInternalized(isolate, "sourceURL")));
m_sourceMappingURL = toProtocolStringWithTypeCheck(
object->Get(toV8StringInternalized(isolate, "sourceMappingURL")));
- m_startLine = object->Get(toV8StringInternalized(isolate, "startLine"))
- ->ToInteger(isolate)
- ->Value();
- m_startColumn = object->Get(toV8StringInternalized(isolate, "startColumn"))
- ->ToInteger(isolate)
- ->Value();
- m_endLine = object->Get(toV8StringInternalized(isolate, "endLine"))
- ->ToInteger(isolate)
- ->Value();
- m_endColumn = object->Get(toV8StringInternalized(isolate, "endColumn"))
- ->ToInteger(isolate)
- ->Value();
+ m_startLine =
+ static_cast<int>(object->Get(toV8StringInternalized(isolate, "startLine"))
+ ->ToInteger(isolate)
+ ->Value());
+ m_startColumn = static_cast<int>(
+ object->Get(toV8StringInternalized(isolate, "startColumn"))
+ ->ToInteger(isolate)
+ ->Value());
+ m_endLine =
+ static_cast<int>(object->Get(toV8StringInternalized(isolate, "endLine"))
+ ->ToInteger(isolate)
+ ->Value());
+ m_endColumn =
+ static_cast<int>(object->Get(toV8StringInternalized(isolate, "endColumn"))
+ ->ToInteger(isolate)
+ ->Value());
m_executionContextAuxData = toProtocolStringWithTypeCheck(
object->Get(toV8StringInternalized(isolate, "executionContextAuxData")));
- m_executionContextId =
+ m_executionContextId = static_cast<int>(
object->Get(toV8StringInternalized(isolate, "executionContextId"))
->ToInteger(isolate)
- ->Value();
+ ->Value());
m_isLiveEdit = isLiveEdit;
v8::Local<v8::Value> sourceValue =

Powered by Google App Engine
This is Rietveld 408576698