Index: src/accessors.cc |
diff --git a/src/accessors.cc b/src/accessors.cc |
index a43eb78b8702d57ca504e734a38e1bc635582bec..51db3615c382f38d787333b98ac753bf9e7f83d9 100644 |
--- a/src/accessors.cc |
+++ b/src/accessors.cc |
@@ -292,7 +292,7 @@ const AccessorDescriptor Accessors::ScriptType = { |
MaybeObject* Accessors::ScriptGetCompilationType(Object* object, void*) { |
Object* script = JSValue::cast(object)->value(); |
- return Smi::FromInt(Script::cast(script)->compilation_type()); |
+ return Script::cast(script)->compilation_type(); |
} |
@@ -388,7 +388,8 @@ MaybeObject* Accessors::ScriptGetEvalFromScriptPosition(Object* object, void*) { |
Handle<Script> script(raw_script); |
// If this is not a script compiled through eval there is no eval position. |
- if (script->compilation_type() != Script::COMPILATION_TYPE_EVAL) { |
+ int compilation_type = Smi::cast(script->compilation_type())->value(); |
+ if (compilation_type != Script::COMPILATION_TYPE_EVAL) { |
return script->GetHeap()->undefined_value(); |
} |