OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "compiler.h" | 34 #include "compiler.h" |
35 #include "debug.h" | 35 #include "debug.h" |
36 #include "execution.h" | 36 #include "execution.h" |
37 #include "global-handles.h" | 37 #include "global-handles.h" |
38 #include "natives.h" | 38 #include "natives.h" |
39 #include "stub-cache.h" | 39 #include "stub-cache.h" |
40 #include "log.h" | 40 #include "log.h" |
41 | 41 |
42 namespace v8 { namespace internal { | 42 namespace v8 { namespace internal { |
43 | 43 |
| 44 #ifdef ENABLE_DEBUGGER_SUPPORT |
44 static void PrintLn(v8::Local<v8::Value> value) { | 45 static void PrintLn(v8::Local<v8::Value> value) { |
45 v8::Local<v8::String> s = value->ToString(); | 46 v8::Local<v8::String> s = value->ToString(); |
46 char* data = NewArray<char>(s->Length() + 1); | 47 char* data = NewArray<char>(s->Length() + 1); |
47 if (data == NULL) { | 48 if (data == NULL) { |
48 V8::FatalProcessOutOfMemory("PrintLn"); | 49 V8::FatalProcessOutOfMemory("PrintLn"); |
49 return; | 50 return; |
50 } | 51 } |
51 s->WriteAscii(data); | 52 s->WriteAscii(data); |
52 PrintF("%s\n", data); | 53 PrintF("%s\n", data); |
53 DeleteArray(data); | 54 DeleteArray(data); |
(...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2216 queue_.Put(message); | 2217 queue_.Put(message); |
2217 Logger::DebugEvent("Put", message); | 2218 Logger::DebugEvent("Put", message); |
2218 } | 2219 } |
2219 | 2220 |
2220 | 2221 |
2221 void LockingMessageQueue::Clear() { | 2222 void LockingMessageQueue::Clear() { |
2222 ScopedLock sl(lock_); | 2223 ScopedLock sl(lock_); |
2223 queue_.Clear(); | 2224 queue_.Clear(); |
2224 } | 2225 } |
2225 | 2226 |
| 2227 #endif // ENABLE_DEBUGGER_SUPPORT |
2226 | 2228 |
2227 } } // namespace v8::internal | 2229 } } // namespace v8::internal |
OLD | NEW |