Hello aa,

I'd like you to do a code review.  Please execute
        g4 diff -c 9229225

or point your web browser to
        http://mondrian/9229225

to review the following code:

Change 9229225 by [EMAIL PROTECTED] on 2008/12/02 23:48:51 *pending*

        Introduce a this_arg parameter to JsRunnerInterface::InvokeCallback.
        
        This is part 1 of a three-part ChangeList.
        
        Part 1 (this part) does not change any functionality, it simply
        adds an argument (which is always NULL, at this stage) to a method.
        This CL is basically nothing but boilerplate code changes, separated
        out into a stand-alone CL so that the two remaining CLs are not
        cluttered by dozens of lines of boilerplate changes, so that the
        reviewer can more easily focus on the deltas that matter.
        
        Part 2 will actually implement the this_arg feature (and add
        the automated test cases). For example, in js_runner_ff.cc,
        this CL will modify InvokeCallbackSpecialized to not assume
        JS_CallFunctionValue should take the result of JS_GetGlobalObject.
        
        Part 3 will update desktop/drop_target_sf.cc to actually pass a
        non-NULL this_arg, since currently it has to workaround the "always
        assume this == theGlobalObject" thing when it wants to call
        event.preventDefault(), since preventDefault assumes that "this ==
        event", and hence will fail with a TypeError if we try to
        JsRunnerInterface::InvokeCallback it.
        
        R=aa
        [EMAIL PROTECTED]
        DELTA=57  (16 added, 0 deleted, 41 changed)
        OCL=9229225

Affected files ...

... //depot/googleclient/gears/opensource/gears/base/common/js_runner.h#19 edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_cr.cc#5 
edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_ff.cc#32 
edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_ie.cc#24 
edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_np.cc#30 
edit
... //depot/googleclient/gears/opensource/gears/cctests/test.cc#89 edit
... 
//depot/googleclient/gears/opensource/gears/console/js_callback_logging_backend.cc#3
 edit
... //depot/googleclient/gears/opensource/gears/database2/statement.cc#5 edit
... //depot/googleclient/gears/opensource/gears/database2/transaction.cc#11 edit
... //depot/googleclient/gears/opensource/gears/desktop/drop_target_ff.cc#15 
edit
... //depot/googleclient/gears/opensource/gears/desktop/drop_target_ie.cc#14 
edit
... //depot/googleclient/gears/opensource/gears/desktop/file_dialog.cc#15 edit
... 
//depot/googleclient/gears/opensource/gears/geolocation/data_provider_test_android.h#1
 edit
... //depot/googleclient/gears/opensource/gears/geolocation/geolocation.cc#67 
edit
... //depot/googleclient/gears/opensource/gears/httprequest/httprequest.cc#25 
edit
... 
//depot/googleclient/gears/opensource/gears/httprequest/httprequest_upload.cc#4 
edit
... 
//depot/googleclient/gears/opensource/gears/localserver/common/async_task_test.cc#3
 edit
... 
//depot/googleclient/gears/opensource/gears/localserver/managed_resource_store_module.cc#4
 edit
... 
//depot/googleclient/gears/opensource/gears/localserver/resource_store_module.cc#12
 edit
... //depot/googleclient/gears/opensource/gears/timer/timer.cc#4 edit
... 
//depot/googleclient/gears/opensource/gears/workerpool/firefox/pool_threads_manager.cc#27
 edit
... 
//depot/googleclient/gears/opensource/gears/workerpool/ie/pool_threads_manager.cc#23
 edit
... 
//depot/googleclient/gears/opensource/gears/workerpool/npapi/pool_threads_manager.cc#25
 edit

57 delta lines: 16 added, 0 deleted, 41 changed

Also consider running:
        g4 lint -c 9229225

which verifies that the changelist doesn't introduce new style violations.

If you can't do the review, please let me know as soon as possible.  During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately.  Visit
http://www/eng/code_review.html for more information.

