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)); |
} |