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

Side by Side Diff: src/debug.cc

Issue 112035: Add method for getting global v8::Context (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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
« no previous file with comments | « no previous file | test/cctest/test-debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 2366 matching lines...) Expand 10 before | Expand all | Expand 10 after
2377 return v8::Handle<v8::String>(); 2377 return v8::Handle<v8::String>();
2378 } 2378 }
2379 return scope.Close(v8::Utils::ToLocal(Handle<String>::cast(json))); 2379 return scope.Close(v8::Utils::ToLocal(Handle<String>::cast(json)));
2380 } else { 2380 } else {
2381 return v8::Utils::ToLocal(response_json_); 2381 return v8::Utils::ToLocal(response_json_);
2382 } 2382 }
2383 } 2383 }
2384 2384
2385 2385
2386 v8::Handle<v8::Context> MessageImpl::GetEventContext() const { 2386 v8::Handle<v8::Context> MessageImpl::GetEventContext() const {
2387 return v8::Utils::ToLocal(Debug::debugger_entry()->GetContext()); 2387 Handle<Context> context = Debug::debugger_entry()->GetContext();
2388 Handle<Context> global_context(context->global_context());
2389 return v8::Utils::ToLocal(global_context);
2388 } 2390 }
2389 2391
2390 2392
2391 v8::Debug::ClientData* MessageImpl::GetClientData() const { 2393 v8::Debug::ClientData* MessageImpl::GetClientData() const {
2392 return client_data_; 2394 return client_data_;
2393 } 2395 }
2394 2396
2395 2397
2396 CommandMessage::CommandMessage() : text_(Vector<uint16_t>::empty()), 2398 CommandMessage::CommandMessage() : text_(Vector<uint16_t>::empty()),
2397 client_data_(NULL) { 2399 client_data_(NULL) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2501 2503
2502 2504
2503 void LockingCommandMessageQueue::Clear() { 2505 void LockingCommandMessageQueue::Clear() {
2504 ScopedLock sl(lock_); 2506 ScopedLock sl(lock_);
2505 queue_.Clear(); 2507 queue_.Clear();
2506 } 2508 }
2507 2509
2508 #endif // ENABLE_DEBUGGER_SUPPORT 2510 #endif // ENABLE_DEBUGGER_SUPPORT
2509 2511
2510 } } // namespace v8::internal 2512 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698