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

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

Issue 2260233002: [DevTools] Migrate v8_inspector/public from String16 to String{View,Buffer}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile on win Created 4 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/V8InjectedScriptHost.h" 5 #include "platform/v8_inspector/V8InjectedScriptHost.h"
6 6
7 #include "platform/v8_inspector/InjectedScriptNative.h" 7 #include "platform/v8_inspector/InjectedScriptNative.h"
8 #include "platform/v8_inspector/V8Compat.h" 8 #include "platform/v8_inspector/V8Compat.h"
9 #include "platform/v8_inspector/V8Debugger.h" 9 #include "platform/v8_inspector/V8Debugger.h"
10 #include "platform/v8_inspector/V8InspectorImpl.h" 10 #include "platform/v8_inspector/V8InspectorImpl.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 return; 127 return;
128 } 128 }
129 if (value->IsProxy()) { 129 if (value->IsProxy()) {
130 info.GetReturnValue().Set(toV8StringInternalized(isolate, "proxy")); 130 info.GetReturnValue().Set(toV8StringInternalized(isolate, "proxy"));
131 return; 131 return;
132 } 132 }
133 if (value->IsPromise()) { 133 if (value->IsPromise()) {
134 info.GetReturnValue().Set(toV8StringInternalized(isolate, "promise")); 134 info.GetReturnValue().Set(toV8StringInternalized(isolate, "promise"));
135 return; 135 return;
136 } 136 }
137 String16 subtype = unwrapInspector(info)->client()->valueSubtype(value); 137 std::unique_ptr<StringBuffer> subtype = unwrapInspector(info)->client()->val ueSubtype(value);
138 if (!subtype.isEmpty()) { 138 if (subtype) {
139 info.GetReturnValue().Set(toV8String(isolate, subtype)); 139 info.GetReturnValue().Set(toV8String(isolate, subtype->string()));
140 return; 140 return;
141 } 141 }
142 } 142 }
143 143
144 void V8InjectedScriptHost::getInternalPropertiesCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 144 void V8InjectedScriptHost::getInternalPropertiesCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
145 { 145 {
146 if (info.Length() < 1) 146 if (info.Length() < 1)
147 return; 147 return;
148 v8::Local<v8::Array> properties; 148 v8::Local<v8::Array> properties;
149 if (unwrapInspector(info)->debugger()->internalProperties(info.GetIsolate()- >GetCurrentContext(), info[0]).ToLocal(&properties)) 149 if (unwrapInspector(info)->debugger()->internalProperties(info.GetIsolate()- >GetCurrentContext(), info[0]).ToLocal(&properties))
(...skipping 28 matching lines...) Expand all
178 NOTREACHED(); 178 NOTREACHED();
179 return; 179 return;
180 } 180 }
181 v8::Local<v8::Object> target = info[0].As<v8::Proxy>(); 181 v8::Local<v8::Object> target = info[0].As<v8::Proxy>();
182 while (target->IsProxy()) 182 while (target->IsProxy())
183 target = v8::Local<v8::Proxy>::Cast(target)->GetTarget(); 183 target = v8::Local<v8::Proxy>::Cast(target)->GetTarget();
184 info.GetReturnValue().Set(target); 184 info.GetReturnValue().Set(target);
185 } 185 }
186 186
187 } // namespace v8_inspector 187 } // namespace v8_inspector
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698