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

Side by Side Diff: third_party/WebKit/Source/core/inspector/ScriptArguments.cpp

Issue 2037593004: [DevTools] Remove unnecessary knowledge about console from core. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more test Created 4 years, 6 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 /* 1 /*
2 * Copyright (c) 2010 Google Inc. All rights reserved. 2 * Copyright (c) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 if (value->IsNumberObject()) { 84 if (value->IsNumberObject()) {
85 m_builder.appendNumber(v8::Local<v8::NumberObject>::Cast(value)->Val ueOf()); 85 m_builder.appendNumber(v8::Local<v8::NumberObject>::Cast(value)->Val ueOf());
86 return true; 86 return true;
87 } 87 }
88 if (value->IsBooleanObject()) { 88 if (value->IsBooleanObject()) {
89 m_builder.append(v8::Local<v8::BooleanObject>::Cast(value)->ValueOf( ) ? "true" : "false"); 89 m_builder.append(v8::Local<v8::BooleanObject>::Cast(value)->ValueOf( ) ? "true" : "false");
90 return true; 90 return true;
91 } 91 }
92 if (value->IsArray()) 92 if (value->IsArray())
93 return append(v8::Local<v8::Array>::Cast(value)); 93 return append(v8::Local<v8::Array>::Cast(value));
94 if (toDOMWindow(m_isolate, value)) {
95 m_builder.append("[object Window]");
96 return true;
97 }
98 if (value->IsProxy()) { 94 if (value->IsProxy()) {
99 m_builder.append("[object Proxy]"); 95 m_builder.append("[object Proxy]");
100 return true; 96 return true;
101 } 97 }
102 if (value->IsObject() 98 if (value->IsObject()
103 && !value->IsDate() 99 && !value->IsDate()
104 && !value->IsFunction() 100 && !value->IsFunction()
105 && !value->IsNativeError() 101 && !value->IsNativeError()
106 && !value->IsRegExp()) { 102 && !value->IsRegExp()) {
107 v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value); 103 v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 if (!argumentCount()) 203 if (!argumentCount())
208 return false; 204 return false;
209 205
210 const ScriptValue& value = argumentAt(0); 206 const ScriptValue& value = argumentAt(0);
211 ScriptState::Scope scope(m_scriptState.get()); 207 ScriptState::Scope scope(m_scriptState.get());
212 result = V8ValueStringBuilder::toString(value.v8Value(), value.isolate()); 208 result = V8ValueStringBuilder::toString(value.v8Value(), value.isolate());
213 return true; 209 return true;
214 } 210 }
215 211
216 } // namespace blink 212 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameConsole.cpp ('k') | third_party/WebKit/Source/platform/v8_inspector/V8Console.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698