LOG_API(isolate, "FunctionTemplate::New");
ENTER_V8;
i::Handle<i::Struct> struct_obj =
- FACTORY->NewStruct(i::FUNCTION_TEMPLATE_INFO_TYPE);
+ isolate->factory()->NewStruct(i::FUNCTION_TEMPLATE_INFO_TYPE);
i::Handle<i::FunctionTemplateInfo> obj =
i::Handle<i::FunctionTemplateInfo>::cast(struct_obj);
InitializeFunctionTemplate(obj);
LOG_API(isolate, "Signature::New");
ENTER_V8;
i::Handle<i::Struct> struct_obj =
- FACTORY->NewStruct(i::SIGNATURE_INFO_TYPE);
+ isolate->factory()->NewStruct(i::SIGNATURE_INFO_TYPE);
i::Handle<i::SignatureInfo> obj =
i::Handle<i::SignatureInfo>::cast(struct_obj);
if (!receiver.IsEmpty()) obj->set_receiver(*Utils::OpenHandle(*receiver));
if (argc > 0) {
- i::Handle<i::FixedArray> args = FACTORY->NewFixedArray(argc);
+ i::Handle<i::FixedArray> args = isolate->factory()->NewFixedArray(argc);
for (int i = 0; i < argc; i++) {
if (!argv[i].IsEmpty())
args->set(i, *Utils::OpenHandle(*argv[i]));
ENTER_V8;
i::HandleScope scope(isolate);
i::Handle<i::Struct> struct_obj =
- FACTORY->NewStruct(i::CALL_HANDLER_INFO_TYPE);
+ isolate->factory()->NewStruct(i::CALL_HANDLER_INFO_TYPE);
i::Handle<i::CallHandlerInfo> obj =
i::Handle<i::CallHandlerInfo>::cast(struct_obj);
SET_FIELD_WRAPPED(obj, set_callback, callback);
LOG_API(isolate, "ObjectTemplate::New");
ENTER_V8;
i::Handle<i::Struct> struct_obj =
- FACTORY->NewStruct(i::OBJECT_TEMPLATE_INFO_TYPE);
+ isolate->factory()->NewStruct(i::OBJECT_TEMPLATE_INFO_TYPE);
i::Handle<i::ObjectTemplateInfo> obj =
i::Handle<i::ObjectTemplateInfo>::cast(struct_obj);
InitializeTemplate(obj, Consts::OBJECT_TEMPLATE);
EnsureConstructor(this);
i::Handle<i::Struct> struct_info =
- FACTORY->NewStruct(i::ACCESS_CHECK_INFO_TYPE);
+ isolate->factory()->NewStruct(i::ACCESS_CHECK_INFO_TYPE);
i::Handle<i::AccessCheckInfo> info =
i::Handle<i::AccessCheckInfo>::cast(struct_info);
i::Handle<i::SharedFunctionInfo> function =
i::Handle<i::SharedFunctionInfo>(i::SharedFunctionInfo::cast(*obj));
i::Handle<i::JSFunction> result =
- FACTORY->NewFunctionFromSharedFunctionInfo(
+ isolate->factory()->NewFunctionFromSharedFunctionInfo(
function,
i::Isolate::Current()->global_context());
return Local<Script>(ToApi<Script>(result));
if (obj->IsSharedFunctionInfo()) {
i::Handle<i::SharedFunctionInfo>
function_info(i::SharedFunctionInfo::cast(*obj));
- fun = FACTORY->NewFunctionFromSharedFunctionInfo(
+ fun = isolate->factory()->NewFunctionFromSharedFunctionInfo(
function_info, i::Isolate::Current()->global_context());
} else {
fun = i::Handle<i::JSFunction>(i::JSFunction::cast(*obj));
if (index <= static_cast<uint32_t>(i::Smi::kMaxValue)) {
value = i::Handle<i::Object>(i::Smi::FromInt(index));
} else {
- value = FACTORY->NewNumber(index);
+ value = isolate->factory()->NewNumber(index);
}
return Utils::Uint32ToLocal(value);
}
Local<Array> v8::Object::GetPropertyNames() {
- ON_BAILOUT(i::Isolate::Current(), "v8::Object::GetPropertyNames()",
+ i::Isolate* isolate = i::Isolate::Current();
+ ON_BAILOUT(isolate, "v8::Object::GetPropertyNames()",
return Local<v8::Array>());
ENTER_V8;
v8::HandleScope scope;
// Because we use caching to speed up enumeration it is important
// to never change the result of the basic enumeration function so
// we clone the result.
- i::Handle<i::FixedArray> elms = FACTORY->CopyFixedArray(value);
- i::Handle<i::JSArray> result = FACTORY->NewJSArrayWithElements(elms);
+ i::Handle<i::FixedArray> elms = isolate->factory()->CopyFixedArray(value);
+ i::Handle<i::JSArray> result =
+ isolate->factory()->NewJSArrayWithElements(elms);
return scope.Close(Utils::ToLocal(result));
}
i::Deoptimizer::DeoptimizeGlobalObject(*obj);
i::Handle<i::Map> new_map =
- FACTORY->CopyMapDropTransitions(i::Handle<i::Map>(obj->map()));
+ isolate->factory()->CopyMapDropTransitions(i::Handle<i::Map>(obj->map()));
new_map->set_is_access_check_needed(true);
obj->set_map(*new_map);
}
}
i::Handle<i::JSObject> hidden_props =
i::Handle<i::JSObject>::cast(hidden_props_obj);
- i::Handle<i::String> hash_symbol = FACTORY->identity_hash_symbol();
+ i::Handle<i::String> hash_symbol = isolate->factory()->identity_hash_symbol();
if (hidden_props->HasLocalProperty(*hash_symbol)) {
i::Handle<i::Object> hash = i::GetProperty(hidden_props, hash_symbol);
CHECK(!hash.is_null());
ENTER_V8;
if (length == -1) length = i::StrLength(data);
i::Handle<i::String> result =
- FACTORY->LookupSymbol(i::Vector<const char>(data, length));
+ isolate->factory()->LookupSymbol(i::Vector<const char>(data, length));
return Utils::ToLocal(result);
}
{
i::HandleScope scope(isolate);
i::Handle<i::String> message = Utils::OpenHandle(*raw_message);
- i::Handle<i::Object> result = FACTORY->NewRangeError(message);
+ i::Handle<i::Object> result = isolate->factory()->NewRangeError(message);
error = *result;
}
i::Handle<i::Object> result(error);
{
i::HandleScope scope(isolate);
i::Handle<i::String> message = Utils::OpenHandle(*raw_message);
- i::Handle<i::Object> result = FACTORY->NewReferenceError(message);
+ i::Handle<i::Object> result =
+ isolate->factory()->NewReferenceError(message);
error = *result;
}
i::Handle<i::Object> result(error);
{
i::HandleScope scope(isolate);
i::Handle<i::String> message = Utils::OpenHandle(*raw_message);
- i::Handle<i::Object> result = FACTORY->NewSyntaxError(message);
+ i::Handle<i::Object> result = isolate->factory()->NewSyntaxError(message);
error = *result;
}
i::Handle<i::Object> result(error);
{
i::HandleScope scope(isolate);
i::Handle<i::String> message = Utils::OpenHandle(*raw_message);
- i::Handle<i::Object> result = FACTORY->NewTypeError(message);
+ i::Handle<i::Object> result = isolate->factory()->NewTypeError(message);
error = *result;
}
i::Handle<i::Object> result(error);
{
i::HandleScope scope(isolate);
i::Handle<i::String> message = Utils::OpenHandle(*raw_message);
- i::Handle<i::Object> result = FACTORY->NewError(message);
+ i::Handle<i::Object> result = isolate->factory()->NewError(message);
error = *result;
}
i::Handle<i::Object> result(error);
i::Handle<i::Object> result;
EXCEPTION_PREAMBLE();
if (data.IsEmpty()) {
- result =
- i::Isolate::Current()->debugger()->Call(Utils::OpenHandle(*fun),
- FACTORY->undefined_value(),
- &has_pending_exception);
+ result = i::Isolate::Current()->debugger()->Call(
+ Utils::OpenHandle(*fun),
+ isolate->factory()->undefined_value(),
+ &has_pending_exception);
} else {
result = i::Isolate::Current()->debugger()->Call(Utils::OpenHandle(*fun),
Utils::OpenHandle(*data),
i::Debug* isolate_debug = i::Isolate::Current()->debug();
isolate_debug->Load();
i::Handle<i::JSObject> debug(isolate_debug->debug_context()->global());
- i::Handle<i::String> name = FACTORY->LookupAsciiSymbol("MakeMirror");
+ i::Handle<i::String> name =
+ isolate->factory()->LookupAsciiSymbol("MakeMirror");
i::Handle<i::Object> fun_obj = i::GetProperty(debug, name);
i::Handle<i::JSFunction> fun = i::Handle<i::JSFunction>::cast(fun_obj);
v8::Handle<v8::Function> v8_fun = Utils::ToLocal(fun);
i::Isolate* isolate = i::Isolate::Current();
IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptResourceName");
const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
- return Handle<String>(ToApi<String>(FACTORY->LookupAsciiSymbol(
+ return Handle<String>(ToApi<String>(isolate->factory()->LookupAsciiSymbol(
node->entry()->resource_name())));
}
i::Isolate* isolate = i::Isolate::Current();
IsDeadCheck(isolate, "v8::CpuProfile::GetTitle");
const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this);
- return Handle<String>(ToApi<String>(FACTORY->LookupAsciiSymbol(
+ return Handle<String>(ToApi<String>(isolate->factory()->LookupAsciiSymbol(
profile->title())));
}
case i::HeapGraphEdge::kInternal:
case i::HeapGraphEdge::kProperty:
case i::HeapGraphEdge::kShortcut:
- return Handle<String>(ToApi<String>(FACTORY->LookupAsciiSymbol(
+ return Handle<String>(ToApi<String>(isolate->factory()->LookupAsciiSymbol(
edge->name())));
case i::HeapGraphEdge::kElement:
case i::HeapGraphEdge::kHidden:
- return Handle<Number>(ToApi<Number>(FACTORY->NewNumberFromInt(
+ return Handle<Number>(ToApi<Number>(isolate->factory()->NewNumberFromInt(
edge->index())));
default: UNREACHABLE();
}
Handle<String> HeapGraphNode::GetName() const {
i::Isolate* isolate = i::Isolate::Current();
IsDeadCheck(isolate, "v8::HeapGraphNode::GetName");
- return Handle<String>(ToApi<String>(FACTORY->LookupAsciiSymbol(
+ return Handle<String>(ToApi<String>(isolate->factory()->LookupAsciiSymbol(
ToInternal(this)->name())));
}
Handle<String> HeapSnapshot::GetTitle() const {
i::Isolate* isolate = i::Isolate::Current();
IsDeadCheck(isolate, "v8::HeapSnapshot::GetTitle");
- return Handle<String>(ToApi<String>(FACTORY->LookupAsciiSymbol(
+ return Handle<String>(ToApi<String>(isolate->factory()->LookupAsciiSymbol(
ToInternal(this)->title())));
}