This is a semiautomated message from "g4 mail".  Complaints or suggestions?
Mail [EMAIL PROTECTED]
Change 9229225 by [EMAIL PROTECTED] on 2008/12/02 23:48:51 *pending*

        Introduce a this_arg parameter to JsRunnerInterface::InvokeCallback.
        
        This is part 1 of a three-part ChangeList.
        
        Part 1 (this part) does not change any functionality, it simply
        adds an argument (which is always NULL, at this stage) to a method.
        This CL is basically nothing but boilerplate code changes, separated
        out into a stand-alone CL so that the two remaining CLs are not
        cluttered by dozens of lines of boilerplate changes, so that the
        reviewer can more easily focus on the deltas that matter.
        
        Part 2 will actually implement the this_arg feature (and add
        the automated test cases). For example, in js_runner_ff.cc,
        this CL will modify InvokeCallbackSpecialized to not assume
        JS_CallFunctionValue should take the result of JS_GetGlobalObject.
        
        Part 3 will update desktop/drop_target_sf.cc to actually pass a
        non-NULL this_arg, since currently it has to workaround the "always
        assume this == theGlobalObject" thing when it wants to call
        event.preventDefault(), since preventDefault assumes that "this ==
        event", and hence will fail with a TypeError if we try to
        JsRunnerInterface::InvokeCallback it.

Affected files ...

... //depot/googleclient/gears/opensource/gears/base/common/js_runner.h#19 edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_cr.cc#5 
edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_ff.cc#32 
edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_ie.cc#24 
edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_np.cc#30 
edit
... //depot/googleclient/gears/opensource/gears/cctests/test.cc#89 edit
... 
//depot/googleclient/gears/opensource/gears/console/js_callback_logging_backend.cc#3
 edit
... //depot/googleclient/gears/opensource/gears/database2/statement.cc#5 edit
... //depot/googleclient/gears/opensource/gears/database2/transaction.cc#11 edit
... //depot/googleclient/gears/opensource/gears/desktop/drop_target_ff.cc#15 
edit
... //depot/googleclient/gears/opensource/gears/desktop/drop_target_ie.cc#14 
edit
... //depot/googleclient/gears/opensource/gears/desktop/file_dialog.cc#15 edit
... 
//depot/googleclient/gears/opensource/gears/geolocation/data_provider_test_android.h#1
 edit
... //depot/googleclient/gears/opensource/gears/geolocation/geolocation.cc#67 
edit
... //depot/googleclient/gears/opensource/gears/httprequest/httprequest.cc#25 
edit
... 
//depot/googleclient/gears/opensource/gears/httprequest/httprequest_upload.cc#4 
edit
... 
//depot/googleclient/gears/opensource/gears/localserver/common/async_task_test.cc#3
 edit
... 
//depot/googleclient/gears/opensource/gears/localserver/managed_resource_store_module.cc#4
 edit
... 
//depot/googleclient/gears/opensource/gears/localserver/resource_store_module.cc#12
 edit
... //depot/googleclient/gears/opensource/gears/timer/timer.cc#4 edit
... 
//depot/googleclient/gears/opensource/gears/workerpool/firefox/pool_threads_manager.cc#27
 edit
... 
//depot/googleclient/gears/opensource/gears/workerpool/ie/pool_threads_manager.cc#23
 edit
... 
//depot/googleclient/gears/opensource/gears/workerpool/npapi/pool_threads_manager.cc#25
 edit

==== //depot/googleclient/gears/opensource/gears/base/common/js_runner.h#19 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/common/js_runner.h
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/js_runner.h 2008-12-02 
23:48:57.000000000 +1100
+++ googleclient/gears/opensource/gears/base/common/js_runner.h 2008-12-02 
23:38:59.000000000 +1100
@@ -132,8 +132,11 @@
 
   // Invokes a callback. If optional_alloc_retval is specified, this method 
will
   // create a new JsRootedToken that the caller is responsible for deleting.
