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

Side by Side Diff: src/inspector/V8InternalValueType.cpp

Issue 2292053003: [inspector] Build inspector under v8_enable_inspector build flag. (Closed)
Patch Set: owners 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 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698