| OLD | NEW |
| 1 | 1 |
| 2 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 2 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
| 4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
| 5 // met: | 5 // met: |
| 6 // | 6 // |
| 7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
| 8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
| 9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
| 10 // copyright notice, this list of conditions and the following | 10 // copyright notice, this list of conditions and the following |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | 28 |
| 29 #include "v8.h" | 29 #include "v8.h" |
| 30 | 30 |
| 31 #include "api.h" | 31 #include "api.h" |
| 32 #include "execution.h" | 32 #include "execution.h" |
| 33 #include "spaces-inl.h" | 33 #include "spaces-inl.h" |
| 34 #include "top.h" | 34 #include "top.h" |
| 35 | 35 |
| 36 namespace v8 { namespace internal { | 36 namespace v8 { |
| 37 namespace internal { |
| 37 | 38 |
| 38 | 39 |
| 39 // If no message listeners have been registered this one is called | 40 // If no message listeners have been registered this one is called |
| 40 // by default. | 41 // by default. |
| 41 void MessageHandler::DefaultMessageReport(const MessageLocation* loc, | 42 void MessageHandler::DefaultMessageReport(const MessageLocation* loc, |
| 42 Handle<Object> message_obj) { | 43 Handle<Object> message_obj) { |
| 43 SmartPointer<char> str = GetLocalizedMessage(message_obj); | 44 SmartPointer<char> str = GetLocalizedMessage(message_obj); |
| 44 if (loc == NULL) { | 45 if (loc == NULL) { |
| 45 PrintF("%s\n", *str); | 46 PrintF("%s\n", *str); |
| 46 } else { | 47 } else { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } | 170 } |
| 170 | 171 |
| 171 | 172 |
| 172 SmartPointer<char> MessageHandler::GetLocalizedMessage(Handle<Object> data) { | 173 SmartPointer<char> MessageHandler::GetLocalizedMessage(Handle<Object> data) { |
| 173 HandleScope scope; | 174 HandleScope scope; |
| 174 return GetMessage(data)->ToCString(DISALLOW_NULLS); | 175 return GetMessage(data)->ToCString(DISALLOW_NULLS); |
| 175 } | 176 } |
| 176 | 177 |
| 177 | 178 |
| 178 } } // namespace v8::internal | 179 } } // namespace v8::internal |
| OLD | NEW |