OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/isolate.h" | 5 #include "src/isolate.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1447 } | 1447 } |
1448 } | 1448 } |
1449 return false; | 1449 return false; |
1450 } | 1450 } |
1451 | 1451 |
1452 | 1452 |
1453 Handle<JSMessageObject> Isolate::CreateMessage(Handle<Object> exception, | 1453 Handle<JSMessageObject> Isolate::CreateMessage(Handle<Object> exception, |
1454 MessageLocation* location) { | 1454 MessageLocation* location) { |
1455 Handle<JSArray> stack_trace_object; | 1455 Handle<JSArray> stack_trace_object; |
1456 if (capture_stack_trace_for_uncaught_exceptions_) { | 1456 if (capture_stack_trace_for_uncaught_exceptions_) { |
1457 if (Object::IsErrorObject(this, exception)) { | 1457 if (exception->IsJSError()) { |
1458 // We fetch the stack trace that corresponds to this error object. | 1458 // We fetch the stack trace that corresponds to this error object. |
1459 // If the lookup fails, the exception is probably not a valid Error | 1459 // If the lookup fails, the exception is probably not a valid Error |
1460 // object. In that case, we fall through and capture the stack trace | 1460 // object. In that case, we fall through and capture the stack trace |
1461 // at this throw site. | 1461 // at this throw site. |
1462 stack_trace_object = | 1462 stack_trace_object = |
1463 GetDetailedStackTrace(Handle<JSObject>::cast(exception)); | 1463 GetDetailedStackTrace(Handle<JSObject>::cast(exception)); |
1464 } | 1464 } |
1465 if (stack_trace_object.is_null()) { | 1465 if (stack_trace_object.is_null()) { |
1466 // Not an error object, we capture stack and location at throw site. | 1466 // Not an error object, we capture stack and location at throw site. |
1467 stack_trace_object = CaptureCurrentStackTrace( | 1467 stack_trace_object = CaptureCurrentStackTrace( |
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3057 // Then check whether this scope intercepts. | 3057 // Then check whether this scope intercepts. |
3058 if ((flag & intercept_mask_)) { | 3058 if ((flag & intercept_mask_)) { |
3059 intercepted_flags_ |= flag; | 3059 intercepted_flags_ |= flag; |
3060 return true; | 3060 return true; |
3061 } | 3061 } |
3062 return false; | 3062 return false; |
3063 } | 3063 } |
3064 | 3064 |
3065 } // namespace internal | 3065 } // namespace internal |
3066 } // namespace v8 | 3066 } // namespace v8 |
OLD | NEW |