+  // The this_arg parameter determines the value of the special JavaScript
+  // keyword 'this', when executing the callback. Almost always, the caller
+  // should just pass NULL, which means 'this' is just the global JS object.
   virtual bool InvokeCallback(const JsRootedCallback *callback,
-                              int argc, JsParamToSend *argv,
+                              JsObject *this_arg, int argc, JsParamToSend 
*argv,
                               JsRootedToken **optional_alloc_retval) = 0;
 
   virtual bool AddEventHandler(JsEventType event_type,
==== //depot/googleclient/gears/opensource/gears/base/common/js_runner_cr.cc#5 
- 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/common/js_runner_cr.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/js_runner_cr.cc     
2008-12-02 23:48:58.000000000 +1100
+++ googleclient/gears/opensource/gears/base/common/js_runner_cr.cc     
2008-12-02 23:20:57.000000000 +1100
@@ -238,8 +238,10 @@
   }
 
   virtual bool InvokeCallback(const JsRootedCallback *callback,
-                              int argc, JsParamToSend *argv,
+                              JsObject *this_arg, int argc, JsParamToSend 
*argv,
                               JsRootedToken **optional_alloc_retval) {
+    // TODO(nigeltao): Implement respecting the this_arg parameter.
+    assert(!this_arg);
     assert(callback && (!argc || argv));
     if (!NPVARIANT_IS_OBJECT(callback->token())) { return false; }
 
==== //depot/googleclient/gears/opensource/gears/base/common/js_runner_ff.cc#32 
- 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/common/js_runner_ff.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/js_runner_ff.cc     
2008-12-02 23:48:58.000000000 +1100
+++ googleclient/gears/opensource/gears/base/common/js_runner_ff.cc     
2008-12-02 23:20:32.000000000 +1100
@@ -201,8 +201,10 @@
                    JsRootedToken **optional_alloc_retval) = 0;
 
   bool InvokeCallback(const JsRootedCallback *callback,
-                      int argc, JsParamToSend *argv,
+                      JsObject *this_arg, int argc, JsParamToSend *argv,
                       JsRootedToken **optional_alloc_retval) {
+    // TODO(nigeltao): Implement respecting the this_arg parameter.
+    assert(!this_arg);
     assert(callback && (!argc || argv));
 
     if (!callback->IsValidCallback()) { return false; }
==== //depot/googleclient/gears/opensource/gears/base/common/js_runner_ie.cc#24 
- 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/common/js_runner_ie.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/js_runner_ie.cc     
2008-12-02 23:48:58.000000000 +1100
+++ googleclient/gears/opensource/gears/base/common/js_runner_ie.cc     
2008-12-02 23:20:07.000000000 +1100
@@ -844,8 +844,10 @@
     return com_obj_->SetErrorHandler(error_handler);
   }
   bool InvokeCallback(const JsRootedCallback *callback,
-                      int argc, JsParamToSend *argv,
+                      JsObject *this_arg, int argc, JsParamToSend *argv,
                       JsRootedToken **optional_alloc_retval) {
+    // TODO(nigeltao): Implement respecting the this_arg parameter.
+    assert(!this_arg);
     return InvokeCallbackImpl(callback, argc, argv, optional_alloc_retval,
                               NULL);
   }
@@ -1002,8 +1004,10 @@
   }
 
   bool InvokeCallback(const JsRootedCallback *callback,
-                      int argc, JsParamToSend *argv,
+                      JsObject *this_arg, int argc, JsParamToSend *argv,
                       JsRootedToken **optional_alloc_retval) {
+    // TODO(nigeltao): Implement respecting the this_arg parameter.
+    assert(!this_arg);
 #ifdef OS_WINCE
     // On WinCE, exceptions do not get thrown from JavaScript code that is
     // invoked from C++ in the context of the main page. Therefore, to allow
==== //depot/googleclient/gears/opensource/gears/base/common/js_runner_np.cc#30 
- 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/common/js_runner_np.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/js_runner_np.cc     
2008-12-02 23:48:58.000000000 +1100
+++ googleclient/gears/opensource/gears/base/common/js_runner_np.cc     
2008-12-02 23:21:14.000000000 +1100
@@ -193,8 +193,10 @@
   }
 
   bool InvokeCallback(const JsRootedCallback *callback,
-                      int argc, JsParamToSend *argv,
+                      JsObject *this_arg, int argc, JsParamToSend *argv,
                       JsRootedToken **optional_alloc_retval) {
+    // TODO(nigeltao): Implement respecting the this_arg parameter.
+    assert(!this_arg);
     assert(callback && (!argc || argv));
     if (!NPVARIANT_IS_OBJECT(callback->token())) { return false; }
 
==== //depot/googleclient/gears/opensource/gears/cctests/test.cc#89 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/cctests/test.cc ====
# action=edit type=text
--- googleclient/gears/opensource/gears/cctests/test.cc 2008-12-02 
23:48:58.000000000 +1100
+++ googleclient/gears/opensource/gears/cctests/test.cc 2008-12-02 
23:23:58.000000000 +1100
@@ -453,7 +453,7 @@
     {JSPARAM_STRING16, &string_value},
   };
 
