Version 3.15.2

Function::GetScriptOrigin supplies sourceURL when script name is not available.  (Chromium issue 159413)

Made formatting error message side-effect-free.  (issue 2398)

Fixed length check in JSON.stringify.  (Chromium issue 160010)

ES6: Added support for Set and Map clear method (issue 2400)

Fixed slack tracking when instance prototype changes. (Chromium issue 157019)

Fixed disabling of code flusher while marking.  (Chromium issue 159140)

Added a test case for object grouping in a scavenger GC (issue 2077)

Support shared library build of Android for v8. (Chromium issue 158821)

ES6: Added support for size to Set and Map (issue 2395)

Performance and stability improvements on all platforms.

git-svn-id: http://v8.googlecode.com/svn/trunk@12934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/isolate.cc b/src/isolate.cc
index 75e15a4..00979f7 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -574,8 +574,6 @@
   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 @@
       }
 
       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,
@@ -1138,6 +1125,14 @@
               stack_trace_for_uncaught_exceptions_options_);
         }
       }
+      // Stringify custom error objects for the message object.
+      if (exception_handle->IsJSObject() && !IsErrorObject(exception_handle)) {
+        bool failed = false;
+        exception_handle = Execution::ToString(exception_handle, &failed);
+        if (failed) {
+          exception_handle = factory()->LookupAsciiSymbol("exception");
+        }
+      }
       Handle<Object> message_obj = MessageHandler::MakeMessageObject(
           "uncaught_exception",
           location,