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/debug.cc | |
parent | b404996cf3acf2bb9cdb80a2e540dbd8c64cf1b9 (diff) | |
download | node-d03b67669c05338101ac460d170154a44c0cf9c5.tar.gz |
Upgrade v8 to 1.3.15
Diffstat (limited to 'deps/v8/src/debug.cc')
-rw-r--r-- | deps/v8/src/debug.cc | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/deps/v8/src/debug.cc b/deps/v8/src/debug.cc index ec658d68f..4f89f92e9 100644 --- a/deps/v8/src/debug.cc +++ b/deps/v8/src/debug.cc @@ -1677,22 +1677,6 @@ void Debug::ClearMirrorCache() { } -// If an object given is an external string, check that the underlying -// resource is accessible. For other kinds of objects, always return true. -static bool IsExternalStringValid(Object* str) { - if (!str->IsString() || !StringShape(String::cast(str)).IsExternal()) { - return true; - } - if (String::cast(str)->IsAsciiRepresentation()) { - return ExternalAsciiString::cast(str)->resource() != NULL; - } else if (String::cast(str)->IsTwoByteRepresentation()) { - return ExternalTwoByteString::cast(str)->resource() != NULL; - } else { - return true; - } -} - - void Debug::CreateScriptCache() { HandleScope scope; @@ -1711,7 +1695,7 @@ void Debug::CreateScriptCache() { while (iterator.has_next()) { HeapObject* obj = iterator.next(); ASSERT(obj != NULL); - if (obj->IsScript() && IsExternalStringValid(Script::cast(obj)->source())) { + if (obj->IsScript() && Script::cast(obj)->HasValidSource()) { script_cache_->Add(Handle<Script>(Script::cast(obj))); count++; } |