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

Side by Side Diff: src/api.cc

Issue 1136733002: Don't create debug context if debug listener is not set (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed review comment Created 5 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
« no previous file with comments | « include/v8-debug.h ('k') | src/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 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/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 7366 matching lines...) Expand 10 before | Expand all | Expand 10 after
7377 7377
7378 7378
7379 void Debug::ProcessDebugMessages() { 7379 void Debug::ProcessDebugMessages() {
7380 i::Isolate::Current()->debug()->ProcessDebugMessages(true); 7380 i::Isolate::Current()->debug()->ProcessDebugMessages(true);
7381 } 7381 }
7382 7382
7383 7383
7384 Local<Context> Debug::GetDebugContext() { 7384 Local<Context> Debug::GetDebugContext() {
7385 i::Isolate* isolate = i::Isolate::Current(); 7385 i::Isolate* isolate = i::Isolate::Current();
7386 ENTER_V8(isolate); 7386 ENTER_V8(isolate);
7387 return Utils::ToLocal(i::Isolate::Current()->debug()->GetDebugContext()); 7387 return Utils::ToLocal(isolate->debug()->GetDebugContext());
7388 } 7388 }
7389 7389
7390 7390
7391 void Debug::SetLiveEditEnabled(Isolate* isolate, bool enable) { 7391 void Debug::SetLiveEditEnabled(Isolate* isolate, bool enable) {
7392 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); 7392 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
7393 internal_isolate->debug()->set_live_edit_enabled(enable); 7393 internal_isolate->debug()->set_live_edit_enabled(enable);
7394 } 7394 }
7395 7395
7396 7396
7397 Handle<String> CpuProfileNode::GetFunctionName() const { 7397 Handle<String> CpuProfileNode::GetFunctionName() const {
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
8032 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 8032 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
8033 Address callback_address = 8033 Address callback_address =
8034 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8034 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8035 VMState<EXTERNAL> state(isolate); 8035 VMState<EXTERNAL> state(isolate);
8036 ExternalCallbackScope call_scope(isolate, callback_address); 8036 ExternalCallbackScope call_scope(isolate, callback_address);
8037 callback(info); 8037 callback(info);
8038 } 8038 }
8039 8039
8040 8040
8041 } } // namespace v8::internal 8041 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-debug.h ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698