| 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..7f3669f4da3186a7e7d09b5c257f5e3b1ce00ef1 100644
|
| --- a/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.h
|
| +++ b/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.h
|
| @@ -9,15 +9,20 @@
|
|
|
| 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*);
|
| + // We expect that debugger outlives any JS context and thus V8InjectedScriptHost (owned by JS)
|
| + // is destroyed before debugger.
|
| + static v8::Local<v8::Object> create(v8::Local<v8::Context>, V8DebuggerImpl*);
|
|
|
| +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 +31,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>&);
|
|
|