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/debug.cc

Issue 2493533003: [debug] Extend a test and fix some typos. (Closed)
Patch Set: Address feedback and reset listener at the end. Created 4 years, 1 month 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 | test/mjsunit/debug-set-variable-value.js » ('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/debug/debug.h" 5 #include "src/debug/debug.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after
1938 // Invoke the JavaScript debug event listener. 1938 // Invoke the JavaScript debug event listener.
1939 DCHECK(event_listener_->IsJSFunction()); 1939 DCHECK(event_listener_->IsJSFunction());
1940 Handle<Object> argv[] = { Handle<Object>(Smi::FromInt(event), isolate_), 1940 Handle<Object> argv[] = { Handle<Object>(Smi::FromInt(event), isolate_),
1941 exec_state, 1941 exec_state,
1942 event_data, 1942 event_data,
1943 event_listener_data_ }; 1943 event_listener_data_ };
1944 Handle<JSReceiver> global = isolate_->global_proxy(); 1944 Handle<JSReceiver> global = isolate_->global_proxy();
1945 MaybeHandle<Object> result = 1945 MaybeHandle<Object> result =
1946 Execution::Call(isolate_, Handle<JSFunction>::cast(event_listener_), 1946 Execution::Call(isolate_, Handle<JSFunction>::cast(event_listener_),
1947 global, arraysize(argv), argv); 1947 global, arraysize(argv), argv);
1948 CHECK(!result.is_null()); // Listeners may not throw. 1948 CHECK(!result.is_null()); // Listeners must not throw.
1949 } 1949 }
1950 in_debug_event_listener_ = previous; 1950 in_debug_event_listener_ = previous;
1951 } 1951 }
1952 1952
1953 1953
1954 void Debug::ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script) { 1954 void Debug::ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script) {
1955 if (ignore_events()) return; 1955 if (ignore_events()) return;
1956 SuppressDebug while_processing(this); 1956 SuppressDebug while_processing(this);
1957 1957
1958 bool in_nested_debug_scope = in_debug_scope(); 1958 bool in_nested_debug_scope = in_debug_scope();
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
2646 } 2646 }
2647 2647
2648 2648
2649 void LockingCommandMessageQueue::Clear() { 2649 void LockingCommandMessageQueue::Clear() {
2650 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2650 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2651 queue_.Clear(); 2651 queue_.Clear();
2652 } 2652 }
2653 2653
2654 } // namespace internal 2654 } // namespace internal
2655 } // namespace v8 2655 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/debug-set-variable-value.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698