-  GetJsRunner()->InvokeCallback(function.get(), ARRAYSIZE(out_argv),
+  GetJsRunner()->InvokeCallback(function.get(), NULL, ARRAYSIZE(out_argv),
                                 out_argv, NULL);
 }
 
@@ -1789,7 +1789,7 @@
   JsRunnerInterface* js_runner = base.GetJsRunner();
   TEST_ASSERT(js_runner);
   scoped_ptr<JsRootedToken> retval;
-  TEST_ASSERT(js_runner->InvokeCallback(function_6.get(), 0, NULL,
+  TEST_ASSERT(js_runner->InvokeCallback(function_6.get(), NULL, 0, NULL,
                                         as_out_parameter(retval)));
   std::string16 string_retval;
   TEST_ASSERT(retval->GetAsString(&string_retval));
@@ -1834,7 +1834,7 @@
   JsRunnerInterface* js_runner = base.GetJsRunner();
   TEST_ASSERT(js_runner);
   scoped_ptr<JsRootedToken> retval;
-  TEST_ASSERT(js_runner->InvokeCallback(function.get(), 0, NULL,
+  TEST_ASSERT(js_runner->InvokeCallback(function.get(), NULL, 0, NULL,
                                         as_out_parameter(retval)));
   TEST_ASSERT(retval.get());
   std::string16 string_retval;
==== 
//depot/googleclient/gears/opensource/gears/console/js_callback_logging_backend.cc#3
 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/console/js_callback_logging_backend.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/console/js_callback_logging_backend.cc  
2008-12-02 23:48:59.000000000 +1100
+++ googleclient/gears/opensource/gears/console/js_callback_logging_backend.cc  
2008-12-02 23:25:32.000000000 +1100
@@ -71,7 +71,7 @@
   JsParamToSend argv[argc] = {
     { JSPARAM_OBJECT, callback_params.get() },
   };
-  js_runner_->InvokeCallback(callback_.get(), argc, argv, NULL);
+  js_runner_->InvokeCallback(callback_.get(), NULL, argc, argv, NULL);
 }
 
 JsRootedCallback *JsCallbackLoggingBackend::GetCallback() {
==== //depot/googleclient/gears/opensource/gears/database2/statement.cc#5 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/database2/statement.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/database2/statement.cc  2008-12-02 
23:48:59.000000000 +1100
+++ googleclient/gears/opensource/gears/database2/statement.cc  2008-12-02 
23:24:21.000000000 +1100
@@ -33,8 +33,8 @@
   };
 
   if (HasCallback()) {
-    tx->GetJsRunner()->InvokeCallback(callback_.get(), ARRAYSIZE(send_argv),
-                                      send_argv, NULL);
+    tx->GetJsRunner()->InvokeCallback(callback_.get(), NULL,
+                                      ARRAYSIZE(send_argv), send_argv, NULL);
   }
 }
 
==== //depot/googleclient/gears/opensource/gears/database2/transaction.cc#11 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/database2/transaction.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/database2/transaction.cc        
2008-12-02 23:48:59.000000000 +1100
+++ googleclient/gears/opensource/gears/database2/transaction.cc        
2008-12-02 23:25:24.000000000 +1100
@@ -81,7 +81,7 @@
     { JSPARAM_MODULE, static_cast<ModuleImplBaseClass *>(this) }
   };
 
-  GetJsRunner()->InvokeCallback(callback_.get(), ARRAYSIZE(send_argv),
+  GetJsRunner()->InvokeCallback(callback_.get(), NULL, ARRAYSIZE(send_argv),
                                 send_argv, NULL);
 }
 
@@ -185,8 +185,8 @@
     { JSPARAM_OBJECT, error.get() },
   };
 
