| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/V8InternalValueType.h" | 5 #include "src/inspector/V8InternalValueType.h" |
| 6 | 6 |
| 7 #include "src/inspector/ProtocolPlatform.h" | 7 #include "src/inspector/ProtocolPlatform.h" |
| 8 #include "src/inspector/StringUtil.h" | 8 #include "src/inspector/StringUtil.h" |
| 9 | 9 |
| 10 namespace v8_inspector { | 10 namespace v8_inspector { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 switch (type) { | 22 switch (type) { |
| 23 case V8InternalValueType::kEntry: | 23 case V8InternalValueType::kEntry: |
| 24 return toV8StringInternalized(isolate, "internal#entry"); | 24 return toV8StringInternalized(isolate, "internal#entry"); |
| 25 case V8InternalValueType::kLocation: | 25 case V8InternalValueType::kLocation: |
| 26 return toV8StringInternalized(isolate, "internal#location"); | 26 return toV8StringInternalized(isolate, "internal#location"); |
| 27 case V8InternalValueType::kScope: | 27 case V8InternalValueType::kScope: |
| 28 return toV8StringInternalized(isolate, "internal#scope"); | 28 return toV8StringInternalized(isolate, "internal#scope"); |
| 29 case V8InternalValueType::kScopeList: | 29 case V8InternalValueType::kScopeList: |
| 30 return toV8StringInternalized(isolate, "internal#scopeList"); | 30 return toV8StringInternalized(isolate, "internal#scopeList"); |
| 31 } | 31 } |
| 32 NOTREACHED(); | 32 UNREACHABLE(); |
| 33 return v8::Local<v8::String>(); | 33 return v8::Local<v8::String>(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 } // namespace | 36 } // namespace |
| 37 | 37 |
| 38 bool markAsInternal(v8::Local<v8::Context> context, | 38 bool markAsInternal(v8::Local<v8::Context> context, |
| 39 v8::Local<v8::Object> object, V8InternalValueType type) { | 39 v8::Local<v8::Object> object, V8InternalValueType type) { |
| 40 v8::Isolate* isolate = context->GetIsolate(); | 40 v8::Isolate* isolate = context->GetIsolate(); |
| 41 v8::Local<v8::Private> privateValue = internalSubtypePrivate(isolate); | 41 v8::Local<v8::Private> privateValue = internalSubtypePrivate(isolate); |
| 42 v8::Local<v8::String> subtype = subtypeForInternalType(isolate, type); | 42 v8::Local<v8::String> subtype = subtypeForInternalType(isolate, type); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 68 if (!object->HasPrivate(context, privateValue).FromMaybe(false)) | 68 if (!object->HasPrivate(context, privateValue).FromMaybe(false)) |
| 69 return v8::Null(isolate); | 69 return v8::Null(isolate); |
| 70 v8::Local<v8::Value> subtypeValue; | 70 v8::Local<v8::Value> subtypeValue; |
| 71 if (!object->GetPrivate(context, privateValue).ToLocal(&subtypeValue) || | 71 if (!object->GetPrivate(context, privateValue).ToLocal(&subtypeValue) || |
| 72 !subtypeValue->IsString()) | 72 !subtypeValue->IsString()) |
| 73 return v8::Null(isolate); | 73 return v8::Null(isolate); |
| 74 return subtypeValue; | 74 return subtypeValue; |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace v8_inspector | 77 } // namespace v8_inspector |
| OLD | NEW |