Chromium Code Reviews| Index: third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.h |
| diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.h b/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.h |
| index 043c81220216341cc17f677c869a0af3a5ff3340..58423a0c4112fbf098364c1b74ca32b8294a25af 100644 |
| --- a/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.h |
| +++ b/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.h |
| @@ -9,15 +9,18 @@ |
| namespace blink { |
| -class InjectedScriptHost; |
| -class V8DebuggerClient; |
| +class V8DebuggerImpl; |
| + |
| +// SECURITY NOTE: Although the InjectedScriptHost is intended for use solely by the inspector, |
| +// a reference to the InjectedScriptHost may be leaked to the page being inspected. Thus, the |
| +// InjectedScriptHost must never implemment methods that have more power over the page than the |
| +// page already has itself (e.g. origin restriction bypasses). |
| class V8InjectedScriptHost { |
| public: |
| - static v8::Local<v8::Object> wrap(v8::Local<v8::FunctionTemplate> constructorTemplate, v8::Local<v8::Context>, InjectedScriptHost*); |
| - static InjectedScriptHost* unwrap(v8::Local<v8::Context>, v8::Local<v8::Object>); |
| - static v8::Local<v8::FunctionTemplate> createWrapperTemplate(v8::Isolate*); |
| + static v8::Local<v8::Object> create(V8DebuggerImpl*); |
|
dgozman
2016/04/27 18:28:54
Note that we expect that debugger outlives any JS
kozy
2016/04/27 18:41:51
Done.
|
| +private: |
| static void internalConstructorNameCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| static void formatAccessorsAsProperties(const v8::FunctionCallbackInfo<v8::Value>&); |
| static void isTypedArrayCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| @@ -26,7 +29,6 @@ public: |
| static void collectionEntriesCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| static void getInternalPropertiesCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| static void getEventListenersCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| - static void callFunctionCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| static void suppressWarningsAndCallFunctionCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| static void setNonEnumPropertyCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| static void setFunctionVariableValueCallback(const v8::FunctionCallbackInfo<v8::Value>&); |