-  GetJsRunner()->InvokeCallback(error_callback_.get(), ARRAYSIZE(send_argv),
-                                send_argv, NULL);
+  GetJsRunner()->InvokeCallback(error_callback_.get(), NULL,
+                                ARRAYSIZE(send_argv), send_argv, NULL);
 }
 
 void GearsDatabase2Transaction::InvokeSuccessCallback() {
@@ -198,7 +198,7 @@
   if (interpreter_->async() && HasSuccessCallback()) {
     // TODO(dimitri.glazkov): investigate whether this is the right way to
     // invoke callback with no parameters
-    GetJsRunner()->InvokeCallback(success_callback_.get(), 0, NULL, NULL);
+    GetJsRunner()->InvokeCallback(success_callback_.get(), NULL, 0, NULL, 
NULL);
   }
 }
 
==== //depot/googleclient/gears/opensource/gears/desktop/drop_target_ff.cc#15 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/desktop/drop_target_ff.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/desktop/drop_target_ff.cc       
2008-12-02 23:48:59.000000000 +1100
+++ googleclient/gears/opensource/gears/desktop/drop_target_ff.cc       
2008-12-02 23:28:02.000000000 +1100
@@ -249,7 +249,7 @@
         { JSPARAM_OBJECT, context_object.get() }
       };
       module_environment_->js_runner_->InvokeCallback(
-          on_drop_.get(), argc, argv, NULL);
+          on_drop_.get(), NULL, argc, argv, NULL);
       nr = drag_session->SetDragAction(nsIDragService::DRAGDROP_ACTION_COPY);
       if (NS_FAILED(nr)) { return NS_ERROR_FAILURE; }
     }
@@ -277,12 +277,12 @@
       };
       if (is_drag_exit) {
         module_environment_->js_runner_->InvokeCallback(
-            callback, argc, argv, NULL);
+            callback, NULL, argc, argv, NULL);
         will_accept_drop_ = false;
       } else {
         scoped_ptr<JsRootedToken> return_value;
         module_environment_->js_runner_->InvokeCallback(
-            callback, argc, argv, as_out_parameter(return_value));
+            callback, NULL, argc, argv, as_out_parameter(return_value));
         // The HTML5 specification (section 5.4.5) says that an event handler
         // returning *false* means that we should not perform the default
         // action (i.e. the web-app wants Gears' file drop behavior, and not
==== //depot/googleclient/gears/opensource/gears/desktop/drop_target_ie.cc#14 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/desktop/drop_target_ie.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/desktop/drop_target_ie.cc       
2008-12-02 23:49:00.000000000 +1100
+++ googleclient/gears/opensource/gears/desktop/drop_target_ie.cc       
2008-12-02 23:27:30.000000000 +1100
@@ -172,7 +172,7 @@
     };
     scoped_ptr<JsRootedToken> return_value;
     module_environment_->js_runner_->InvokeCallback(
-        on_drag_enter_.get(), argc, argv, as_out_parameter(return_value));
+        on_drag_enter_.get(), NULL, argc, argv, 
as_out_parameter(return_value));
     // The HTML5 specification (section 5.4.5) says that an event handler
     // returning *false* means that we should not perform the default action
     // (i.e. the web-app wants Gears' file drop behavior, and not the default
@@ -208,7 +208,7 @@
     };
     scoped_ptr<JsRootedToken> return_value;
     module_environment_->js_runner_->InvokeCallback(
-        on_drag_over_.get(), argc, argv, as_out_parameter(return_value));
+        on_drag_over_.get(), NULL, argc, argv, as_out_parameter(return_value));
     will_accept_drop_ = return_value.get() &&
         V_VT(&return_value->token()) == VT_BOOL &&
         V_BOOL(&return_value->token()) == false;
@@ -239,7 +239,7 @@
       { JSPARAM_OBJECT, context_object.get() }
     };
     module_environment_->js_runner_->InvokeCallback(
-        on_drag_leave_.get(), argc, argv, NULL);
+        on_drag_leave_.get(), NULL, argc, argv, NULL);
   }
 
   hr = CancelEventBubble(html_event_obj, html_data_transfer);
@@ -272,7 +272,7 @@
       { JSPARAM_OBJECT, context_object.get() }
     };
     module_environment_->js_runner_->InvokeCallback(
-        on_drop_.get(), argc, argv, NULL);
+        on_drop_.get(), NULL, argc, argv, NULL);
   }
 
   return S_OK;
