OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3592 return v8::Utils::ToLocal(event_data_); | 3592 return v8::Utils::ToLocal(event_data_); |
3593 } | 3593 } |
3594 | 3594 |
3595 | 3595 |
3596 v8::Handle<v8::String> MessageImpl::GetJSON() const { | 3596 v8::Handle<v8::String> MessageImpl::GetJSON() const { |
3597 v8::EscapableHandleScope scope( | 3597 v8::EscapableHandleScope scope( |
3598 reinterpret_cast<v8::Isolate*>(event_data_->GetIsolate())); | 3598 reinterpret_cast<v8::Isolate*>(event_data_->GetIsolate())); |
3599 | 3599 |
3600 if (IsEvent()) { | 3600 if (IsEvent()) { |
3601 // Call toJSONProtocol on the debug event object. | 3601 // Call toJSONProtocol on the debug event object. |
3602 Handle<Object> fun = GetProperty(event_data_, "toJSONProtocol"); | 3602 Handle<Object> fun = |
| 3603 GetProperty(event_data_, "toJSONProtocol").ToHandleChecked(); |
3603 if (!fun->IsJSFunction()) { | 3604 if (!fun->IsJSFunction()) { |
3604 return v8::Handle<v8::String>(); | 3605 return v8::Handle<v8::String>(); |
3605 } | 3606 } |
3606 bool caught_exception; | 3607 bool caught_exception; |
3607 Handle<Object> json = Execution::TryCall(Handle<JSFunction>::cast(fun), | 3608 Handle<Object> json = Execution::TryCall(Handle<JSFunction>::cast(fun), |
3608 event_data_, | 3609 event_data_, |
3609 0, NULL, &caught_exception); | 3610 0, NULL, &caught_exception); |
3610 if (caught_exception || !json->IsString()) { | 3611 if (caught_exception || !json->IsString()) { |
3611 return v8::Handle<v8::String>(); | 3612 return v8::Handle<v8::String>(); |
3612 } | 3613 } |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3808 { | 3809 { |
3809 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); | 3810 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); |
3810 isolate_->debugger()->CallMessageDispatchHandler(); | 3811 isolate_->debugger()->CallMessageDispatchHandler(); |
3811 } | 3812 } |
3812 } | 3813 } |
3813 } | 3814 } |
3814 | 3815 |
3815 #endif // ENABLE_DEBUGGER_SUPPORT | 3816 #endif // ENABLE_DEBUGGER_SUPPORT |
3816 | 3817 |
3817 } } // namespace v8::internal | 3818 } } // namespace v8::internal |
OLD | NEW |