| Index: Source/core/inspector/InjectedScriptHost.h
|
| diff --git a/Source/core/inspector/InjectedScriptHost.h b/Source/core/inspector/InjectedScriptHost.h
|
| index 4901bb6e49a09f165eb20e8be97f2900b87a4a51..37cc69d156f1c09898bcec56352bd13f0c9f1592 100644
|
| --- a/Source/core/inspector/InjectedScriptHost.h
|
| +++ b/Source/core/inspector/InjectedScriptHost.h
|
| @@ -31,7 +31,6 @@
|
| #define InjectedScriptHost_h
|
|
|
| #include "bindings/core/v8/ScriptState.h"
|
| -#include "bindings/core/v8/ScriptWrappable.h"
|
| #include "core/InspectorTypeBuilder.h"
|
| #include "core/inspector/InjectedScriptHostClient.h"
|
| #include "wtf/Functional.h"
|
| @@ -39,6 +38,7 @@
|
| #include "wtf/RefCounted.h"
|
| #include "wtf/Vector.h"
|
| #include "wtf/text/WTFString.h"
|
| +#include <v8.h>
|
|
|
| namespace blink {
|
|
|
| @@ -58,8 +58,7 @@ struct EventListenerInfo;
|
| // InjectedScriptHost must never implemment methods that have more power over the page than the
|
| // page already has itself (e.g. origin restriction bypasses).
|
|
|
| -class InjectedScriptHost : public RefCountedWillBeGarbageCollectedFinalized<InjectedScriptHost>, public ScriptWrappable {
|
| - DEFINE_WRAPPERTYPEINFO();
|
| +class InjectedScriptHost : public RefCountedWillBeGarbageCollectedFinalized<InjectedScriptHost> {
|
| public:
|
| static PassRefPtrWillBeRawPtr<InjectedScriptHost> create();
|
| ~InjectedScriptHost();
|
| @@ -104,6 +103,10 @@ public:
|
| V8Debugger& debugger() { return *m_debugger; }
|
| InjectedScriptHostClient* client() { return m_client.get(); }
|
|
|
| + // FIXME: store this template in per isolate data
|
| + void setWrapperTemplate(v8::Local<v8::FunctionTemplate> wrapperTemplate, v8::Isolate* isolate) { m_wrapperTemplate.Reset(isolate, wrapperTemplate); }
|
| + v8::Local<v8::FunctionTemplate> wrapperTemplate(v8::Isolate* isolate) { return v8::Local<v8::FunctionTemplate>::New(isolate, m_wrapperTemplate); }
|
| +
|
| private:
|
| InjectedScriptHost();
|
|
|
| @@ -114,6 +117,7 @@ private:
|
| Vector<OwnPtr<InspectableObject> > m_inspectedObjects;
|
| OwnPtr<InspectableObject> m_defaultInspectableObject;
|
| OwnPtr<InjectedScriptHostClient> m_client;
|
| + v8::Global<v8::FunctionTemplate> m_wrapperTemplate;
|
| };
|
|
|
| } // namespace blink
|
|
|