| OLD | NEW | 
|---|
|  | (Empty) | 
| 1 // Copyright 2015 the V8 project authors. All rights reserved. |  | 
| 2 // Use of this source code is governed by a BSD-style license that can be |  | 
| 3 // found in the LICENSE file. |  | 
| 4 |  | 
| 5 #ifndef V8_INSPECTOR_V8INJECTEDSCRIPTHOST_H_ |  | 
| 6 #define V8_INSPECTOR_V8INJECTEDSCRIPTHOST_H_ |  | 
| 7 |  | 
| 8 #include <v8.h> |  | 
| 9 |  | 
| 10 namespace v8_inspector { |  | 
| 11 |  | 
| 12 class V8InspectorImpl; |  | 
| 13 |  | 
| 14 // SECURITY NOTE: Although the InjectedScriptHost is intended for use solely by 
    the inspector, |  | 
| 15 // a reference to the InjectedScriptHost may be leaked to the page being inspect
    ed. Thus, the |  | 
| 16 // InjectedScriptHost must never implemment methods that have more power over th
    e page than the |  | 
| 17 // page already has itself (e.g. origin restriction bypasses). |  | 
| 18 |  | 
| 19 class V8InjectedScriptHost { |  | 
| 20 public: |  | 
| 21     // We expect that debugger outlives any JS context and thus V8InjectedScript
    Host (owned by JS) |  | 
| 22     // is destroyed before inspector. |  | 
| 23     static v8::Local<v8::Object> create(v8::Local<v8::Context>, V8InspectorImpl*
    ); |  | 
| 24 private: |  | 
| 25     static void internalConstructorNameCallback(const v8::FunctionCallbackInfo<v
    8::Value>&); |  | 
| 26     static void formatAccessorsAsProperties(const v8::FunctionCallbackInfo<v8::V
    alue>&); |  | 
| 27     static void subtypeCallback(const v8::FunctionCallbackInfo<v8::Value>&); |  | 
| 28     static void getInternalPropertiesCallback(const v8::FunctionCallbackInfo<v8:
    :Value>&); |  | 
| 29     static void objectHasOwnPropertyCallback(const v8::FunctionCallbackInfo<v8::
    Value>&); |  | 
| 30     static void bindCallback(const v8::FunctionCallbackInfo<v8::Value>&); |  | 
| 31     static void proxyTargetValueCallback(const v8::FunctionCallbackInfo<v8::Valu
    e>&); |  | 
| 32 }; |  | 
| 33 |  | 
| 34 } // namespace v8_inspector |  | 
| 35 |  | 
| 36 #endif // V8_INSPECTOR_V8INJECTEDSCRIPTHOST_H_ |  | 
| OLD | NEW | 
|---|