==== //depot/googleclient/gears/opensource/gears/desktop/file_dialog.cc#15 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/desktop/file_dialog.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/desktop/file_dialog.cc  2008-12-02 
23:49:00.000000000 +1100
+++ googleclient/gears/opensource/gears/desktop/file_dialog.cc  2008-12-02 
23:34:11.000000000 +1100
@@ -187,7 +187,7 @@
   } else {
     // Make the file selection callback.
     JsParamToSend callback_argv[] = { JSPARAM_ARRAY, files_array.get() };
-    module_environment_->js_runner_->InvokeCallback(callback_.get(),
+    module_environment_->js_runner_->InvokeCallback(callback_.get(), NULL,
                                                     ARRAYSIZE(callback_argv),
                                                     callback_argv, NULL);
   }
==== 
//depot/googleclient/gears/opensource/gears/geolocation/data_provider_test_android.h#1
 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/geolocation/data_provider_test_android.h
 ====
# action=edit type=text
--- 
googleclient/gears/opensource/gears/geolocation/data_provider_test_android.h    
    2008-12-02 23:49:00.000000000 +1100
+++ 
googleclient/gears/opensource/gears/geolocation/data_provider_test_android.h    
    2008-12-02 23:29:45.000000000 +1100
@@ -75,7 +75,7 @@
       // would recursively lock the RadioDataProvider::listener_mutex_.
       bool result = DataProvider::Unregister(test_object_);
       assert(result);
-      js_runner_->InvokeCallback(callback_.get(), 0, NULL, NULL);
+      js_runner_->InvokeCallback(callback_.get(), NULL, 0, NULL, NULL);
       delete test_object_;
     }
 
==== //depot/googleclient/gears/opensource/gears/geolocation/geolocation.cc#67 
- 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/geolocation/geolocation.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/geolocation/geolocation.cc      
2008-12-02 23:49:00.000000000 +1100
+++ googleclient/gears/opensource/gears/geolocation/geolocation.cc      
2008-12-02 23:30:07.000000000 +1100
@@ -949,7 +949,7 @@
   // InvokeCallback returns false if the callback enounters an error. Once 
we've
   // made the callback, we can't rely on any of the fix request data, because 
it
   // could be removed by other calls to this object before the callback 
returns.
-  GetJsRunner()->InvokeCallback(fix_info->success_callback.get(),
+  GetJsRunner()->InvokeCallback(fix_info->success_callback.get(), NULL,
                                 ARRAYSIZE(argv), argv, NULL);
   return true;
 }
@@ -986,7 +986,7 @@
   // InvokeCallback returns false if the callback enounters an error. Once 
we've
   // made the callback, we can't rely on any of the fix request data, because 
it
   // could be removed by other calls to this object before the callback 
returns.
-  GetJsRunner()->InvokeCallback(fix_info->error_callback.get(),
+  GetJsRunner()->InvokeCallback(fix_info->error_callback.get(), NULL,
                                 ARRAYSIZE(argv), argv, NULL);
   return true;
 }
==== //depot/googleclient/gears/opensource/gears/httprequest/httprequest.cc#25 
- 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/httprequest/httprequest.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/httprequest/httprequest.cc      
2008-12-02 23:49:00.000000000 +1100
+++ googleclient/gears/opensource/gears/httprequest/httprequest.cc      
2008-12-02 23:30:28.000000000 +1100
@@ -683,7 +683,7 @@
       JsParamToSend argv[] = {
         { JSPARAM_OBJECT, js_object.get() },
       };
-      runner->InvokeCallback(handler, ARRAYSIZE(argv), argv, NULL);
+      runner->InvokeCallback(handler, NULL, ARRAYSIZE(argv), argv, NULL);
     }
   }
 }
