summaryrefslogtreecommitdiff
path: root/deps/v8/src/objects-inl.h
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2009-10-07 16:02:34 +0200
committerRyan Dahl <ry@tinyclouds.org>2009-10-07 16:02:34 +0200
commitd03b67669c05338101ac460d170154a44c0cf9c5 (patch)
tree476b09a2f8d1dceaf1bfaec818452ca21fdf63e5 /deps/v8/src/objects-inl.h
parentb404996cf3acf2bb9cdb80a2e540dbd8c64cf1b9 (diff)
downloadnode-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.h14
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);