| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 39646cd4b5e47cc2419c9fbb0a556c209dcc1440..6fb74caf97f8a84d556807c4b34d933f16e1e3e3 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -3468,14 +3468,21 @@ void ConsString::set_second(String* value, WriteBarrierMode mode) {
|
| }
|
|
|
|
|
| +const void* ExternalString::resource_data() const {
|
| + return *reinterpret_cast<const void* const*>(
|
| + FIELD_ADDR_CONST(this, kResourceDataOffset));
|
| +}
|
| +
|
| +
|
| bool ExternalString::is_short() {
|
| InstanceType type = map()->instance_type();
|
| return (type & kShortExternalStringMask) == kShortExternalStringTag;
|
| }
|
|
|
|
|
| -const ExternalOneByteString::Resource* ExternalOneByteString::resource() {
|
| - return *reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset));
|
| +const ExternalOneByteString::Resource* ExternalOneByteString::resource() const {
|
| + return *reinterpret_cast<const Resource* const*>(
|
| + FIELD_ADDR_CONST(this, kResourceOffset));
|
| }
|
|
|
|
|
| @@ -3507,8 +3514,9 @@ uint16_t ExternalOneByteString::ExternalOneByteStringGet(int index) {
|
| }
|
|
|
|
|
| -const ExternalTwoByteString::Resource* ExternalTwoByteString::resource() {
|
| - return *reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset));
|
| +const ExternalTwoByteString::Resource* ExternalTwoByteString::resource() const {
|
| + return *reinterpret_cast<const Resource* const*>(
|
| + FIELD_ADDR_CONST(this, kResourceOffset));
|
| }
|
|
|
|
|
|
|