Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: src/accessors.cc

Issue 1371893002: objects-inl.h: Remove ACCESSORS_TO_SMI macro (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: undo last_script_id storage change Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/allocation-tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index c04b26681ab5142de4326888ed175e80f6277f4d..5bd22bd8d31ad62b51da5c0a871942b948451550 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -318,7 +318,8 @@ void Accessors::ScriptColumnOffsetGetter(
DisallowHeapAllocation no_allocation;
HandleScope scope(isolate);
Object* object = *Utils::OpenHandle(*info.This());
- Object* res = Script::cast(JSValue::cast(object)->value())->column_offset();
+ Object* res = Smi::FromInt(
+ Script::cast(JSValue::cast(object)->value())->column_offset());
info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(res, isolate)));
}
@@ -355,7 +356,7 @@ void Accessors::ScriptIdGetter(
DisallowHeapAllocation no_allocation;
HandleScope scope(isolate);
Object* object = *Utils::OpenHandle(*info.This());
- Object* id = Script::cast(JSValue::cast(object)->value())->id();
+ Object* id = Smi::FromInt(Script::cast(JSValue::cast(object)->value())->id());
info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(id, isolate)));
}
@@ -462,7 +463,8 @@ void Accessors::ScriptLineOffsetGetter(
DisallowHeapAllocation no_allocation;
HandleScope scope(isolate);
Object* object = *Utils::OpenHandle(*info.This());
- Object* res = Script::cast(JSValue::cast(object)->value())->line_offset();
+ Object* res =
+ Smi::FromInt(Script::cast(JSValue::cast(object)->value())->line_offset());
info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(res, isolate)));
}
@@ -499,7 +501,8 @@ void Accessors::ScriptTypeGetter(
DisallowHeapAllocation no_allocation;
HandleScope scope(isolate);
Object* object = *Utils::OpenHandle(*info.This());
- Object* res = Script::cast(JSValue::cast(object)->value())->type();
+ Object* res =
+ Smi::FromInt(Script::cast(JSValue::cast(object)->value())->type());
info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(res, isolate)));
}
@@ -814,10 +817,10 @@ void Accessors::ScriptEvalFromScriptPositionGetter(
if (script->compilation_type() == Script::COMPILATION_TYPE_EVAL) {
Handle<Code> code(SharedFunctionInfo::cast(
script->eval_from_shared())->code());
- result = Handle<Object>(
- Smi::FromInt(code->SourcePosition(code->instruction_start() +
- script->eval_from_instructions_offset()->value())),
- isolate);
+ result = Handle<Object>(Smi::FromInt(code->SourcePosition(
+ code->instruction_start() +
+ script->eval_from_instructions_offset())),
+ isolate);
}
info.GetReturnValue().Set(Utils::ToLocal(result));
}
« no previous file with comments | « no previous file | src/allocation-tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698