public
Rubygem
Description: Johnson wraps JavaScript in a loving Ruby embrace.
Homepage: http://github.com/jbarnette/johnson/wikis
Clone URL: git://github.com/jbarnette/johnson.git
Search Repo:
rooting the debugger
aaronp (author)
Tue Jun 10 16:50:17 -0700 2008
commit  47b681e48b06354f5e0f5b02bb035d8e05a4f7d4
tree    281107007ad3dda8da071887d039046560ebf725
parent  9a1447e914b37e42c61d29ab16af8cb237e072e5
...
80
81
82
 
 
 
83
84
85
...
80
81
82
83
84
85
86
87
88
0
@@ -80,6 +80,9 @@ static void * call_hook(JSContext *UNUSED(js), JSStackFrame *UNUSED(fp), JSBool
0
 
0
 static void object_hook(JSContext *js, JSObject *obj, JSBool isNew, void *rb)
0
 {
0
+ assert(rb);
0
+ assert(js);
0
+ assert(obj);
0
   VALUE self = (VALUE)rb;
0
 
0
   VALUE rb_obj = convert_to_ruby(OUR_RUNTIME(js), OBJECT_TO_JSVAL(obj));
...
97
98
99
 
100
101
102
...
97
98
99
100
101
102
103
0
@@ -97,6 +97,7 @@ set_debugger(VALUE self, VALUE debugger)
0
   JohnsonRuntime* runtime;
0
   JSDebugHooks* debug_hooks;
0
 
0
+ rb_iv_set(self, "@debugger", debugger);
0
   Data_Get_Struct(self, JohnsonRuntime, runtime);
0
   Data_Get_Struct(debugger, JSDebugHooks, debug_hooks);
0
 
...
5
6
7
 
8
9
10
...
5
6
7
8
9
10
11
0
@@ -5,6 +5,7 @@ module Johnson #:nodoc:
0
 
0
       def initialize(options={})
0
         initialize_native(options)
0
+ @debugger = nil
0
         self["Ruby"] = Object
0
       end
0
 
...
22
23
24
 
 
25
26
27
...
22
23
24
25
26
27
28
29
0
@@ -22,6 +22,8 @@ module Johnson
0
 
0
     def setup
0
       @runtime = Johnson::Runtime.new
0
+ #@runtime.delegate.gc_zeal = 2
0
+ #@runtime.delegate.debugger = Johnson::SpiderMonkey::Debugger.new(TestLogger.new)
0
     end
0
     
0
     def assert_js(expression, options={})

Comments

    No one has commented yet.