OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/V8InternalValueType.h" | 5 #include "platform/v8_inspector/V8InternalValueType.h" |
6 | 6 |
7 #include "platform/inspector_protocol/Platform.h" | |
8 #include "platform/v8_inspector/V8StringUtil.h" | 7 #include "platform/v8_inspector/V8StringUtil.h" |
9 | 8 |
10 namespace blink { | 9 namespace blink { |
11 | 10 |
12 namespace { | 11 namespace { |
13 | 12 |
14 v8::Local<v8::Private> internalSubtypePrivate(v8::Isolate* isolate) | 13 v8::Local<v8::Private> internalSubtypePrivate(v8::Isolate* isolate) |
15 { | 14 { |
16 return v8::Private::ForApi(isolate, toV8StringInternalized(isolate, "V8Inter
nalType#internalSubtype")); | 15 return v8::Private::ForApi(isolate, toV8StringInternalized(isolate, "V8Inter
nalType#internalSubtype")); |
17 } | 16 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 v8::Local<v8::Private> privateValue = internalSubtypePrivate(isolate); | 62 v8::Local<v8::Private> privateValue = internalSubtypePrivate(isolate); |
64 if (!object->HasPrivate(context, privateValue).FromMaybe(false)) | 63 if (!object->HasPrivate(context, privateValue).FromMaybe(false)) |
65 return v8::Null(isolate); | 64 return v8::Null(isolate); |
66 v8::Local<v8::Value> subtypeValue; | 65 v8::Local<v8::Value> subtypeValue; |
67 if (!object->GetPrivate(context, privateValue).ToLocal(&subtypeValue) || !su
btypeValue->IsString()) | 66 if (!object->GetPrivate(context, privateValue).ToLocal(&subtypeValue) || !su
btypeValue->IsString()) |
68 return v8::Null(isolate); | 67 return v8::Null(isolate); |
69 return subtypeValue; | 68 return subtypeValue; |
70 } | 69 } |
71 | 70 |
72 } // namespace blink | 71 } // namespace blink |
OLD | NEW |