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/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 9388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9399 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); | 9399 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
9400 ENTER_V8(isolate); | 9400 ENTER_V8(isolate); |
9401 // TODO(kozyatinskiy): remove this GC once tests are dealt with. | 9401 // TODO(kozyatinskiy): remove this GC once tests are dealt with. |
9402 isolate->heap()->CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask, | 9402 isolate->heap()->CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask, |
9403 i::GarbageCollectionReason::kDebugger); | 9403 i::GarbageCollectionReason::kDebugger); |
9404 { | 9404 { |
9405 i::DisallowHeapAllocation no_gc; | 9405 i::DisallowHeapAllocation no_gc; |
9406 i::Script::Iterator iterator(isolate); | 9406 i::Script::Iterator iterator(isolate); |
9407 i::Script* script; | 9407 i::Script* script; |
9408 while ((script = iterator.Next())) { | 9408 while ((script = iterator.Next())) { |
9409 if (script->type() != i::Script::TYPE_NORMAL) continue; | 9409 if (!script->IsUserJavaScript()) continue; |
9410 if (script->HasValidSource()) { | 9410 if (script->HasValidSource()) { |
9411 i::HandleScope handle_scope(isolate); | 9411 i::HandleScope handle_scope(isolate); |
9412 i::Handle<i::Script> script_handle(script, isolate); | 9412 i::Handle<i::Script> script_handle(script, isolate); |
9413 scripts.Append(ToApiHandle<Script>(script_handle)); | 9413 scripts.Append(ToApiHandle<Script>(script_handle)); |
9414 } | 9414 } |
9415 } | 9415 } |
9416 } | 9416 } |
9417 } | 9417 } |
9418 | 9418 |
9419 MaybeLocal<UnboundScript> debug::CompileInspectorScript(Isolate* v8_isolate, | 9419 MaybeLocal<UnboundScript> debug::CompileInspectorScript(Isolate* v8_isolate, |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10253 Address callback_address = | 10253 Address callback_address = |
10254 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10254 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
10255 VMState<EXTERNAL> state(isolate); | 10255 VMState<EXTERNAL> state(isolate); |
10256 ExternalCallbackScope call_scope(isolate, callback_address); | 10256 ExternalCallbackScope call_scope(isolate, callback_address); |
10257 callback(info); | 10257 callback(info); |
10258 } | 10258 } |
10259 | 10259 |
10260 | 10260 |
10261 } // namespace internal | 10261 } // namespace internal |
10262 } // namespace v8 | 10262 } // namespace v8 |
OLD | NEW |