| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 29b886d87bd5c08ea5d2a95f30db4ee622b7bf4e..22e12ac7d0f4741f910ba120a20473d43fa1c39c 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -2361,6 +2361,20 @@ INT_ACCESSORS(SharedFunctionInfo, this_property_assignments_count,
|
| kThisPropertyAssignmentsCountOffset)
|
|
|
|
|
| +bool Script::HasValidSource() {
|
| + Object* src = this->source();
|
| + if (!src->IsString()) return true;
|
| + String* src_str = String::cast(src);
|
| + if (!StringShape(src_str).IsExternal()) return true;
|
| + if (src_str->IsAsciiRepresentation()) {
|
| + return ExternalAsciiString::cast(src)->resource() != NULL;
|
| + } else if (src_str->IsTwoByteRepresentation()) {
|
| + return ExternalTwoByteString::cast(src)->resource() != NULL;
|
| + }
|
| + return true;
|
| +}
|
| +
|
| +
|
| void SharedFunctionInfo::DontAdaptArguments() {
|
| ASSERT(code()->kind() == Code::BUILTIN);
|
| set_formal_parameter_count(kDontAdaptArgumentsSentinel);
|
|
|