@@ -708,7 +708,7 @@
     JsRunnerInterface *runner = GetJsRunner();
     assert(runner);
     if (runner) {
-      runner->InvokeCallback(handler, 0, NULL, NULL);
+      runner->InvokeCallback(handler, NULL, 0, NULL, NULL);
     }
     if (is_complete) {
       delete handler;
==== 
//depot/googleclient/gears/opensource/gears/httprequest/httprequest_upload.cc#4 
- 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/httprequest/httprequest_upload.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/httprequest/httprequest_upload.cc       
2008-12-02 23:49:01.000000000 +1100
+++ googleclient/gears/opensource/gears/httprequest/httprequest_upload.cc       
2008-12-02 23:30:16.000000000 +1100
@@ -82,7 +82,7 @@
       JsParamToSend argv[] = {
         { JSPARAM_OBJECT, js_object.get() },
       };
-      runner->InvokeCallback(handler, ARRAYSIZE(argv), argv, NULL);
+      runner->InvokeCallback(handler, NULL, ARRAYSIZE(argv), argv, NULL);
     }
   }
 }
==== 
//depot/googleclient/gears/opensource/gears/localserver/common/async_task_test.cc#3
 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/localserver/common/async_task_test.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/localserver/common/async_task_test.cc   
2008-12-02 23:49:01.000000000 +1100
+++ googleclient/gears/opensource/gears/localserver/common/async_task_test.cc   
2008-12-02 23:32:44.000000000 +1100
@@ -52,7 +52,8 @@
     assert(callback_.get());
     assert(status_code_ > -1);
     JsParamToSend argv[] = { { JSPARAM_INT, &status_code_ } };
-    js_runner_->InvokeCallback(callback_.get(), ARRAYSIZE(argv), argv, NULL);
+    js_runner_->InvokeCallback(
+        callback_.get(), NULL, ARRAYSIZE(argv), argv, NULL);
   }
 
  private:
==== 
//depot/googleclient/gears/opensource/gears/localserver/managed_resource_store_module.cc#4
 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/localserver/managed_resource_store_module.cc
 ====
# action=edit type=text
--- 
googleclient/gears/opensource/gears/localserver/managed_resource_store_module.cc
    2008-12-02 23:49:01.000000000 +1100
+++ 
googleclient/gears/opensource/gears/localserver/managed_resource_store_module.cc
    2008-12-02 23:32:51.000000000 +1100
@@ -366,5 +366,5 @@
   JsParamToSend argv[argc] = {
     { JSPARAM_OBJECT, param.get() }
   };
-  GetJsRunner()->InvokeCallback(handler, argc, argv, NULL);
-}
+  GetJsRunner()->InvokeCallback(handler, NULL, argc, argv, NULL);
+}
==== 
//depot/googleclient/gears/opensource/gears/localserver/resource_store_module.cc#12
 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/localserver/resource_store_module.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/localserver/resource_store_module.cc    
2008-12-02 23:49:01.000000000 +1100
+++ googleclient/gears/opensource/gears/localserver/resource_store_module.cc    
2008-12-02 23:33:02.000000000 +1100
@@ -872,7 +872,8 @@
     { JSPARAM_BOOL, &succeeded },
     { JSPARAM_INT, &capture_id }
   };
-  GetJsRunner()->InvokeCallback(request->callback.get(), argc, argv, NULL);
+  GetJsRunner()->InvokeCallback(
+      request->callback.get(), NULL, argc, argv, NULL);
 }
 
 
//------------------------------------------------------------------------------
==== //depot/googleclient/gears/opensource/gears/timer/timer.cc#4 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/timer/timer.cc ====
# action=edit type=text
--- googleclient/gears/opensource/gears/timer/timer.cc  2008-12-02 
23:49:01.000000000 +1100
+++ googleclient/gears/opensource/gears/timer/timer.cc  2008-12-02 
23:33:48.000000000 +1100
@@ -462,7 +462,8 @@
   // Invoke JavaScript timer handler.  *timer_info can become invalid here, if
   // the timer gets deleted in the handler.
   if (timer_info->callback.get()) {
-    GetJsRunner()->InvokeCallback(timer_info->callback.get(), 0, NULL, NULL);
+    GetJsRunner()->InvokeCallback(
+        timer_info->callback.get(), NULL, 0, NULL, NULL);
   } else {
     GetJsRunner()->Eval(timer_info->script);
   }
==== 
//depot/googleclient/gears/opensource/gears/workerpool/firefox/pool_threads_manager.cc#27
 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/workerpool/firefox/pool_threads_manager.cc
 ====
