OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/inspector/v8-console-message.h" | 5 #include "src/inspector/v8-console-message.h" |
6 | 6 |
7 #include "src/inspector/inspected-context.h" | 7 #include "src/inspector/inspected-context.h" |
8 #include "src/inspector/protocol/Protocol.h" | 8 #include "src/inspector/protocol/Protocol.h" |
9 #include "src/inspector/string-util.h" | 9 #include "src/inspector/string-util.h" |
10 #include "src/inspector/v8-console-agent-impl.h" | 10 #include "src/inspector/v8-console-agent-impl.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 if (value.IsEmpty()) return true; | 86 if (value.IsEmpty()) return true; |
87 if ((ignoreOptions & IgnoreNull) && value->IsNull()) return true; | 87 if ((ignoreOptions & IgnoreNull) && value->IsNull()) return true; |
88 if ((ignoreOptions & IgnoreUndefined) && value->IsUndefined()) return true; | 88 if ((ignoreOptions & IgnoreUndefined) && value->IsUndefined()) return true; |
89 if (value->IsString()) return append(v8::Local<v8::String>::Cast(value)); | 89 if (value->IsString()) return append(v8::Local<v8::String>::Cast(value)); |
90 if (value->IsStringObject()) | 90 if (value->IsStringObject()) |
91 return append(v8::Local<v8::StringObject>::Cast(value)->ValueOf()); | 91 return append(v8::Local<v8::StringObject>::Cast(value)->ValueOf()); |
92 if (value->IsSymbol()) return append(v8::Local<v8::Symbol>::Cast(value)); | 92 if (value->IsSymbol()) return append(v8::Local<v8::Symbol>::Cast(value)); |
93 if (value->IsSymbolObject()) | 93 if (value->IsSymbolObject()) |
94 return append(v8::Local<v8::SymbolObject>::Cast(value)->ValueOf()); | 94 return append(v8::Local<v8::SymbolObject>::Cast(value)->ValueOf()); |
95 if (value->IsNumberObject()) { | 95 if (value->IsNumberObject()) { |
96 m_builder.append(String16::fromDouble( | 96 m_builder.append(String16::fromDoublePrecision6( |
97 v8::Local<v8::NumberObject>::Cast(value)->ValueOf(), 6)); | 97 v8::Local<v8::NumberObject>::Cast(value)->ValueOf())); |
98 return true; | 98 return true; |
99 } | 99 } |
100 if (value->IsBooleanObject()) { | 100 if (value->IsBooleanObject()) { |
101 m_builder.append(v8::Local<v8::BooleanObject>::Cast(value)->ValueOf() | 101 m_builder.append(v8::Local<v8::BooleanObject>::Cast(value)->ValueOf() |
102 ? "true" | 102 ? "true" |
103 : "false"); | 103 : "false"); |
104 return true; | 104 return true; |
105 } | 105 } |
106 if (value->IsArray()) return append(v8::Local<v8::Array>::Cast(value)); | 106 if (value->IsArray()) return append(v8::Local<v8::Array>::Cast(value)); |
107 if (value->IsProxy()) { | 107 if (value->IsProxy()) { |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 m_inspector->sessionForContextGroup(m_contextGroupId)) | 464 m_inspector->sessionForContextGroup(m_contextGroupId)) |
465 session->releaseObjectGroup("console"); | 465 session->releaseObjectGroup("console"); |
466 } | 466 } |
467 | 467 |
468 void V8ConsoleMessageStorage::contextDestroyed(int contextId) { | 468 void V8ConsoleMessageStorage::contextDestroyed(int contextId) { |
469 for (size_t i = 0; i < m_messages.size(); ++i) | 469 for (size_t i = 0; i < m_messages.size(); ++i) |
470 m_messages[i]->contextDestroyed(contextId); | 470 m_messages[i]->contextDestroyed(contextId); |
471 } | 471 } |
472 | 472 |
473 } // namespace v8_inspector | 473 } // namespace v8_inspector |
OLD | NEW |