| Index: third_party/WebKit/Source/bindings/core/v8/ScriptFunction.h
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptFunction.h b/third_party/WebKit/Source/bindings/core/v8/ScriptFunction.h
|
| index 21592756b5cc08b377a9ee70f2d71cd81ee775d5..2c306319bf78ff593ba3ba2e6b0a10b73a4576e6 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/ScriptFunction.h
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptFunction.h
|
| @@ -53,15 +53,19 @@ namespace blink {
|
| class CORE_EXPORT ScriptFunction : public GarbageCollectedFinalized<ScriptFunction> {
|
| public:
|
| virtual ~ScriptFunction() { }
|
| - ScriptState* getScriptState() const { return m_scriptState.get(); }
|
| DEFINE_INLINE_VIRTUAL_TRACE() { }
|
|
|
| protected:
|
| explicit ScriptFunction(ScriptState* scriptState)
|
| : m_scriptState(scriptState)
|
| +#if ENABLE(ASSERT)
|
| + , m_bindToV8FunctionAlreadyCalled(false)
|
| +#endif
|
| {
|
| }
|
|
|
| + ScriptState* getScriptState() const { return m_scriptState.get(); }
|
| +
|
| v8::Local<v8::Function> bindToV8Function();
|
|
|
| private:
|
| @@ -69,6 +73,10 @@ private:
|
| static void callCallback(const v8::FunctionCallbackInfo<v8::Value>&);
|
|
|
| RefPtr<ScriptState> m_scriptState;
|
| +#if ENABLE(ASSERT)
|
| + // bindToV8Function must not be called twice.
|
| + bool m_bindToV8FunctionAlreadyCalled;
|
| +#endif
|
| };
|
|
|
| } // namespace blink
|
|
|