From a409a2d651951cd569b31c9502790eaa700326da Mon Sep 17 00:00:00 2001 From: "mstarzinger@chromium.org" Date: Wed, 25 Sep 2013 09:31:10 +0000 Subject: [PATCH] Remove obsolete global SubString method. R=yangguo@chromium.org Review URL: https://codereview.chromium.org/24545002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/handles.cc | 9 --------- src/handles.h | 5 ----- src/objects.cc | 3 ++- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/handles.cc b/src/handles.cc index 033fdab3dc..6b9025dbf6 100644 --- a/src/handles.cc +++ b/src/handles.cc @@ -285,15 +285,6 @@ Handle LookupSingleCharacterStringFromCode(Isolate* isolate, } -Handle SubString(Handle str, - int start, - int end, - PretenureFlag pretenure) { - CALL_HEAP_FUNCTION(str->GetIsolate(), - str->SubString(start, end, pretenure), String); -} - - // Wrappers for scripts are kept alive and cached in weak global // handles referred from foreign objects held by the scripts as long as // they are used. When they are not used anymore, the garbage diff --git a/src/handles.h b/src/handles.h index 585f7b4e79..0f619d572e 100644 --- a/src/handles.h +++ b/src/handles.h @@ -299,11 +299,6 @@ Handle GetEnumPropertyKeys(Handle object, Handle UnionOfKeys(Handle first, Handle second); -Handle SubString(Handle str, - int start, - int end, - PretenureFlag pretenure = NOT_TENURED); - // Sets the expected number of properties for the function's instances. void SetExpectedNofProperties(Handle func, int nof); diff --git a/src/objects.cc b/src/objects.cc index 169307fb8e..32127eb8b9 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -9734,7 +9734,8 @@ bool SharedFunctionInfo::HasSourceCode() { Handle SharedFunctionInfo::GetSourceCode() { if (!HasSourceCode()) return GetIsolate()->factory()->undefined_value(); Handle source(String::cast(Script::cast(script())->source())); - return SubString(source, start_position(), end_position()); + return GetIsolate()->factory()->NewSubString( + source, start_position(), end_position()); }