OLD | NEW |
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 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1913 Execution::Call(isolate_, Handle<JSFunction>::cast(event_listener_), | 1913 Execution::Call(isolate_, Handle<JSFunction>::cast(event_listener_), |
1914 global, arraysize(argv), argv); | 1914 global, arraysize(argv), argv); |
1915 CHECK(!result.is_null()); // Listeners must not throw. | 1915 CHECK(!result.is_null()); // Listeners must not throw. |
1916 } | 1916 } |
1917 in_debug_event_listener_ = previous; | 1917 in_debug_event_listener_ = previous; |
1918 } | 1918 } |
1919 | 1919 |
1920 | 1920 |
1921 void Debug::ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script) { | 1921 void Debug::ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script) { |
1922 if (ignore_events()) return; | 1922 if (ignore_events()) return; |
| 1923 if (script->type() != i::Script::TYPE_NORMAL && |
| 1924 script->type() != i::Script::TYPE_WASM) { |
| 1925 return; |
| 1926 } |
1923 SuppressDebug while_processing(this); | 1927 SuppressDebug while_processing(this); |
1924 | 1928 |
1925 bool in_nested_debug_scope = in_debug_scope(); | 1929 bool in_nested_debug_scope = in_debug_scope(); |
1926 HandleScope scope(isolate_); | 1930 HandleScope scope(isolate_); |
1927 DebugScope debug_scope(this); | 1931 DebugScope debug_scope(this); |
1928 if (debug_scope.failed()) return; | 1932 if (debug_scope.failed()) return; |
1929 | 1933 |
1930 if (event == v8::AfterCompile) { | 1934 if (event == v8::AfterCompile) { |
1931 // If debugging there might be script break points registered for this | 1935 // If debugging there might be script break points registered for this |
1932 // script. Make sure that these break points are set. | 1936 // script. Make sure that these break points are set. |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2613 } | 2617 } |
2614 | 2618 |
2615 | 2619 |
2616 void LockingCommandMessageQueue::Clear() { | 2620 void LockingCommandMessageQueue::Clear() { |
2617 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2621 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2618 queue_.Clear(); | 2622 queue_.Clear(); |
2619 } | 2623 } |
2620 | 2624 |
2621 } // namespace internal | 2625 } // namespace internal |
2622 } // namespace v8 | 2626 } // namespace v8 |
OLD | NEW |