Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index bc2ea0bb0af5e11e048280667909143dfba2a006..bb47cf6836a27c1d32e597ebbbf878058afc4bc1 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -6196,7 +6196,7 @@ Local<String> String::Empty(Isolate* isolate) { |
String::ExternalStringResource* String::GetExternalStringResource() const { |
typedef internal::Object O; |
typedef internal::Internals I; |
- O* obj = *reinterpret_cast<O**>(const_cast<String*>(this)); |
+ O* obj = *reinterpret_cast<O* const*>(this); |
String::ExternalStringResource* result; |
if (I::IsExternalTwoByteString(I::GetInstanceType(obj))) { |
void* value = I::ReadField<void*>(obj, I::kStringResourceOffset); |
@@ -6215,7 +6215,7 @@ String::ExternalStringResourceBase* String::GetExternalStringResourceBase( |
String::Encoding* encoding_out) const { |
typedef internal::Object O; |
typedef internal::Internals I; |
- O* obj = *reinterpret_cast<O**>(const_cast<String*>(this)); |
+ O* obj = *reinterpret_cast<O* const*>(this); |
int type = I::GetInstanceType(obj) & I::kFullStringRepresentationMask; |
*encoding_out = static_cast<Encoding>(type & I::kStringEncodingMask); |
ExternalStringResourceBase* resource = NULL; |
@@ -6242,7 +6242,7 @@ bool Value::IsUndefined() const { |
bool Value::QuickIsUndefined() const { |
typedef internal::Object O; |
typedef internal::Internals I; |
- O* obj = *reinterpret_cast<O**>(const_cast<Value*>(this)); |
+ O* obj = *reinterpret_cast<O* const*>(this); |
if (!I::HasHeapObjectTag(obj)) return false; |
if (I::GetInstanceType(obj) != I::kOddballType) return false; |
return (I::GetOddballKind(obj) == I::kUndefinedOddballKind); |
@@ -6260,7 +6260,7 @@ bool Value::IsNull() const { |
bool Value::QuickIsNull() const { |
typedef internal::Object O; |
typedef internal::Internals I; |
- O* obj = *reinterpret_cast<O**>(const_cast<Value*>(this)); |
+ O* obj = *reinterpret_cast<O* const*>(this); |
if (!I::HasHeapObjectTag(obj)) return false; |
if (I::GetInstanceType(obj) != I::kOddballType) return false; |
return (I::GetOddballKind(obj) == I::kNullOddballKind); |
@@ -6278,7 +6278,7 @@ bool Value::IsString() const { |
bool Value::QuickIsString() const { |
typedef internal::Object O; |
typedef internal::Internals I; |
- O* obj = *reinterpret_cast<O**>(const_cast<Value*>(this)); |
+ O* obj = *reinterpret_cast<O* const*>(this); |
if (!I::HasHeapObjectTag(obj)) return false; |
return (I::GetInstanceType(obj) < I::kFirstNonstringType); |
} |