# action=edit type=text
--- 
googleclient/gears/opensource/gears/workerpool/firefox/pool_threads_manager.cc  
    2008-12-02 23:49:02.000000000 +1100
+++ 
googleclient/gears/opensource/gears/workerpool/firefox/pool_threads_manager.cc  
    2008-12-02 23:33:38.000000000 +1100
@@ -300,7 +300,7 @@
       { JSPARAM_INT, &msg.sender_ },
       { JSPARAM_OBJECT, onmessage_param.get() }
     };
-    wi->js_runner->InvokeCallback(wi->onmessage_handler.get(), argc, argv,
+    wi->js_runner->InvokeCallback(wi->onmessage_handler.get(), NULL, argc, 
argv,
                                   NULL);
   } else {
     JsErrorInfo error_info = {
@@ -496,7 +496,7 @@
   // so we clear the exception so that the JS engine is aware of this.
   JS_ClearPendingException(wi->js_runner->GetContext());
 
-  if (wi->js_runner->InvokeCallback(wi->onerror_handler.get(), argc, argv,
+  if (wi->js_runner->InvokeCallback(wi->onerror_handler.get(), NULL, argc, 
argv,
                                     &alloc_js_retval)) {
     // Coerce the return value to bool. We typically don't coerce interfaces,
     // but if the return type of a callback is the wrong type, there is no
==== 
//depot/googleclient/gears/opensource/gears/workerpool/ie/pool_threads_manager.cc#23
 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/workerpool/ie/pool_threads_manager.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/workerpool/ie/pool_threads_manager.cc   
2008-12-02 23:49:02.000000000 +1100
+++ googleclient/gears/opensource/gears/workerpool/ie/pool_threads_manager.cc   
2008-12-02 23:33:29.000000000 +1100
@@ -299,7 +299,7 @@
   JsRootedToken *alloc_js_retval = NULL;
   bool js_retval = false;
 
-  if (wi->js_runner->InvokeCallback(wi->onerror_handler.get(), argc, argv,
+  if (wi->js_runner->InvokeCallback(wi->onerror_handler.get(), NULL, argc, 
argv,
                                     &alloc_js_retval)) {
     // Coerce the return value to bool. We typically don't coerce interfaces,
     // but if the return type of a callback is the wrong type, there is no
@@ -834,7 +834,7 @@
       { JSPARAM_INT, &msg.sender_ },
       { JSPARAM_OBJECT, onmessage_param.get() }
     };
-    wi->js_runner->InvokeCallback(wi->onmessage_handler.get(), argc, argv,
+    wi->js_runner->InvokeCallback(wi->onmessage_handler.get(), NULL, argc, 
argv,
                                   NULL);
   } else {
     JsErrorInfo error_info = {
==== 
//depot/googleclient/gears/opensource/gears/workerpool/npapi/pool_threads_manager.cc#25
 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/workerpool/npapi/pool_threads_manager.cc
 ====
# action=edit type=text
--- 
googleclient/gears/opensource/gears/workerpool/npapi/pool_threads_manager.cc    
    2008-12-02 23:49:02.000000000 +1100
+++ 
googleclient/gears/opensource/gears/workerpool/npapi/pool_threads_manager.cc    
    2008-12-02 23:33:20.000000000 +1100
@@ -338,7 +338,7 @@
   JsRootedToken *alloc_js_retval = NULL;
   bool js_retval = false;
 
-  if (wi->js_runner->InvokeCallback(wi->onerror_handler.get(), argc, argv,
+  if (wi->js_runner->InvokeCallback(wi->onerror_handler.get(), NULL, argc, 
argv,
                                     &alloc_js_retval)) {
     // Coerce the return value to bool. We typically don't coerce interfaces,
     // but if the return type of a callback is the wrong type, there is no
@@ -882,7 +882,7 @@
       { JSPARAM_INT, &msg.sender },
       { JSPARAM_OBJECT, onmessage_param.get() }
     };
-    wi->js_runner->InvokeCallback(wi->onmessage_handler.get(), argc, argv,
+    wi->js_runner->InvokeCallback(wi->onmessage_handler.get(), NULL, argc, 
argv,
                                   NULL);
   } else {
     JsErrorInfo error_info = {

Reply via email to