| 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/debug/debug.h" | 5 #include "src/debug/debug.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2386 return event_; | 2386 return event_; |
| 2387 } | 2387 } |
| 2388 | 2388 |
| 2389 | 2389 |
| 2390 bool MessageImpl::WillStartRunning() const { | 2390 bool MessageImpl::WillStartRunning() const { |
| 2391 return running_; | 2391 return running_; |
| 2392 } | 2392 } |
| 2393 | 2393 |
| 2394 | 2394 |
| 2395 v8::Local<v8::Object> MessageImpl::GetExecutionState() const { | 2395 v8::Local<v8::Object> MessageImpl::GetExecutionState() const { |
| 2396 return v8::Utils::ToLocal(exec_state_); | 2396 return v8::Utils::ReceiverToLocal(exec_state_); |
| 2397 } | 2397 } |
| 2398 | 2398 |
| 2399 | 2399 |
| 2400 v8::Isolate* MessageImpl::GetIsolate() const { | 2400 v8::Isolate* MessageImpl::GetIsolate() const { |
| 2401 return reinterpret_cast<v8::Isolate*>(exec_state_->GetIsolate()); | 2401 return reinterpret_cast<v8::Isolate*>(exec_state_->GetIsolate()); |
| 2402 } | 2402 } |
| 2403 | 2403 |
| 2404 | 2404 |
| 2405 v8::Local<v8::Object> MessageImpl::GetEventData() const { | 2405 v8::Local<v8::Object> MessageImpl::GetEventData() const { |
| 2406 return v8::Utils::ToLocal(event_data_); | 2406 return v8::Utils::ReceiverToLocal(event_data_); |
| 2407 } | 2407 } |
| 2408 | 2408 |
| 2409 | 2409 |
| 2410 v8::Local<v8::String> MessageImpl::GetJSON() const { | 2410 v8::Local<v8::String> MessageImpl::GetJSON() const { |
| 2411 Isolate* isolate = event_data_->GetIsolate(); | 2411 Isolate* isolate = event_data_->GetIsolate(); |
| 2412 v8::EscapableHandleScope scope(reinterpret_cast<v8::Isolate*>(isolate)); | 2412 v8::EscapableHandleScope scope(reinterpret_cast<v8::Isolate*>(isolate)); |
| 2413 | 2413 |
| 2414 if (IsEvent()) { | 2414 if (IsEvent()) { |
| 2415 // Call toJSONProtocol on the debug event object. | 2415 // Call toJSONProtocol on the debug event object. |
| 2416 Handle<Object> fun = Object::GetProperty( | 2416 Handle<Object> fun = Object::GetProperty( |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2457 callback_data_(callback_data), | 2457 callback_data_(callback_data), |
| 2458 client_data_(client_data) {} | 2458 client_data_(client_data) {} |
| 2459 | 2459 |
| 2460 | 2460 |
| 2461 DebugEvent EventDetailsImpl::GetEvent() const { | 2461 DebugEvent EventDetailsImpl::GetEvent() const { |
| 2462 return event_; | 2462 return event_; |
| 2463 } | 2463 } |
| 2464 | 2464 |
| 2465 | 2465 |
| 2466 v8::Local<v8::Object> EventDetailsImpl::GetExecutionState() const { | 2466 v8::Local<v8::Object> EventDetailsImpl::GetExecutionState() const { |
| 2467 return v8::Utils::ToLocal(exec_state_); | 2467 return v8::Utils::ReceiverToLocal(exec_state_); |
| 2468 } | 2468 } |
| 2469 | 2469 |
| 2470 | 2470 |
| 2471 v8::Local<v8::Object> EventDetailsImpl::GetEventData() const { | 2471 v8::Local<v8::Object> EventDetailsImpl::GetEventData() const { |
| 2472 return v8::Utils::ToLocal(event_data_); | 2472 return v8::Utils::ReceiverToLocal(event_data_); |
| 2473 } | 2473 } |
| 2474 | 2474 |
| 2475 | 2475 |
| 2476 v8::Local<v8::Context> EventDetailsImpl::GetEventContext() const { | 2476 v8::Local<v8::Context> EventDetailsImpl::GetEventContext() const { |
| 2477 return GetDebugEventContext(exec_state_->GetIsolate()); | 2477 return GetDebugEventContext(exec_state_->GetIsolate()); |
| 2478 } | 2478 } |
| 2479 | 2479 |
| 2480 | 2480 |
| 2481 v8::Local<v8::Value> EventDetailsImpl::GetCallbackData() const { | 2481 v8::Local<v8::Value> EventDetailsImpl::GetCallbackData() const { |
| 2482 return v8::Utils::ToLocal(callback_data_); | 2482 return v8::Utils::ToLocal(callback_data_); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2581 } | 2581 } |
| 2582 | 2582 |
| 2583 | 2583 |
| 2584 void LockingCommandMessageQueue::Clear() { | 2584 void LockingCommandMessageQueue::Clear() { |
| 2585 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2585 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
| 2586 queue_.Clear(); | 2586 queue_.Clear(); |
| 2587 } | 2587 } |
| 2588 | 2588 |
| 2589 } // namespace internal | 2589 } // namespace internal |
| 2590 } // namespace v8 | 2590 } // namespace v8 |
| OLD | NEW |