Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index c88b3fc329d8e0ed013ac0c4661e843868334fb5..4820f9d57f385a1c1c49e6fbc2765c60128ca542 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -3735,8 +3735,9 @@ ScriptOrigin Function::GetScriptOrigin() const { |
i::Handle<i::JSFunction> func = Utils::OpenHandle(this); |
if (func->shared()->script()->IsScript()) { |
i::Handle<i::Script> script(i::Script::cast(func->shared()->script())); |
+ i::Handle<i::Object> scriptName = GetScriptNameOrSourceURL(script); |
v8::ScriptOrigin origin( |
- Utils::ToLocal(i::Handle<i::Object>(script->name())), |
+ Utils::ToLocal(scriptName), |
v8::Integer::New(script->line_offset()->value()), |
v8::Integer::New(script->column_offset()->value())); |
return origin; |