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

Side by Side Diff: src/inspector/v8-injected-script-host.cc

Issue 2770583002: [inspector] description for weak collections should not contain size (Closed)
Patch Set: added to protocol Created 3 years, 9 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
« no previous file with comments | « src/inspector/js_protocol.json ('k') | test/inspector/runtime/length-or-size-description.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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-injected-script-host.h" 5 #include "src/inspector/v8-injected-script-host.h"
6 6
7 #include "src/base/macros.h" 7 #include "src/base/macros.h"
8 #include "src/inspector/injected-script-native.h" 8 #include "src/inspector/injected-script-native.h"
9 #include "src/inspector/string-util.h" 9 #include "src/inspector/string-util.h"
10 #include "src/inspector/v8-debugger.h" 10 #include "src/inspector/v8-debugger.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 return; 120 return;
121 } 121 }
122 if (value->IsDate()) { 122 if (value->IsDate()) {
123 info.GetReturnValue().Set(toV8StringInternalized(isolate, "date")); 123 info.GetReturnValue().Set(toV8StringInternalized(isolate, "date"));
124 return; 124 return;
125 } 125 }
126 if (value->IsRegExp()) { 126 if (value->IsRegExp()) {
127 info.GetReturnValue().Set(toV8StringInternalized(isolate, "regexp")); 127 info.GetReturnValue().Set(toV8StringInternalized(isolate, "regexp"));
128 return; 128 return;
129 } 129 }
130 if (value->IsMap() || value->IsWeakMap()) { 130 if (value->IsMap()) {
131 info.GetReturnValue().Set(toV8StringInternalized(isolate, "map")); 131 info.GetReturnValue().Set(toV8StringInternalized(isolate, "map"));
132 return; 132 return;
133 } 133 }
134 if (value->IsSet() || value->IsWeakSet()) { 134 if (value->IsWeakMap()) {
135 info.GetReturnValue().Set(toV8StringInternalized(isolate, "weakmap"));
136 return;
137 }
138 if (value->IsSet()) {
135 info.GetReturnValue().Set(toV8StringInternalized(isolate, "set")); 139 info.GetReturnValue().Set(toV8StringInternalized(isolate, "set"));
136 return; 140 return;
137 } 141 }
142 if (value->IsWeakSet()) {
143 info.GetReturnValue().Set(toV8StringInternalized(isolate, "weakset"));
144 return;
145 }
138 if (value->IsMapIterator() || value->IsSetIterator()) { 146 if (value->IsMapIterator() || value->IsSetIterator()) {
139 info.GetReturnValue().Set(toV8StringInternalized(isolate, "iterator")); 147 info.GetReturnValue().Set(toV8StringInternalized(isolate, "iterator"));
140 return; 148 return;
141 } 149 }
142 if (value->IsGeneratorObject()) { 150 if (value->IsGeneratorObject()) {
143 info.GetReturnValue().Set(toV8StringInternalized(isolate, "generator")); 151 info.GetReturnValue().Set(toV8StringInternalized(isolate, "generator"));
144 return; 152 return;
145 } 153 }
146 if (value->IsNativeError()) { 154 if (value->IsNativeError()) {
147 info.GetReturnValue().Set(toV8StringInternalized(isolate, "error")); 155 info.GetReturnValue().Set(toV8StringInternalized(isolate, "error"));
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 UNREACHABLE(); 272 UNREACHABLE();
265 return; 273 return;
266 } 274 }
267 v8::Local<v8::Object> target = info[0].As<v8::Proxy>(); 275 v8::Local<v8::Object> target = info[0].As<v8::Proxy>();
268 while (target->IsProxy()) 276 while (target->IsProxy())
269 target = v8::Local<v8::Proxy>::Cast(target)->GetTarget(); 277 target = v8::Local<v8::Proxy>::Cast(target)->GetTarget();
270 info.GetReturnValue().Set(target); 278 info.GetReturnValue().Set(target);
271 } 279 }
272 280
273 } // namespace v8_inspector 281 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/inspector/js_protocol.json ('k') | test/inspector/runtime/length-or-size-description.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698