Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/debug.cc

Issue 12716010: Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed rest Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 3549 matching lines...) Expand 10 before | Expand all | Expand 10 after
3560 return v8::Utils::ToLocal(exec_state_); 3560 return v8::Utils::ToLocal(exec_state_);
3561 } 3561 }
3562 3562
3563 3563
3564 v8::Handle<v8::Object> MessageImpl::GetEventData() const { 3564 v8::Handle<v8::Object> MessageImpl::GetEventData() const {
3565 return v8::Utils::ToLocal(event_data_); 3565 return v8::Utils::ToLocal(event_data_);
3566 } 3566 }
3567 3567
3568 3568
3569 v8::Handle<v8::String> MessageImpl::GetJSON() const { 3569 v8::Handle<v8::String> MessageImpl::GetJSON() const {
3570 v8::HandleScope scope; 3570 v8::HandleScope scope(
3571 reinterpret_cast<v8::Isolate*>(event_data_->GetIsolate()));
3571 3572
3572 if (IsEvent()) { 3573 if (IsEvent()) {
3573 // Call toJSONProtocol on the debug event object. 3574 // Call toJSONProtocol on the debug event object.
3574 Handle<Object> fun = GetProperty(event_data_, "toJSONProtocol"); 3575 Handle<Object> fun = GetProperty(event_data_, "toJSONProtocol");
3575 if (!fun->IsJSFunction()) { 3576 if (!fun->IsJSFunction()) {
3576 return v8::Handle<v8::String>(); 3577 return v8::Handle<v8::String>();
3577 } 3578 }
3578 bool caught_exception; 3579 bool caught_exception;
3579 Handle<Object> json = Execution::TryCall(Handle<JSFunction>::cast(fun), 3580 Handle<Object> json = Execution::TryCall(Handle<JSFunction>::cast(fun),
3580 event_data_, 3581 event_data_,
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
3794 { 3795 {
3795 Locker locker(reinterpret_cast<v8::Isolate*>(isolate)); 3796 Locker locker(reinterpret_cast<v8::Isolate*>(isolate));
3796 isolate->debugger()->CallMessageDispatchHandler(); 3797 isolate->debugger()->CallMessageDispatchHandler();
3797 } 3798 }
3798 } 3799 }
3799 } 3800 }
3800 3801
3801 #endif // ENABLE_DEBUGGER_SUPPORT 3802 #endif // ENABLE_DEBUGGER_SUPPORT
3802 3803
3803 } } // namespace v8::internal 3804 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698