diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2009-10-07 16:02:34 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2009-10-07 16:02:34 +0200 |
commit | d03b67669c05338101ac460d170154a44c0cf9c5 (patch) | |
tree | 476b09a2f8d1dceaf1bfaec818452ca21fdf63e5 /deps/v8/src/objects-inl.h | |
parent | b404996cf3acf2bb9cdb80a2e540dbd8c64cf1b9 (diff) | |
download | node-new-d03b67669c05338101ac460d170154a44c0cf9c5.tar.gz |
Upgrade v8 to 1.3.15
Diffstat (limited to 'deps/v8/src/objects-inl.h')
-rw-r--r-- | deps/v8/src/objects-inl.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/deps/v8/src/objects-inl.h b/deps/v8/src/objects-inl.h index 29b886d87b..22e12ac7d0 100644 --- a/deps/v8/src/objects-inl.h +++ b/deps/v8/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); |