Commit 8109d7e1 authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

Pass Isolate to Accessors::IsJSObjectFieldAccessor

Avoid calling GetIsolate by passing the Isolate directly to
Accessors::IsJSObjectFieldAccessor.

Bug: v8:7786
Change-Id: I8a3b26080da64110b0c40df63395cab4e85704b7
Reviewed-on: https://chromium-review.googlesource.com/1080808Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53536}
parent dd835602
......@@ -60,10 +60,8 @@ static V8_INLINE bool CheckForName(Handle<Name> name,
// Returns true for properties that are accessors to object fields.
// If true, *object_offset contains offset of object field.
bool Accessors::IsJSObjectFieldAccessor(Handle<Map> map, Handle<Name> name,
FieldIndex* index) {
Isolate* isolate = name->GetIsolate();
bool Accessors::IsJSObjectFieldAccessor(Isolate* isolate, Handle<Map> map,
Handle<Name> name, FieldIndex* index) {
switch (map->instance_type()) {
case JS_ARRAY_TYPE:
return CheckForName(name, isolate->factory()->length_string(),
......
......@@ -106,7 +106,8 @@ class Accessors : public AllStatic {
// Returns true for properties that are accessors to object fields.
// If true, the matching FieldIndex is returned through |field_index|.
static bool IsJSObjectFieldAccessor(Handle<Map> map, Handle<Name> name,
static bool IsJSObjectFieldAccessor(Isolate* isolate, Handle<Map> map,
Handle<Name> name,
FieldIndex* field_index);
static MaybeHandle<Object> ReplaceAccessorWithDataProperty(
......
......@@ -622,7 +622,7 @@ bool AccessInfoFactory::LookupSpecialFieldAccessor(
Handle<Map> map, Handle<Name> name, PropertyAccessInfo* access_info) {
// Check for special JSObject field accessors.
FieldIndex field_index;
if (Accessors::IsJSObjectFieldAccessor(map, name, &field_index)) {
if (Accessors::IsJSObjectFieldAccessor(isolate(), map, name, &field_index)) {
Type field_type = Type::NonInternal();
MachineRepresentation field_representation = MachineRepresentation::kTagged;
if (map->IsStringMap()) {
......
......@@ -797,7 +797,8 @@ Handle<Object> LoadIC::ComputeHandler(LookupIterator* lookup) {
// The method will only return true for absolute truths based on the
// receiver maps.
FieldIndex index;
if (Accessors::IsJSObjectFieldAccessor(map, lookup->name(), &index)) {
if (Accessors::IsJSObjectFieldAccessor(isolate(), map, lookup->name(),
&index)) {
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldDH);
return LoadHandler::LoadField(isolate(), index);
}
......
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