| 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" |
| 11 #include "platform/v8_inspector/V8InternalValueType.h" | 11 #include "platform/v8_inspector/V8InternalValueType.h" |
| 12 #include "platform/v8_inspector/V8StringUtil.h" | 12 #include "platform/v8_inspector/V8StringUtil.h" |
| 13 #include "platform/v8_inspector/public/V8InspectorClient.h" | 13 #include "platform/v8_inspector/public/V8InspectorClient.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace v8_inspector { |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 void setFunctionProperty(v8::Local<v8::Context> context, v8::Local<v8::Object> o
bj, const char* name, v8::FunctionCallback callback, v8::Local<v8::External> ext
ernal) | 19 void setFunctionProperty(v8::Local<v8::Context> context, v8::Local<v8::Object> o
bj, const char* name, v8::FunctionCallback callback, v8::Local<v8::External> ext
ernal) |
| 20 { | 20 { |
| 21 v8::Local<v8::String> funcName = toV8StringInternalized(context->GetIsolate(
), name); | 21 v8::Local<v8::String> funcName = toV8StringInternalized(context->GetIsolate(
), name); |
| 22 v8::Local<v8::Function> func; | 22 v8::Local<v8::Function> func; |
| 23 if (!V8_FUNCTION_NEW_REMOVE_PROTOTYPE(context, callback, external, 0).ToLoca
l(&func)) | 23 if (!V8_FUNCTION_NEW_REMOVE_PROTOTYPE(context, callback, external, 0).ToLoca
l(&func)) |
| 24 return; | 24 return; |
| 25 func->SetName(funcName); | 25 func->SetName(funcName); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 if (info.Length() != 1 || !info[0]->IsProxy()) { | 175 if (info.Length() != 1 || !info[0]->IsProxy()) { |
| 176 NOTREACHED(); | 176 NOTREACHED(); |
| 177 return; | 177 return; |
| 178 } | 178 } |
| 179 v8::Local<v8::Object> target = info[0].As<v8::Proxy>(); | 179 v8::Local<v8::Object> target = info[0].As<v8::Proxy>(); |
| 180 while (target->IsProxy()) | 180 while (target->IsProxy()) |
| 181 target = v8::Local<v8::Proxy>::Cast(target)->GetTarget(); | 181 target = v8::Local<v8::Proxy>::Cast(target)->GetTarget(); |
| 182 info.GetReturnValue().Set(target); | 182 info.GetReturnValue().Set(target); |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace blink | 185 } // namespace v8_inspector |
| OLD | NEW |