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

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

Issue 2915793002: [api] Prototype WeakRef implementation
Patch Set: Created 3 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
« no previous file with comments | « src/inspector/js_protocol.json ('k') | src/isolate.h » ('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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 return; 192 return;
193 } 193 }
194 if (value->IsSet()) { 194 if (value->IsSet()) {
195 info.GetReturnValue().Set(toV8StringInternalized(isolate, "set")); 195 info.GetReturnValue().Set(toV8StringInternalized(isolate, "set"));
196 return; 196 return;
197 } 197 }
198 if (value->IsWeakSet()) { 198 if (value->IsWeakSet()) {
199 info.GetReturnValue().Set(toV8StringInternalized(isolate, "weakset")); 199 info.GetReturnValue().Set(toV8StringInternalized(isolate, "weakset"));
200 return; 200 return;
201 } 201 }
202 if (value->IsWeakRef()) {
203 info.GetReturnValue().Set(toV8StringInternalized(isolate, "weakref"));
204 return;
205 }
202 if (value->IsMapIterator() || value->IsSetIterator()) { 206 if (value->IsMapIterator() || value->IsSetIterator()) {
203 info.GetReturnValue().Set(toV8StringInternalized(isolate, "iterator")); 207 info.GetReturnValue().Set(toV8StringInternalized(isolate, "iterator"));
204 return; 208 return;
205 } 209 }
206 if (value->IsGeneratorObject()) { 210 if (value->IsGeneratorObject()) {
207 info.GetReturnValue().Set(toV8StringInternalized(isolate, "generator")); 211 info.GetReturnValue().Set(toV8StringInternalized(isolate, "generator"));
208 return; 212 return;
209 } 213 }
210 if (value->IsNativeError()) { 214 if (value->IsNativeError()) {
211 info.GetReturnValue().Set(toV8StringInternalized(isolate, "error")); 215 info.GetReturnValue().Set(toV8StringInternalized(isolate, "error"));
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 UNREACHABLE(); 332 UNREACHABLE();
329 return; 333 return;
330 } 334 }
331 v8::Local<v8::Object> target = info[0].As<v8::Proxy>(); 335 v8::Local<v8::Object> target = info[0].As<v8::Proxy>();
332 while (target->IsProxy()) 336 while (target->IsProxy())
333 target = v8::Local<v8::Proxy>::Cast(target)->GetTarget(); 337 target = v8::Local<v8::Proxy>::Cast(target)->GetTarget();
334 info.GetReturnValue().Set(target); 338 info.GetReturnValue().Set(target);
335 } 339 }
336 340
337 } // namespace v8_inspector 341 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/inspector/js_protocol.json ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698