Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8ConsoleMessage.cpp

Issue 2226863003: [DevTools] Reduce API surface of String16. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium 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 "platform/v8_inspector/V8ConsoleMessage.h" 5 #include "platform/v8_inspector/V8ConsoleMessage.h"
6 6
7 #include "platform/v8_inspector/InspectedContext.h" 7 #include "platform/v8_inspector/InspectedContext.h"
8 #include "platform/v8_inspector/V8ConsoleAgentImpl.h" 8 #include "platform/v8_inspector/V8ConsoleAgentImpl.h"
9 #include "platform/v8_inspector/V8InspectorImpl.h" 9 #include "platform/v8_inspector/V8InspectorImpl.h"
10 #include "platform/v8_inspector/V8InspectorSessionImpl.h" 10 #include "platform/v8_inspector/V8InspectorSessionImpl.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 return true; 77 return true;
78 if (value->IsString()) 78 if (value->IsString())
79 return append(v8::Local<v8::String>::Cast(value)); 79 return append(v8::Local<v8::String>::Cast(value));
80 if (value->IsStringObject()) 80 if (value->IsStringObject())
81 return append(v8::Local<v8::StringObject>::Cast(value)->ValueOf()); 81 return append(v8::Local<v8::StringObject>::Cast(value)->ValueOf());
82 if (value->IsSymbol()) 82 if (value->IsSymbol())
83 return append(v8::Local<v8::Symbol>::Cast(value)); 83 return append(v8::Local<v8::Symbol>::Cast(value));
84 if (value->IsSymbolObject()) 84 if (value->IsSymbolObject())
85 return append(v8::Local<v8::SymbolObject>::Cast(value)->ValueOf()); 85 return append(v8::Local<v8::SymbolObject>::Cast(value)->ValueOf());
86 if (value->IsNumberObject()) { 86 if (value->IsNumberObject()) {
87 m_builder.appendNumber(v8::Local<v8::NumberObject>::Cast(value)->Val ueOf()); 87 m_builder.append(String16::fromDoublePrecision6(v8::Local<v8::Number Object>::Cast(value)->ValueOf()));
88 return true; 88 return true;
89 } 89 }
90 if (value->IsBooleanObject()) { 90 if (value->IsBooleanObject()) {
91 m_builder.append(v8::Local<v8::BooleanObject>::Cast(value)->ValueOf( ) ? "true" : "false"); 91 m_builder.append(v8::Local<v8::BooleanObject>::Cast(value)->ValueOf( ) ? "true" : "false");
92 return true; 92 return true;
93 } 93 }
94 if (value->IsArray()) 94 if (value->IsArray())
95 return append(v8::Local<v8::Array>::Cast(value)); 95 return append(v8::Local<v8::Array>::Cast(value));
96 if (value->IsProxy()) { 96 if (value->IsProxy()) {
97 m_builder.append("[object Proxy]"); 97 m_builder.append("[object Proxy]");
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 session->releaseObjectGroup("console"); 424 session->releaseObjectGroup("console");
425 } 425 }
426 426
427 void V8ConsoleMessageStorage::contextDestroyed(int contextId) 427 void V8ConsoleMessageStorage::contextDestroyed(int contextId)
428 { 428 {
429 for (size_t i = 0; i < m_messages.size(); ++i) 429 for (size_t i = 0; i < m_messages.size(); ++i)
430 m_messages[i]->contextDestroyed(contextId); 430 m_messages[i]->contextDestroyed(contextId);
431 } 431 }
432 432
433 } // namespace blink 433 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698