| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |