~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/js/js.cc

  • Committer: Henrik Ingo
  • Date: 2011-10-01 10:13:02 UTC
  • mto: This revision was merged to the branch mainline in revision 2439.
  • Revision ID: henrik.ingo@avoinelama.fi-20111001101302-8qp1kvta7cn0vv2c
Small style fixes from Olaf's review (thanks).
Removed @todo items that have been done.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
 
35
35
namespace drizzle_plugin {
36
 
 
37
36
namespace js {
38
37
 
39
38
v8::Handle<v8::Value> V8Version(const v8::Arguments& args);
46
45
// What is the class for functions that return mixed types?
47
46
// Or is this as it should be, apparently js('1') + js('2') does the right thing already.
48
47
 
49
 
class JsFunction :public Item_str_func
 
48
class JsFunction : public Item_str_func
50
49
{
51
50
public:
52
 
  JsFunction() :Item_str_func() {}
53
 
  ~JsFunction() {}
54
 
 
55
51
  String *val_str(String *);
56
52
 
57
53
  const char *func_name() const 
86
82
 * 
87
83
 * This is adapted from ReportException() in v8 samples/shell.cc. 
88
84
 */
89
 
void emit_drizzle_error(v8::TryCatch* try_catch) {
 
85
void emit_drizzle_error(v8::TryCatch* try_catch)
 
86
{
90
87
  v8::HandleScope handle_scope;
91
88
  v8::String::Utf8Value exception(try_catch->Exception());
92
89
  const char* exception_string = v8_to_char(exception);
128
125
 *  * Save the compiled script so it can be used again if same script is run
129
126
 * many times
130
127
 *  * Some of the v8 stuff should be done in initialize()
131
 
 * @todo Documentation for drizzle manual in .rst format
132
 
 * @todo tests
133
128
 * 
134
129
 * @note DECIMAL_RESULT type is now a double in JavaScript. This could lose 
135
130
 * precision. But to send them as strings would also be awkward (+ operator will