Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index b077a70f6b90aa1ae679c9802f8ed8faeb343622..00979f76d263632b4e37bca542b4f452b4726e71 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -574,8 +574,6 @@ Handle<JSArray> Isolate::CaptureCurrentStackTrace( |
Handle<String> column_key = factory()->LookupAsciiSymbol("column"); |
Handle<String> line_key = factory()->LookupAsciiSymbol("lineNumber"); |
Handle<String> script_key = factory()->LookupAsciiSymbol("scriptName"); |
- Handle<String> name_or_source_url_key = |
- factory()->LookupAsciiSymbol("nameOrSourceURL"); |
Handle<String> script_name_or_source_url_key = |
factory()->LookupAsciiSymbol("scriptNameOrSourceURL"); |
Handle<String> function_key = factory()->LookupAsciiSymbol("functionName"); |
@@ -635,18 +633,7 @@ Handle<JSArray> Isolate::CaptureCurrentStackTrace( |
} |
if (options & StackTrace::kScriptNameOrSourceURL) { |
- Handle<Object> script_name(script->name(), this); |
- Handle<JSValue> script_wrapper = GetScriptWrapper(script); |
- Handle<Object> property = GetProperty(script_wrapper, |
- name_or_source_url_key); |
- ASSERT(property->IsJSFunction()); |
- Handle<JSFunction> method = Handle<JSFunction>::cast(property); |
- bool caught_exception; |
- Handle<Object> result = Execution::TryCall(method, script_wrapper, 0, |
- NULL, &caught_exception); |
- if (caught_exception) { |
- result = factory()->undefined_value(); |
- } |
+ Handle<Object> result = GetScriptNameOrSourceURL(script); |
CHECK_NOT_EMPTY_HANDLE(this, |
JSObject::SetLocalPropertyIgnoreAttributes( |
stack_frame, script_name_or_source_url_key, |