| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2448 } | 2448 } |
| 2449 | 2449 |
| 2450 | 2450 |
| 2451 Handle<FixedArray> Debug::GetLoadedScripts() { | 2451 Handle<FixedArray> Debug::GetLoadedScripts() { |
| 2452 // Create and fill the script cache when the loaded scripts is requested for | 2452 // Create and fill the script cache when the loaded scripts is requested for |
| 2453 // the first time. | 2453 // the first time. |
| 2454 if (script_cache_ == NULL) script_cache_ = new ScriptCache(isolate_); | 2454 if (script_cache_ == NULL) script_cache_ = new ScriptCache(isolate_); |
| 2455 | 2455 |
| 2456 // Perform GC to get unreferenced scripts evicted from the cache before | 2456 // Perform GC to get unreferenced scripts evicted from the cache before |
| 2457 // returning the content. | 2457 // returning the content. |
| 2458 isolate_->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 2458 isolate_->heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask, |
| 2459 "Debug::GetLoadedScripts"); | 2459 "Debug::GetLoadedScripts"); |
| 2460 | 2460 |
| 2461 // Get the scripts from the cache. | 2461 // Get the scripts from the cache. |
| 2462 return script_cache_->GetScripts(); | 2462 return script_cache_->GetScripts(); |
| 2463 } | 2463 } |
| 2464 | 2464 |
| 2465 | 2465 |
| 2466 void Debug::RecordEvalCaller(Handle<Script> script) { | 2466 void Debug::RecordEvalCaller(Handle<Script> script) { |
| 2467 script->set_compilation_type(Script::COMPILATION_TYPE_EVAL); | 2467 script->set_compilation_type(Script::COMPILATION_TYPE_EVAL); |
| 2468 // For eval scripts add information on the function from which eval was | 2468 // For eval scripts add information on the function from which eval was |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3474 logger_->DebugEvent("Put", message.text()); | 3474 logger_->DebugEvent("Put", message.text()); |
| 3475 } | 3475 } |
| 3476 | 3476 |
| 3477 | 3477 |
| 3478 void LockingCommandMessageQueue::Clear() { | 3478 void LockingCommandMessageQueue::Clear() { |
| 3479 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 3479 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
| 3480 queue_.Clear(); | 3480 queue_.Clear(); |
| 3481 } | 3481 } |
| 3482 | 3482 |
| 3483 } } // namespace v8::internal | 3483 } } // namespace v8::internal |
| OLD | NEW |