| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/v8.h" | 10 #include "src/v8.h" |
| (...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1374 // before throwing as uncaught exception. Note that the pending | 1374 // before throwing as uncaught exception. Note that the pending |
| 1375 // exception object to be set later must not be turned into a string. | 1375 // exception object to be set later must not be turned into a string. |
| 1376 if (exception->IsJSObject() && !IsErrorObject(exception)) { | 1376 if (exception->IsJSObject() && !IsErrorObject(exception)) { |
| 1377 MaybeHandle<Object> maybe_exception = | 1377 MaybeHandle<Object> maybe_exception = |
| 1378 Execution::ToDetailString(this, exception); | 1378 Execution::ToDetailString(this, exception); |
| 1379 if (!maybe_exception.ToHandle(&exception)) { | 1379 if (!maybe_exception.ToHandle(&exception)) { |
| 1380 exception = | 1380 exception = |
| 1381 factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("exception")); | 1381 factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("exception")); |
| 1382 } | 1382 } |
| 1383 } | 1383 } |
| 1384 return MessageHandler::MakeMessageObject(this, "uncaught_exception", location, | 1384 return MessageHandler::MakeMessageObject( |
| 1385 HandleVector<Object>(&exception, 1), | 1385 this, MessageTemplate::kUncaughtException, location, exception, |
| 1386 stack_trace_object); | 1386 stack_trace_object); |
| 1387 } | 1387 } |
| 1388 | 1388 |
| 1389 | 1389 |
| 1390 bool Isolate::IsJavaScriptHandlerOnTop(Object* exception) { | 1390 bool Isolate::IsJavaScriptHandlerOnTop(Object* exception) { |
| 1391 DCHECK_NE(heap()->the_hole_value(), exception); | 1391 DCHECK_NE(heap()->the_hole_value(), exception); |
| 1392 | 1392 |
| 1393 // For uncatchable exceptions, the JavaScript handler cannot be on top. | 1393 // For uncatchable exceptions, the JavaScript handler cannot be on top. |
| 1394 if (!is_catchable_by_javascript(exception)) return false; | 1394 if (!is_catchable_by_javascript(exception)) return false; |
| 1395 | 1395 |
| 1396 // Get the top-most JS_ENTRY handler, cannot be on top if it doesn't exist. | 1396 // Get the top-most JS_ENTRY handler, cannot be on top if it doesn't exist. |
| (...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2772 if (prev_ && prev_->Intercept(flag)) return true; | 2772 if (prev_ && prev_->Intercept(flag)) return true; |
| 2773 // Then check whether this scope intercepts. | 2773 // Then check whether this scope intercepts. |
| 2774 if ((flag & intercept_mask_)) { | 2774 if ((flag & intercept_mask_)) { |
| 2775 intercepted_flags_ |= flag; | 2775 intercepted_flags_ |= flag; |
| 2776 return true; | 2776 return true; |
| 2777 } | 2777 } |
| 2778 return false; | 2778 return false; |
| 2779 } | 2779 } |
| 2780 | 2780 |
| 2781 } } // namespace v8::internal | 2781 } } // namespace v8::internal |
| OLD | NEW |