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

Side by Side Diff: src/api.cc

Issue 2423153002: [inspector] migrate stepping related methods to debug-interface (Closed)
Patch Set: rebased Created 4 years, 2 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 | « no previous file | src/debug/debug-interface.h » ('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 8796 matching lines...) Expand 10 before | Expand all | Expand 10 after
8807 8807
8808 void DebugInterface::ChangeBreakOnException(Isolate* isolate, 8808 void DebugInterface::ChangeBreakOnException(Isolate* isolate,
8809 ExceptionBreakState type) { 8809 ExceptionBreakState type) {
8810 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); 8810 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
8811 internal_isolate->debug()->ChangeBreakOnException( 8811 internal_isolate->debug()->ChangeBreakOnException(
8812 i::BreakException, type == BreakOnAnyException); 8812 i::BreakException, type == BreakOnAnyException);
8813 internal_isolate->debug()->ChangeBreakOnException(i::BreakUncaughtException, 8813 internal_isolate->debug()->ChangeBreakOnException(i::BreakUncaughtException,
8814 type != NoBreakOnException); 8814 type != NoBreakOnException);
8815 } 8815 }
8816 8816
8817 void DebugInterface::PrepareStep(Isolate* v8_isolate, StepAction action) {
8818 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
8819 ENTER_V8(isolate);
8820 CHECK(isolate->debug()->CheckExecutionState(isolate->debug()->break_id()));
Yang 2016/10/19 04:38:56 Can we introduce a new version of CheckExecutionSt
kozy 2016/10/20 04:58:28 Done.
8821 // Clear all current stepping setup.
8822 isolate->debug()->ClearStepping();
8823 // Prepare step.
8824 isolate->debug()->PrepareStep(static_cast<i::StepAction>(action));
8825 }
8826
8827 void DebugInterface::ClearStepping(Isolate* v8_isolate) {
8828 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
8829 ENTER_V8(isolate);
8830 CHECK(isolate->debug()->CheckExecutionState(isolate->debug()->break_id()));
8831 // Clear all current stepping setup.
8832 isolate->debug()->ClearStepping();
8833 }
8834
8817 Local<String> CpuProfileNode::GetFunctionName() const { 8835 Local<String> CpuProfileNode::GetFunctionName() const {
8818 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); 8836 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
8819 i::Isolate* isolate = node->isolate(); 8837 i::Isolate* isolate = node->isolate();
8820 const i::CodeEntry* entry = node->entry(); 8838 const i::CodeEntry* entry = node->entry();
8821 i::Handle<i::String> name = 8839 i::Handle<i::String> name =
8822 isolate->factory()->InternalizeUtf8String(entry->name()); 8840 isolate->factory()->InternalizeUtf8String(entry->name());
8823 if (!entry->has_name_prefix()) { 8841 if (!entry->has_name_prefix()) {
8824 return ToApiHandle<String>(name); 8842 return ToApiHandle<String>(name);
8825 } else { 8843 } else {
8826 // We do not expect this to fail. Change this if it does. 8844 // We do not expect this to fail. Change this if it does.
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
9495 Address callback_address = 9513 Address callback_address =
9496 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9514 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9497 VMState<EXTERNAL> state(isolate); 9515 VMState<EXTERNAL> state(isolate);
9498 ExternalCallbackScope call_scope(isolate, callback_address); 9516 ExternalCallbackScope call_scope(isolate, callback_address);
9499 callback(info); 9517 callback(info);
9500 } 9518 }
9501 9519
9502 9520
9503 } // namespace internal 9521 } // namespace internal
9504 } // namespace v8 9522 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/debug/debug-interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698