Prevent copying of ScriptInterface objects.
Copying a ScriptInterface is not allowed. The destructor destroys the JSContext and if there's a copy around that still uses it, that causes crashes which can be quite hard to debug. This change prevents copying by of ScriptInterface objects by making the copy constructor private, which will reveal such errors at compile time. This was SVN commit r15625.
This commit is contained in:
parent
83aa817f71
commit
23c708f72a
@ -404,6 +404,9 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
// Prevent copying of ScriptInterface objects.
|
||||
ScriptInterface(const ScriptInterface&) {};
|
||||
|
||||
bool CallFunction_(JS::HandleValue val, const char* name, uint argc, jsval* argv, JS::MutableHandleValue ret);
|
||||
bool Eval_(const char* code, JS::MutableHandleValue ret);
|
||||
bool Eval_(const wchar_t* code, JS::MutableHandleValue ret);
|
||||
|
Loading…
Reference in New Issue
Block a user