Commit 92cb6f9d authored by Mostyn Bramley-Moore's avatar Mostyn Bramley-Moore Committed by Commit Bot

[jumbo] remove some using statements in cctest

This is required for jumbo builds to work before the stable jumbo chunk
algorithm[*] can reland.

[*] https://chromium-review.googlesource.com/c/chromium/src/+/1102218

Bug: chromium:856964, chromium:782863
Change-Id: Ibbe0994980eb554acd4e1557e733d07526a90608
Reviewed-on: https://chromium-review.googlesource.com/1117059Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Mostyn Bramley-Moore <mostynb@vewd.com>
Cr-Commit-Position: refs/heads/master@{#54070}
parent 5e249470
...@@ -42,9 +42,7 @@ using ::v8::base::OS; ...@@ -42,9 +42,7 @@ using ::v8::base::OS;
using ::v8::internal::Deoptimizer; using ::v8::internal::Deoptimizer;
using ::v8::internal::EmbeddedVector; using ::v8::internal::EmbeddedVector;
using ::v8::internal::Handle; using ::v8::internal::Handle;
using ::v8::internal::Isolate;
using ::v8::internal::JSFunction; using ::v8::internal::JSFunction;
using ::v8::internal::Object;
// Size of temp buffer for formatting small strings. // Size of temp buffer for formatting small strings.
#define SMALL_STRING_BUFFER_SIZE 80 #define SMALL_STRING_BUFFER_SIZE 80
......
...@@ -40,23 +40,19 @@ using ::v8::internal::CStrVector; ...@@ -40,23 +40,19 @@ using ::v8::internal::CStrVector;
using ::v8::internal::Factory; using ::v8::internal::Factory;
using ::v8::internal::Handle; using ::v8::internal::Handle;
using ::v8::internal::Heap; using ::v8::internal::Heap;
using ::v8::internal::Isolate;
using ::v8::internal::JSFunction; using ::v8::internal::JSFunction;
using ::v8::internal::Object;
using ::v8::internal::Runtime; using ::v8::internal::Runtime;
using ::v8::internal::Script;
using ::v8::internal::SharedFunctionInfo; using ::v8::internal::SharedFunctionInfo;
using ::v8::internal::String;
using ::v8::internal::Vector; using ::v8::internal::Vector;
static void CheckFunctionName(v8::Local<v8::Script> script, static void CheckFunctionName(v8::Local<v8::Script> script,
const char* func_pos_src, const char* func_pos_src,
const char* ref_inferred_name) { const char* ref_inferred_name) {
Isolate* isolate = CcTest::i_isolate(); i::Isolate* isolate = CcTest::i_isolate();
// Get script source. // Get script source.
Handle<Object> obj = v8::Utils::OpenHandle(*script); Handle<i::Object> obj = v8::Utils::OpenHandle(*script);
Handle<SharedFunctionInfo> shared_function; Handle<SharedFunctionInfo> shared_function;
if (obj->IsSharedFunctionInfo()) { if (obj->IsSharedFunctionInfo()) {
shared_function = shared_function =
...@@ -65,16 +61,17 @@ static void CheckFunctionName(v8::Local<v8::Script> script, ...@@ -65,16 +61,17 @@ static void CheckFunctionName(v8::Local<v8::Script> script,
shared_function = shared_function =
Handle<SharedFunctionInfo>(JSFunction::cast(*obj)->shared(), isolate); Handle<SharedFunctionInfo>(JSFunction::cast(*obj)->shared(), isolate);
} }
Handle<Script> i_script(Script::cast(shared_function->script()), isolate); Handle<i::Script> i_script(i::Script::cast(shared_function->script()),
isolate);
CHECK(i_script->source()->IsString()); CHECK(i_script->source()->IsString());
Handle<String> script_src(String::cast(i_script->source()), isolate); Handle<i::String> script_src(i::String::cast(i_script->source()), isolate);
// Find the position of a given func source substring in the source. // Find the position of a given func source substring in the source.
int func_pos; int func_pos;
{ {
i::DisallowHeapAllocation no_gc; i::DisallowHeapAllocation no_gc;
Vector<const uint8_t> func_pos_str = i::OneByteVector(func_pos_src); Vector<const uint8_t> func_pos_str = i::OneByteVector(func_pos_src);
String::FlatContent script_content = script_src->GetFlatContent(); i::String::FlatContent script_content = script_src->GetFlatContent();
func_pos = SearchString(isolate, script_content.ToOneByteVector(), func_pos = SearchString(isolate, script_content.ToOneByteVector(),
func_pos_str, 0); func_pos_str, 0);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment